I need an EA cutting loss positions every specific timeframe, if a specified (balance - equity)/balance % is reached.
Parameters should be the following:
| N° | Description | Value | Explanation |
|---|---|---|---|
| 1 | Execution Time Interval | M1, M5, M15, and so on | The TF at which EA performs controls |
| 2 | Max Drawdown % | % choosen by me (i.e. 5%, 10%, 12.5% and so on) | The Drawdown % over which EA starts to cut positions at loss |
| 3 | Minimum Margin Level % | % choosen by me (i.e. 5%, 10%, 12.5% and so on) | The Margin Level % down which EA starts to cut positions at loss |
| 4 | Trades to cut | digit valut (i.e. 1, 2, 3 and so on) | The number (1,2,3...) of deals to be cutted each time if: 1) Current Drawdown % > Max Drawdown % OR: 2) Current Margin Level % < Minimum Margin Level % (it is important that, if only one of previous parameter is matched, EA performs the cuts number established) |
| 5 | Deals to cut | 1) The oldest 2) The youngest 3) The Lowest loss (absolute value in dollars, euros etc.) 4) The Greatest loss (absolute value in dollars, euros etc.) | 1) EA cuts the oldest position (day/hour/minute) accordingly to number in point 4 2) EA cuts the youngest position (hour/date) accordingly to number in point 4 3) EA cuts the position with lowest loss accordingly to number in point 4 4) EA cuts the position with greatest loss accordingly to number in point 4 |
Suppose the following EA setup:
Execution time interval 5M
Use minimum margin as trigger? true
Minimum Margin for execution 500 (i.e. 500% margin level)
Maximum Drawdown percentage 10 (i.e. 10%)
Number of trades to cut 2
Amount to close 0
Deals to close Oldest
After several trades, EA triggers one of the following 4 scenarios. Then, EA performs the action described in capital letters:
===A===
1) Minimum Margin for Execution 600%
2) Maximum Drawdown Percentage 5%
EA DO NOT PERFORM ANY CUT
===B===
1) Minimum Margin for Execution 600%
2) Maximum Drawdown Percentage 15%
EA PERFORMS 2 CUTS
===C===
1) Minimum Margin for Execution 400%
2) Maximum Drawdown Percentage 5%
EA PERFORMS 2 CUTS
===D===
1) Minimum Margin for Execution 400%
2) Maximum Drawdown Percentage 15%
EA PERFORMS 2 CUTS
This means that: if only one parameter (Minimum margin for execution or Maximum Drawdown percentage) is triggered, then EA performs the cuts setuped.
If both parameters are respected (simultaneously) EA do not cuts.
Please also consider that:
Deals to be cutted comes from another EA.