Draw line when in profit
-
Hi I want to implemement this strategy on my project
when there a buy and sale trade . total trade profit in 10usd . I want a line is drawn at profit 5usd
when total profit in 20usd. draw a line at profit 10usd. then delete the previous one.
this is like a breakeven line function. I don't want to use trailing stop and breakeven. i want to use line drawn as a breakeven line,
when candle move below the drawn line. all trades will be close.. please help
here is my Illustration
A: Profit 10usd detected
B: Draw line at 5usd
C : candle goes up above yellow line. close all tradeI want it continuously detect every 10 USD in profit and start draw line at -5 USD from current profit


Here is shared project
https://fxdreema.com/shared/1g7RfHQ4c -
Is the bot supposed to work 100% automatically? Ten lines are simply unnecessary. You should use variables instead.
-
@l-andorrà yes 100% work automatically. how to setup the variables in this strategy.
the reason I want to use line instead of SL trailing because my main strategy is grid trading where some point robot will open lot of trades. then when in profit I don't want all the trade move SL moving around as this approach will get a warning from broker due to lot of sl moving trailing in same time