AlanChenMB
New member
While I trying to use AddOrder to place a buy order, it is weird that in case I add the 2nd line (AddOrder) then my script does NOT work but if I comment out my AddOrder command in script then both before/after alert works.
Wondering if someone know the possible reason?
Alert(1, "Before AddOrder", Alert.BAR, Sound.Bell);
AddOrder(OrderType.BUY_AUTO, close > close[1], open[-1], 1, Color.ORANGE, Color.ORANGE, "Sample buy @ " + open[-1]);
Alert(1, "After AddOrder", Alert.BAR, Sound.Bell);
Wondering if someone know the possible reason?
Alert(1, "Before AddOrder", Alert.BAR, Sound.Bell);
AddOrder(OrderType.BUY_AUTO, close > close[1], open[-1], 1, Color.ORANGE, Color.ORANGE, "Sample buy @ " + open[-1]);
Alert(1, "After AddOrder", Alert.BAR, Sound.Bell);