I'm trying to pass an additional daily data series on CL into the Range indicator from the NT8 library and store the previous days value of Range at close as a basic double (RangePreviousDay).
I'm using a trading range of 8:30am EST to 3:15pm EST and I want the value to be accessed at the start of the new day using 5 minute bars on my chart.
So I have;
private Range RangeDay;
...
private double RangePreviousDay;
else if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.Day, 1);
RangeDay = Range(Values[1]);
...
....
protected override void OnBarUpdate()
{
RangePreviousDay = Range()[1];
if(RangePreviousDay > 3)
return;
The goal is if previous days value of Range is >3, end onbarupdate.
Can someone tell me why this is failing?
Thanks very much.
Comment