Samurai sun
- Experts
- Saiful Izham Bin Hassan
- Version: 1.0
- Activations: 10
Samurai Sun is an advanced algorithmic trading system designed for modern forex and precious metals markets. It combines a robust trend-following engine with dynamic, institutional-grade risk management. The system is engineered to protect capital while maximizing trend capture through adaptive trailing stops and partial close mechanics.
The Expert Advisor uses a combination of Moving Averages, RSI, and MACD to filter market noise and identify high-probability entry points. It operates fully automatically and features a built-in interactive dashboard to monitor daily performance and risk metrics in real-time.
Key Advantages
- Multi-layered Risk Management: Choose from Fixed Lot, Risk Percentage, Anti-Martingale, or Volatility-Adjusted sizing.
- Adaptive Trade Management: Features ATR-based trailing stops, step-based profit trailing, and break-even protections.
- Spread and Freeze Level Protection: Automatically calculates dynamic safety buffers to protect orders during periods of high volatility or widened spreads.
- Partial Profit Taking: Secure a percentage of your position once a predefined risk-to-reward ratio is achieved.
- Integrated Time and News Filters: Automatically pauses trading during specified hours, specific days, or high-impact news events.
Input Parameters
Money Management Settings
- MoneyMode: Choose the lot sizing method (Fixed Lot, Risk Percent, Anti-Martingale, Volatility Adjusted, Martingale).
- FixLot: Fixed lot size (if Fixed Lot mode is selected).
- RiskPercent: Percentage of free margin to risk per trade.
- MaxMartingaleLevels: Maximum consecutive losses before resetting the lot multiplier.
- MartingaleMultiplier: Lot size multiplier after a loss.
- AntiMartingaleConsecutiveWins: Wins required before increasing lot size.
- AntiMartingaleMultiplier: Lot size multiplier after consecutive wins.
Core Trading Settings
- MagicNumber: Unique identifier for the EA's trades.
- StopLossPips: Initial Stop Loss distance in pips.
- MaxSpreadPips: Maximum allowed spread to open a trade.
Break-Even and Partial Close
- UseBreakEven: Enable or disable break-even protection.
- BreakEvenTriggerPips: Profit in pips required to trigger break-even.
- BreakEvenLockPips: Pips to lock in profit when break-even is triggered.
- UsePartialClose: Enable closing a portion of the trade at a specific target.
- TP1_RR: Risk-to-Reward ratio to trigger the partial close.
- TP1_Percent: Percentage of the total lot size to close at the target.
Trailing Stop Settings
- UseATRTrailing: Enable ATR-based dynamic trailing stop.
- TrailingStopATR: Multiplier for the ATR trailing stop distance.
- UseTrailingProfit: Enable step-based profit trailing.
- TrailTrigger1 / TrailStep1: First tier of profit trailing trigger and step distance.
- TrailTrigger2 / TrailStep2: Second tier of profit trailing trigger and step distance.
- TrailTrigger3 / TrailStep3: Third tier of profit trailing trigger and step distance.
Indicator and Signal Settings
- FastEMA_Period: Period for the fast moving average.
- SlowEMA_Period: Period for the slow moving average.
- RSI_Period: Period for the RSI indicator.
- RSI_Overbought / RSI_Oversold: Thresholds for RSI filtering.
- MACD_Fast / MACD_Slow / MACD_Signal: Parameters for the MACD filter.
Session and Time Filters
- StartHour / StopHour: Primary trading session hours.
- UseSecondSession: Enable a secondary trading session.
- StartHour2 / StopHour2: Secondary trading session hours.
- TradeMonday / TradeFriday: Enable or disable trading on Mondays and Fridays.
- CloseAllOnLimit: Automatically close all positions if the daily loss limit is hit.
Setup Instructions
- Attach the Expert Advisor to a chart (recommended timeframe: H1 or D1).
- Ensure Auto Trading is enabled in the MetaTrader 5 terminal.
- Configure your preferred Money Management settings based on your account size.
- If using the News Filter, ensure web requests are allowed for the economic calendar in your terminal settings.
Support is provided exclusively via the MQL5 comments section and the built-in MQL5 messaging system.
