I am using the Multi timeframe for the first time so I'm sure I'm doing something wrong.
I have
- primary bars = Daily
CalculateOnBarClose = true (I have also tried with false)
and seconday bars = 1 minute for example
I place a stopLimit order with SubmitOrder at close of Primary Bars.
I want to process some information at the exact time within 1minute bar when the order is potentially executed.
However I can't have the exact execution time properly at 1min level. It seems at the close of the daily bar, we check for the nextLow and nextHigh (within daily timeframe) and therefore we know the order was filled at the first minute bar following the closure of the daily bar. How to avoid this and oblige the order to be filled at the right time at minute bar level?
In term of code within class DefaultFillType : FillType
else if (order.OrderType == OrderType.StopLimit) { // Stop limit orders are triggered when traded at the stop price and traded through the limit price double nextLow = NextLow; double nextHigh = NextHigh; if (!order.StopTriggered && ((order.OrderAction == Cbi.OrderAction.Buy && order.StopPrice <= nextHigh + epsilon) || (order.OrderAction == Cbi.OrderAction.BuyToCover && order.StopPrice <= nextHigh + epsilon) || (order.OrderAction == Cbi.OrderAction.Sell && order.StopPrice >= nextLow - epsilon) || (order.OrderAction == Cbi.OrderAction.SellShort && order.StopPrice >= nextLow - epsilon))) order.StopTriggered = true;
So we don't move in time minute by minute for checking the orders are executed.
So basically how to force that?
Thanks
Comment