PDA

View Full Version : vertical line and BarsPeriod.Value error


tinkerz
03-08-2010, 01:53 PM
if (ToTime(Time[0]) == 142500 && BarsPeriod.Value==5||ToTime(Time[0]) == 142700 && BarsPeriod.Value==3||ToTime(Time[0]) == 142000 && BarsPeriod.Value==10)DrawVerticalLine("Opensessionline" + CurrentBar, 0 , System.Drawing.Color.Blue, DashStyle.Solid, 1);

CS0103

The name BarsPeriod.Value does not exist in the current context

the context is drawing a line if the time and bar period agree

so if i have 5min bars and the time is 1425, draw a line

what cant i see?

Thanks

NinjaTrader_Josh
03-08-2010, 02:09 PM
Please use Bars.Period.Value.

BarsPeriod (without the .) is for strategies only.

eDanny
03-09-2010, 07:55 AM
Please use Bars.Period.Value.

BarsPeriod (without the .) is for strategies and NT7 indicators only.

Fixed. Sorry Josh.

NinjaTrader_Josh
03-09-2010, 08:09 AM
eDanny,

Thanks. This is the 6.5 forums so there is generally no need to confuse people with what is/isn't in 7.