MnAParticipant
New
Amigos/friends, Im new to coding but keen.
Question if I may…I trade futures. Once I buy (go long) and I am longonmarket…how on earth do I instruct the stoploss to remain static at the lowest point of the entry (trade entry) bar?
Effectively I want to set my stoploss just under my entry buy bar. can anyone help?
gracias
There you go (Not OnMarket added to your entry conditions does the trick):
IF MyLongConditions AND Not OnMarket THEN
BUY 1 CONTRACT AT MARKET
SET TARGET pPROFIT 100
SET STOP pLOSS abs(close - low) / pipsize
ENDIF
Please use the correct language, I moved it from the Spanish to the English forum. Refrain from mixing languages. Thank you 🙂
I changed the code because I had forgotten to set it to the LOW of the entry bar.