작업 종료됨
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
명시
New EA similarities to previous build
- EA trades based on upcoming Economics Events (as already built)
- EA open trades based on dots of PSAR (as already built)
- Logic of trade is based on martingale (as already built)
NEW Logic of Trading:
a. EA waits for upcoming news, and based on time and news filter will open trade based on action of price on PSAR (as already built)
b. EA opens long or short position based on direction of PSAR (as already built)
Major Difference between Old and New Logic
c. If EA opens a long position (position A) as shown in diagram below (red-dot), it will place TP (TP-A) at the position equal to the distance of new PSAR dot (as already built),
but instead of placing SL (SL-A) at the new position of PSAR dot, it will rather place a SellStop Pending order (trade-B) with Martingale multiplier.
Therefore, SL for trade-A will be x2 of what initially should have been; and TP for trade-B will be at same price SL-A (see diagram)
Entry point is marked in big-dot-red (point where psar-dot switched)
d. So if trade-B is triggered, immediately a 3rd pending order (buy-stop) position will be placed at same point were trade-A started. Therefore, if trade-B did not reach TP, and price reverses to trigger Trade-C, a 4th pending-order (sell-stop) position will be placed at same position were trade-B was triggered, and so on, and so on, using martingale multiplier.
e. So martingale logic will play out, and keep multiplying trades, until either TP or SL of any of the opened positions is reached.
f. PLEASE NOTE that, if price touches any of TP or SL of any of the opened positions, EA should FORCE-CLOSE ALL OPENED TRADES IMMEDIATELY (very important please)
g. Last trade should try and achieve breakeven (or minimal loss). What this means is that if for example, user sets EA parameter = Maximum open trades/cycle = 5
And at 4th trade, price did not reach TP of the 4th trade but goes on to trigger this 5th trade, the value of lot size for 5th trade should be such that it equalizes total long position and short position (like a hedged)
or please you can share your idea on how best to achieve minimal loss when this scenario is reached).
Thank you.