RiskProtect MT5
- Utilitários
- MASTERBROK NEXUS SRL
- Versão: 1.0
- Ativações: 20
Parameters Explained
Algorithm Settings:
-
magicNumber (int):
- Unique identifier for trades managed by the EA.
- Default value: 0 (manages manual trades).
- Note: Set this to the corresponding magic number of trades opened by other EAs or set it to 0 for manually executed trades.
-
BreakEvenInPoints (bool):
- Activates the breakeven strategy based on profit in points.
- true: Moves Stop Loss to breakeven when the trade reaches the specified ProfitPointsForBreakeven .
- false: Disables this function.
-
ProfitPointsForBreakeven (int):
- Number of points in profit required to move Stop Loss to breakeven.
- Default value: 500 .
-
BreakevenInRiskReward (bool):
- Activates breakeven logic based on a risk-reward ratio.
- true: Stop Loss moves to breakeven when the profit equals the risk times the RiskReward .
- false: Disables this function.
-
RiskReward (double):
- Specifies the risk-reward ratio for the breakeven logic.
- Default value: 1 (breakeven at a 1:1 risk-reward ratio).
Risk Management Settings:
-
PercentageClose (double):
- Percentage of the total position volume to close when breakeven criteria are met.
- Default value: 80 (80% of the position is closed).
- Notes:
- If set to 100 , the entire position is closed.
- If set to 0 , no partial closure occurs.
-
NumberPointsAboveBreakEven (int):
- Number of points above the breakeven level to set the new Stop Loss after partial closure.
- Default value: 10 .
- Notes:
- If set to 0 , the Stop Loss is set exactly at breakeven.
Testing Parameters (For Strategy Tester):
-
inpStopLossSizePointsTest (int):
- Simulated Stop Loss size in points for backtesting.
- Default value: 500 .
-
inpTakeProfitSizePointsTest (int):
- Simulated Take Profit size in points for backtesting.
- Default value: 1000 .
-
inpVolumeTest (double):
- Simulated trade volume for backtesting.
- Default value: 1.0 .
How the EA Works
-
Trade Identification:
- The EA identifies trades based on the magicNumber .
- Trades with the specified magic number or manual trades (magic number = 0) are managed.
-
Breakeven Management:
- If BreakEvenInPoints is enabled, the EA moves the Stop Loss to breakeven when the trade reaches the profit threshold defined by ProfitPointsForBreakeven .
- If BreakevenInRiskReward is enabled, the Stop Loss moves to breakeven when the profit reaches the risk times the RiskReward ratio.
-
Partial Closure:
- Once breakeven criteria are met, the EA closes a portion of the trade volume based on PercentageClose .
- The remaining position's Stop Loss is adjusted by adding NumberPointsAboveBreakEven points above the breakeven level.
-
Profit and Risk Management:
- Ensures profits are secured while allowing the remaining position to run.
- Dynamically adjusts Stop Loss levels to protect the remaining trade.
Key Notes and Warnings
- If both BreakEvenInPoints and BreakevenInRiskReward are set to false , the EA will automatically disable itself.
- Ensure that a Stop Loss ( SL ) and Take Profit ( TP ) are set for all trades; otherwise, the EA will not manage the positions.
- Verify NumberPointsAboveBreakEven is within a reasonable range (not exceeding TP or contradicting the market price).
This EA provides robust trade management, combining breakeven strategies and partial closure to enhance profitability while minimizing risk.