I apply the following code to a 1 tick chart. I set it allow up to 100 entry oder in the strategy properties. The design of the strategy is to buy 5 contracts from the market. However, after turning on the Auto Trading, MC always buy more than 5 contracts. Is there any solution for this problem?
________________________________________________________________
IF MARKETPOSITION_AT_BROKER_FOR_THE_STRATEGY < 5 THEN BEGIN
BUY NEXT BAR AT INSIDEBID LIMIT;
END;
________________________________________________________________