View Full Version : bollinger color from code
ATI user
03-12-2010, 10:02 AM
Bollinger(2, Slow) .Plots[0].Pen.Color = Color.DodgerBlue;
only changes the top line to blue
is there syntax to change all 3 lines from code
I tried
Bollinger(2, Slow).Middle .Plots[0].Pen.Color = Color.DodgerBlue;
which would not compile
thanks
NinjaTrader_Josh
03-12-2010, 10:22 AM
Plots[1]
Plots[2]
instead of [0] should do it.
ATI user
03-12-2010, 11:14 AM
thanks Josh...works perfectly
is there an equivalent of
AutoScale = false;
for use in strategies?
this code will not compile
NinjaTrader_Josh
03-12-2010, 11:17 AM
AutoScale is usable in indicators and not strategies. No, there is no equivalent. All objects where AutoScale would be relevant has their own AutoScale properties that you can adjust as you see fit individually.
ATI user
03-12-2010, 01:51 PM
thanks Josh
so you can not change the autoscale property of an EMA via strategy code...i.e. you must do it in the indicators properties dialog....and then perhaps use SetDefault?
NinjaTrader_Josh
03-12-2010, 02:04 PM
Believe you can try:
EMA(10).AutoScale = false;
ATI user
03-12-2010, 02:25 PM
excellent ...thanks