İş tamamlandı
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
İş Gereklilikleri
After I manually enter a trade, I’ll attach the EA to the chart to manage TP and SL. The SL will be based on the entry price minus the ATR value at the moment. The ATR is now a constant until the trade is closed. TP will be the entry price plus ATR value. As soon as the price reaches TP, half of the position is closed; the other half moves SL to break even, and continues with a trailing stop of 1.5 ATR (I know that at this moment and until the price moves 0.5 of the ATR the SL is less than 1.5). All of this happens at the end of the candle. If I use the daily chart it will check and adjust the TP, closing ½ of the position, and TS at the end of the daily candle. This process should be automated as I drop the EA on the chart.
The second half will keep running in the profitable direction with a trailing stop recalculated at the end of each candle until the trailing stop is hit and it takes me out of the trade.
Every time the SL, and TS changes, or the partial close or close because it touches the TS it should take a screenshot.
The EA will work like this:
A- Inputs:
1. ATR multiplier for TP (1.5)
2. ATR multiplier for SL/TS (1.5)
B- Steps:
1. I attach the EA to the chart.
2. The EA calculates and sets the TP and SL.
3. At the end of the candle it checks: if the price exceeds SL then it exits, if the price exceeds TP then moves to step 4.
4. It closes ½ of the position and moves the other ½ SL to BE. This is the beginning of the TS.
5. It takes a screenshot.
6. At the end of the next candle it checks: if the price exceeds SL then it exits, if the price exceeds SL + (2 * “ATR multiplier for TP”) then moves to step 7.
7. Moves the SL to “ATR multiplier for SL” from the closing of the candle.
8. It takes a screenshot.
9. Repeats from step 6.