工作已完成
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
BREAKEVEN EA
This EA will not open trades or close trades!
This EA ill move SL to breakeven depending on setting
The EA will use size of SL to determine when to move SL to breakeven
Only 1 trade per chart will be open
Each trade will have a SL otherwise if there is no SL the EA should give an error message “SL Missing!”
The EA will have the settings below;
SL to Breakeven:
Breakeven Plus (pips):
TP1 Line:
TP2 Line:
Spread (pips):
Push Notification: True/False
Screen Alert: True/False
Once the EA is attached to a chart a message on top left corner will display “Breakeven EA Active” to show EA is actively monitoring open trade.
Push Notification/Screen Alert will be generated only when SL is moved to breakeven, message will be “EURUSD SL to BE”.
TP1 Line and TP2 Line are horizontal lines on the chart showing where TP1 and TP2 will be located.
EA WILL NOT CLOSE ANY TRADES!
Spread will be entered manually by the user using Market Watch
Here are some examples;
EA settings: SL to Breakeven = 1, Breakeven plus = 1, TP1 Line = 2, TP2 Line = 3.5, Spread = 2.1
The SL on this trade = 34 pips
REMEMBER ALL CALCULATIONS ARE MADE USING THE SL.
So once the EA is attached to the chart EA will take note that SL = 34 pips
TP1 Line and TP2 Line need to be drawn on the chart
TP1 Line = 2 = (2 x 34) + 2.1 = 70.1 pips
So TP1 line is drawn 70.1 pips away from the entry line
TP2 Line = 3.5 = (3.5 x 34) + 2.1 = 121.1 pips
So TP2 Line is drawn 121.1 pips away from the entry line
SL to Breakeven = 1 x 34 = 34 pips
When trade is 34 pips in profit the EA will move SL to Breakeven plus 1 pip
Another example;
GBPUSD sell trade
EA settings: SL to Breakeven = 2.2, Breakeven plus = 1.5, TP1 Line = 2.8, TP2 Line = 4.6, Spread = 2.8
The SL on this trade = 44 pips
TP1 Line = (2.8 x 44) + 2.8 = 126 pips
TP1 line will be drawn 126 pips below trade entry
TP2 Line = (4.6 x 44) + 2.8 =205.6 pips
TP2 Line will be drawn 205.6 pips below trade entry
SL to Breakeven = 2.2 x 44 = 96.8 pips
So when trade is 96.8 pips in profit EA will move SL to Breakeven plus 1.5 pips
NOTE: If Breakeven Plus = 0 then SL will be moved to trade entry without additional pips in profit
YOUR FEEDBACK/SUGGESTION TO MAKE EA BETTER IS VERY WELCOME!!!!