Hi Everybody
I’m using the ATR indicator as my Stop loss and profit target and I want that value to not update with each new bar. I’ve tried different methods but nothing works so far.
ATR = AverageTrueRange[14]
SET STOP pLOSS (1*ATR)
SET TARGET pPROFIT (2*ATR)
Here the Value of “ATR” updates as every new bar opens but I want to only get the value from the same bar as I opened my position and use that value as a constant but I can’t seem to figure out how.
Thanks in advance
There you go:
ATR = AverageTrueRange[14]
If MyLongConditions and Not OnMarket Then
Buy at Market
SET STOP pLOSS (1*ATR)
SET TARGET pPROFIT (2*ATR)
Endif
embedding the two lines in the IF…ENDIF block where a trade us entered ensures they won’t be executed each candle.