An order is placed (tick chart) but not filled and some time later a condition isn’t met any longer – how to cancel this order?
Simplified Example (tick chart):
Code: Select all
var: counter(0) ;
condition1 = ... ;
if condition1 then counter = 1 ;
condition2 = counter = 0 ;
if condition2 then buy 1 contract next bar openD(0) + 5 points limit ;
In such a case MC places the limit order and doesn’t care, if later counter changes to 1 (order stays valid or is even filled).
Any help is very much appreciated. Thank you.
Assuming IOG is not enabled,
The strategy is evaluated at the EOB (End of Bar),
if the condition is met, the order is sent at the beginning of next bar.
The order is good for the next bar only.
The order will be automatically withdrawn if it is not filled by the end of the bar.
The evaluation will repeat itself at the end of the bar.