SmartRisk MA Pro
- Experts
- Oleg Polyanchuk
- Versione: 1.1
- Attivazioni: 5
SmartRisk MA Pro
Strategy Overview:
SmartRisk MA Pro is an optimized, risk-oriented automated trading strategy (Expert Advisor) developed for the MetaTrader 5 platform. It is designed to identify trading opportunities based on price deviations from moving averages and incorporates a comprehensive capital management system. The Expert Advisor operates on a "new bar" logic, ensuring stability and predictability in trade signal execution.
Operating Principles and Trading Logic:
At its core, the strategy analyzes two moving averages: a "Long" Moving Average and a "Short" Moving Average. Each can be configured by period and calculation method (e.g., Simple, Exponential). Dynamic deviation bands are built around these averages using specified percentage values.
-
BUY Signal (Long): Generated when the price breaks below the lower deviation band (determined by the "Long" Moving Average) and then returns back, closing above this band. This indicates a potential bounce or reversal into an uptrend.
-
SELL Signal (Short): Generated when the price breaks above the upper deviation band (determined by the "Short" Moving Average) and then returns back, closing below this band. This signals a possible pullback or reversal into a downtrend.
Trade signals are evaluated only at the opening of a new bar, which eliminates false entries within the current candle and contributes to more stable analysis.
Intelligent Risk Management (SmartRisk):
SmartRisk MA Pro includes a multi-level risk management system designed to protect your capital:
-
Risk per Trade: Lot size is dynamically calculated so that the risk per single trade does not exceed a specified percentage of the current account balance.
-
Maximum Total Risk: The system controls the total risk across all open positions for the current symbol, preventing new trades from being opened if the aggregated risk exceeds a set maximum.
-
Risk-Reward Filtering: Positions are opened only if the calculated risk-reward ratio falls within a specified minimum and maximum range, allowing the filtering out of less favorable trades.
-
Adaptive SL/TP: Stop Loss and Take Profit levels are calculated based on a percentage from the entry price and are automatically adjusted to meet the broker's minimum stop-level requirements.
-
Profit Management: Upon reaching a certain percentage of the target Take Profit (e.g., 75%), the strategy automatically closes a portion of the position volume (e.g., 50%) and moves the Stop Loss of the remaining portion to breakeven (with a configurable buffer in pips), thereby locking in partial profits and eliminating further risks on the trade.
Additional Features:
-
Trade Direction Control: Ability to independently enable or disable trading for long (BUY) and short (SELL) positions.
-
Hedging Setting: Option to allow or disallow simultaneous opening of opposite-direction positions (hedging) for the same symbol.
-
Session Close: A function to automatically close all open positions a specified number of minutes before the end of the trading day (fixed time 23:59), helping to avoid overnight risks or gaps.
Input Parameters:
-
Moving Averages
-
MA_Period_LONG (int): Period for the Long Moving Average.
-
MA_Method_Main (ENUM_MA_METHOD): Calculation method for the main moving average (e.g., MODE_SMA, MODE_EMA).
-
MA_Period_SHORT (int): Period for the Short Moving Average.
-
MA_Method_Upper (ENUM_MA_METHOD): Calculation method for the upper moving average (e.g., MODE_SMA, MODE_EMA).
-
-
Deviations & Trade Logic
-
Deviation_Percent_SHORT (double): Percentage deviation for the short MA to define the upper band.
-
Deviation_Percent_LONG (double): Percentage deviation for the long MA to define the lower band.
-
-
Trade Direction Control
-
EnableLongTrades (bool): Enable trading of BUY (long) positions.
-
EnableShortTrades (bool): Enable trading of SELL (short) positions.
-
AllowHedging (bool): Allow simultaneous opening of BUY and SELL positions for the same symbol.
-
-
Long Position Settings
-
LongStopLossPercent (double): Stop Loss percentage for long positions (from entry price).
-
LongTakeProfitPercent (double): Take Profit percentage for long positions (from entry price).
-
-
Short Position Settings
-
ShortStopLossPercent (double): Stop Loss percentage for short positions (from entry price).
-
ShortTakeProfitPercent (double): Take Profit percentage for short positions (from entry price).
-
-
Position Sizing & Risk
-
RiskPerTradePercent (double): Percentage of account balance to risk per trade (e.g., 1.0 = 1%).
-
MaxRiskPercent (double): Maximum total risk as a percentage of account balance across all open positions.
-
MinRiskReward (double): Minimum allowed risk-reward ratio (e.g., 1.5 = 1:1.5 RR).
-
MaxRiskReward (double): Maximum allowed risk-reward ratio (e.g., 5.0 = 1:5 RR, for filtering unrealistic TP).
-
-
Session Close Settings
-
EnableSessionClose (bool): Enable closing positions at a specific time daily.
-
CloseMinutesBeforeEnd (int): Number of minutes before the end of the trading session to close positions.
-
-
Profit Management
-
EnableProfitTakingLogic (bool): Enable profit management logic (partial close and breakeven).
-
ProfitCloseRatio (double): Volume ratio for partial closing (e.g., 0.5 for 50%).
-
ProfitCloseTriggerPercent (double): Percentage of distance to Take Profit to activate partial closing AND moving SL to breakeven (e.g., 0.75 for 75%).
-
BreakEvenPipsBuffer (int): Buffer in pips for Stop Loss at breakeven (e.g., 50 pips).
-
-
Optimization Settings
-
EnableLogging (bool): Enable/Disable detailed logging for optimization (set to false for speed).
-
MagicNumber (ulong): Magic number for order identification.
-
Conclusion:
SmartRisk MA Pro offers a combination of proven analysis methods and strict capital management rules, making it a powerful tool for automated trading. We are continuously working to improve and adapt the strategy to changing market conditions.
