There's something weird going on.
I'm using 3min chart and addin a 15min of same instrument in script...
In replay a bar that should be closed at 10:45:00 but actually closed at 10:45:15... Actually both bars (3min and 15min) are closing at the same time ->10:45:00... But because of that BarProgress number 1 that (15min) is closing my order.... In backtest, I mean historical data it doesn't happen when the bar closes at 10:45:00..... I saw it in realtime and I can also see it in replay.... What's happening ? I give no command within OnBarUptade event refering BarProgress==1...
This is the output of the real and replay situation, followed buy the historical one:
22/07/2014 10:42:01 Entered internal PlaceOrder() method at 22/07/2014 10:42:01: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=5 LimitPrice=2222,5 StopPrice=2222,5 SignalName='EntryShort' FromEntrySignal=''
22/07/2014 10:45:16 Entered internal PlaceOrder() method at 22/07/2014 10:45:16: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=5 LimitPrice=2223,0 StopPrice=2223,0 SignalName='EntryShort' FromEntrySignal=''
22/07/2014 10:45:16 Amended matching order: Action=SellShort OrderType=StopLimit Quantity=5 LimitPrice=2223,0 StopPrice=2223,0 SignalName=EntryShort' FromEntrySignal=''
22/07/2014 10:45:16 Cancelled expired order: BarsInProgress=1: Order='a2fe24f18e5f401cb6eef6ef0908371b/Replay101' Name='EntryShort' State=Accepted Instrument='WDO 08-14' Action=SellShort Limit price=2223 Stop price=2223 Quantity=5 Strategy='GuiLongShort' Type=StopLimit Tif=Day Oco='' Filled=0 Fill price=0 Token='a2fe24f18e5f401cb6eef6ef0908371b' Gtd='01/12/2099 00:00:00'
HISTORICAL
22/07/2014 10:42:00 Entered internal PlaceOrder() method at 22/07/2014 10:42:00: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=5 LimitPrice=2222,5 StopPrice=2222,5 SignalName='EntryShort' FromEntrySignal=''
22/07/2014 10:45:00 Entered internal PlaceOrder() method at 22/07/2014 10:45:00: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=5 LimitPrice=2223,0 StopPrice=2223,0 SignalName='EntryShort' FromEntrySignal=''
22/07/2014 10:45:00 Amended open order: Action=SellShort OrderType=StopLimit Quantity=5 LimitPrice=2223,0 StopPrice=2223,0 SignalName=EntryShort' FromEntrySignal=''
22/07/2014 10:45:00 Entered internal PlaceOrder() method at 22/07/2014 10:45:00: BarsInProgress=0 Action=BuyToCover OrderType=Stop Quantity=5 LimitPrice=0 StopPrice=2226,0 SignalName='StopShort' FromEntrySignal='EntryShort'
22/07/2014 10:45:00 Entered internal PlaceOrder() method at 22/07/2014 10:45:00: BarsInProgress=0 Action=BuyToCover OrderType=Limit Quantity=5 LimitPrice=2218,0 StopPrice=0 SignalName='GainShort' FromEntrySignal='EntryShort'
Comment