Instruction introducing a limit order in x units. Pending orders must be re-placed at each new bar.
Syntax:
1 |
BUY AT x LIMIT |
Example :
1 2 3 4 5 6 |
myMACD = MACD[12,26,9](close) long = myMACD crosses over 0 IF long THEN BUY 1 LOT AT close-10 LIMIT ENDIF |
how can i have a limit buy orders on upper bollinger band and it update every candle according to new upper bollinger?
i alrdy used this code but is enter even in between of boll bands. unfortunately, it deals even in candles at the middle of bollinger bands.
A= BollingerUp[20](close)
BUY 1 CONTRACT AT A LIMIT
ENDIF
For a BUY order, the LIMIT must be set below the actual price. If you want to buy above the current Close, use STOP order instead. As long as your code statement is read and executed, the LIMIT order should be placed correctly at new Bollinger Upper band on each new bar.
Thanks for advise, Nicolas! you are right. it is a fundamental concept of limit and stop order.
Shouldn’t it be, for a buy order, BUY 1 LOT AT close-10 LIMIT?
Right! Wrong copy/paste from the SELL LIMIT page … Thank you for making me notice it! 😉