I have an simple strategy witch use the SMA to enter a position with a limit oder for the next bar. If i set the Caltulate on BarClose to false I can see that Nijatrader dont calculate the SMA for the current bar.
Here is an example of the Entrylogic:
//Long
if(Position.MarketPosition == MarketPosition.Flat
&& Trade
&& (ToTime(Time[0])) >= 110000
&& (ToTime(Time[0])) <= 234500
&& Close[0] > Ma[0]
&& Close[0] > Filter[0])
{ EnterLongLimit(Stuck,Instrument.MasterInstrument.R ound2TickSize(Ma[0] - EntryTicks*TickSize*2), "Long");
}
The Backtest is fine but if i run the strategy in Realtime the Entryorders are not alway submitted. Do you think it could be because the Calculate on Bars Close is set to TURE? Would it be better to run such Code like in the example above in Calculate on BarClose = FALSE???
Comment