I want if bar closes above currentLow - I enter buy. I would greatly appriciate it
currentHigh = CurrentDayOHL().CurrentHigh[0];
currentLow = CurrentDayOHL().CurrentLow[0];
private double currentHigh;
private double currentLow;
and my logic goes here but it doesnt open trades
else if (CandyCane
&& (Close[0] > Open[0] && Low[0] < Open[0]) // current bar bullish
&& Low[0] < Low[1] // and low of signal bar is lower then previous bar
&& Low[0] < currentLow && Close[0] > currentLow // siganl bar closes above low
)
{
entryOrder = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Market, TradeSize, 0, 0, "", "CC");
return;
}
Also if on the doc page it says Note: Only use this indicator on intraday series, can I still back test it or it can be tested with replay?
https://ninjatrader.com/es/support/h...nt_day_ohl.htm
I think i am getting this error in output if i change line to [1] -> currentHigh = CurrentDayOHL().CurrentHigh[1];
Error on calling 'OnStateChange' method: 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.
Also this error if I i leave it as in the code
Error on calling 'OnStateChange' method: Object reference not set to an instance of an object.
Comment