I wanted to ask MC if certain behaviour when auto trading on Paper Trader is accurate.
If you run the following code:
Code: Select all
[intrabarordergeneration=true];
recalclastbarafter(.01);
if getappinfo(aiCalcReason)=0 then
buy ("test")next bar at close+10 limit {or market};
sell from entry ("test") next bar at market;
once cleardebug;
if lastbaronchart then begin
print(time:0:0, " , ", BarStatus(1) = 2, " , ",getappinfo(aicalcreason),marketposition);
end;
I'm wondering if this is inaccurate behaviour and just a quirk of the Paper Trader sim?
If one uses market orders instead then all orders appear to get filled.
So why are we seeing a high number of "inflight" order cancellations just for limit orders (even though they are marketable)?
Reason I'm asking; I want to build IOG signals with script that only runs on very discreet events as to be efficient as possible. With MC's current architecture; once an order is submitted, if it's marketable, then is there any way for MC to cancel it inflight?
Sounds like a crazy question, but I'm wondering if in the event of an order batch queue, can MC cancel an order that was already submitted (but is still technically queued and not really submitted)?
I'm hoping the above is indeed just a simulator quirk else I'll be forced to build much slower IOG signals.
Thanks!