Hi,
Please can someone kindly educate me on how I set a Target Price to equal a 20 period Moving Average? I have tried the below, as well as the enclosed link, but no joy.
TARGET
Is it possible to update the Target Price to whatever the current value of the 20 period MA is, from one candle to the next?
Thanks very much
TP = Average[20](close)[1]
IF c1 AND c2 THEN
BUY 1 CONTRACT AT MARKET
set target profit TP
ENDIF
Hello,
I think TP should be a “distance” and not a level. You may try:
set target profit (TP-high)