still not sure what to put for currentbar count.
The error msg in log is:
You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
i have added the daily data series to state.configure
AddDataSeries(BarsPeriodType.Day, 1);
and declared 2 doubles which are the previous days high and low:
double pdh = Highs[1][1];
double pdl = Lows[1][1];
if(CurrentBars[0] < 5)
return;
'//trigger
if(Close[0] > pdh)
{ pdh breakout alert}
for the main data series will be using values under 1 day (usually 1m or 5m). Knowing this how to i need to configure the:
if(CurrentBars[0] < 5)
so that this indicator will function as intended. Please assist.
return;
Comment