PDA

View Full Version : How to set the Dash Style


scjohn
06-10-2007, 01:55 PM
For every plot there is Plot style and a Dash style.

The Add() does not have a parameter where you can set the Dash style. And far as I can tell you can not set the Dash style using the Plots[].

Is there anyway to set the Dash style inside the indicator?

NinjaTrader_Josh
06-10-2007, 03:32 PM
Add(new Plot(Color.Blue, PlotStyle.Hash, "Support"));

NinjaTrader_Ray
06-10-2007, 04:15 PM
Plot objects are managed by the Plots collection. If you only have one plot in your indicator, the plot object rests in the collection at index 0.

So to change the dash style, add the following line of code in Initialize() after adding the plot itself.

Plots[0].Pen.DashStyle = DashStyle.Dash;