modify SL based on ATR
-
Hello community,
I want to change a SL based on ATR value.
Example: I have a open position, SL is already moved to breakeven (Timeframe M1), than I want the EA to check the value of the ATR on the M5 Chart (maybe its 25pips) . After that if the price moves more than 25 pips maybe it moves 30. I want the SL to move the SL 5 pips behind the price.
How can i do that???? -
Not sure I fully get it. Do you want the SL to be trailed by a fixed distance (5 pips) or via ATR?
-
When you set breakeven on the M1 chart, use the Modify Variable block or a Formula block to save the ATR value from the M5 timeframe into a variable. You can then use that variable in the Stop Trail block.
-
@Ho3ein-sh
Ok, thank you. Thats the answer i needed. I connected the modify variable block with the Trailing stop each trade block. But what to put in, in the trailing stop block?
if trade - modify variables - trailing stop each trade (in this block) -
@cuzyouaintme I recommend following my Telegram channel to find answers to your questions—and even beyond that. I’ve been teaching robot creation for over two years and have produced more than 41 tutorial sessions.
https://t.me/HoseinRobotFx -
@Ho3ein-sh Thanks but i dont speak your language
-
You can see what I’m doing by following the image.
Also, follow my YouTube channel—there you can turn on subtitles to understand what’s going on. -
I will gradually upload all the videos available on Telegram to YouTube with subtitles.