The stop loss is here: stopLoss = openingRangeLow - (openingRangeHigh - openingRangeLow) * 0.5;
There is no OnBarUpdate() call because price is not calculated OnBarUpdate(). It's calculated on tick data. If I wait for a bar to close before taking the position, it's often too late and the trade is missed. That's why I used the (MarketDataEventArgs marketDataUpdate) arguments.
Maybe I should set an OnBarUpdate() = false; argument?
Comment