//Auto ORDER CONTROL
vars:_Auto_SW(False);
if getappinfo(aiStrategyAuto)=0
then
_Auto_SW=false;
if getappinfo(aiStrategyAuto)=1
and getappinfo(aiRealTimeCalc)=1
and i_MarketPosition=0
then
_Auto_SW=True;
if getappinfo(aiStrategyAuto)=0
or _Auto_SW then
condition11=true;
if marketposition<=0 and 策略訊號 and condition11 then
buy("B-SOP 186A") Qty contract next bar at market;