Live: ExecuteMarketOrder() Opens TWO positions!!
Created at 17 Sep 2019, 02:08
Live: ExecuteMarketOrder() Opens TWO positions!!
17 Sep 2019, 02:08
Hello,
I have been backtesting my robot for a long time with no problems, I use it live for one day and its opening two positions of the same size.
My OnBar() logic is very simple with no "For" loops so I cant see how it opens two positions!
ExecuteMarketOrder(TradeType.Buy, this.SymbolName, volume, InstanceName, SL, TP);
Even the Journal doesnt show anything about two positions being opened.
17/09/2019 03:00:14.310 | → Request to Buy 0.50 Lot(s) Bitcoin (SL: 2500) is ACCEPTED, order OID41503458 created (16/09/2019 17:00:14.026 UTC+0) 17/09/2019 03:00:14.419 | → Order OID41503458 is FILLED at 10146.92, position PID25230692 (16/09/2019 17:00:14.127 UTC+0) 17/09/2019 03:00:13.716 | → Order OID41503452 is FILLED at 10146.92, position PID25226124 CLOSED (16/09/2019 17:00:13.556 UTC+0) ## Closing my old position ## 17/09/2019 03:00:13.419 | Request to close position PID25226124 is sent to server 17/09/2019 03:00:13.873 | Request to Buy 0.50 Lot(s) Bitcoin (SL: 2500) is sent to server
But I now have two positions open:
Position: PID25230692 and PID25230691
PanagiotisCharalampous
17 Sep 2019, 07:59
Hi Cam_maC,
Can you share the cBot code so that we can have a look?
Best Regards,
Panagiotis
@PanagiotisCharalampous