Gold AuriGrid SAR Switch MT5
- Experts
- Version: 1.0
- Activations: 20
### Product Overview
Gold AuriGrid SAR Switch MT5 is an Expert Advisor for MetaTrader 5. It combines a grid branch with a SAR-based Martin Fibonacci branch and uses H1 Parabolic SAR to switch between two trading modes.
The default setup is prepared for XAUUSD M1, but the symbol, timeframe and risk parameters can be adjusted by the user. Hedging accounts are recommended because the EA uses separate long and short branch logic.
### Main Features
1. Dual trading mode
- Mode 1: buy grid + sell Martin Fibonacci branch.
- Mode 2: sell grid + buy Martin Fibonacci branch.
2. H1 SAR mode switching
The EA reads Parabolic SAR on H1 and can switch the active mode according to the higher-timeframe direction.
3. Grid branch
The grid branch opens positions in the selected grid direction. It supports fixed or multiplied lots, maximum position count, maximum total lots, grid spacing, branch take profit and branch stop loss.
4. Martin Fibonacci branch
The Martin branch uses a SAR trend filter for the first order and can use cumulative Fibonacci spacing for additional positions. It includes limits for position count, total lots, margin level and optional fixed-money stop loss.
5. Risk controls
The EA includes spread filtering, slippage setting, current margin checks, projected margin checks, initial stop loss, daily loss stop, equity drawdown stop, total equity take profit and pause after consecutive losses.
6. Logs and chart panel
The EA can print signal, risk and no-entry reasons. The chart panel shows the current mode, H1 SAR status, branch exposure, equity baseline, spread, margin level and risk state.
### Recommended Use
This EA is intended for users who understand grid and Martin-style position management. These methods can increase exposure during adverse market movement. Before live trading, test the EA in the MetaTrader 5 Strategy Tester and adjust all risk settings according to your account size, symbol conditions and broker execution.
### Input Parameters
Basic Runtime
- DisableTrading: signal-only mode without real trading.
- TradeSymbolInput: trading symbol. Empty value uses the chart symbol.
- StartupMode: startup mode selection.
- ResumeSavedModeOnRestart: restore saved mode and equity baselines.
- EnableAutoModeSwitch: enable automatic mode switching by H1 SAR.
- CloseAllOnModeSwitch: close EA positions before switching mode.
- MinSwitchProfitMoney: minimum money profit required for mode switching.
- MinSwitchEquityProfitPercent: minimum equity profit percent required for mode switching.
- MagicNumberBase: base magic number.
- SignalTimeframe: signal timeframe.
- UseClosedBarSignals: use closed bars for indicator signals.
- TradeOnlyOnNewBar: check entries only on a new bar.
- MinSecondsBetweenAnyOrders: global order cooldown.
H1 SAR Routing
- H1SAR_Step: H1 SAR step.
- H1SAR_Max: H1 SAR maximum.
- H1SarShift: H1 SAR bar shift.
- EnableImmediateH1SARSwitch: switch immediately when the H1 SAR target mode changes.
- ShowH1SAROnChart: draw H1 SAR on the chart.
- H1SARPlotBars: number of H1 SAR bars to draw.
- H1SARPlotColor: H1 SAR chart color.
Grid Branch
- EnableGridBranch: enable or disable the grid branch.
- GridOpenInitialImmediately: open the first grid order when no grid position exists.
- GridLot: first grid lot size.
- GridLotMultiplier: lot multiplier for grid additions.
- MaxGridPositions: maximum grid positions.
- MaxGridTotalLots: maximum total grid lots.
- GridStepPoints: grid step in points.
- GridMinSecondsBetweenOrders: cooldown between grid orders.
- EnableGridEquityTakeProfit: enable grid branch equity take profit.
- GridTakeProfitPercent: grid branch take profit percent.
- EnableGridMoneyStopLoss: enable fixed-money grid stop loss.
- MaxGridLossMoney: maximum grid floating loss.
- GridUsePerOrderTakeProfit: use fixed TP for each grid order.
- GridPerOrderTPPoints: per-order grid TP in points.
Martin Fib Branch
- EnableMartinBranch: enable or disable the Martin Fibonacci branch.
- MartinInitialLots: first Martin order lot size.
- MartinMartingaleFactor: Martin lot multiplier.
- MaxMartinPositions: maximum Martin positions.
- MaxMartinTotalLots: maximum total Martin lots.
- MartinBaseAddPrice: base add-on distance in price units.
- MartinUseFibSpacing: use cumulative Fibonacci spacing.
- MaxFibMultiplier: maximum Fibonacci term.
- MartinFibReference: first or latest open price as spacing reference.
- MartinMinSecondsBetweenAdds: cooldown between Martin additions.
- EnableMartinMarginCheck: enable Martin margin level check.
- MartinMinMarginLevelPercent: minimum margin level for Martin orders.
- EnableMartinEquityTakeProfit: enable Martin branch equity take profit.
- MartinTakeProfitPercent: Martin branch take profit percent.
- EnableMartinMoneyStopLoss: enable fixed-money Martin stop loss.
- MaxMartinLossMoney: maximum Martin floating loss.
- MartinUsePerOrderTakeProfit: use fixed TP for each Martin order.
- MartinPerOrderTPPoints: per-order Martin TP in points.
SAR Filter
- UseMartinEntrySAR: enable SAR filter for the first Martin order.
- SAR_Step: SAR step for Martin entry filter.
- SAR_Max: SAR maximum for Martin entry filter.
Execution and Risk
- PreferredFilling: preferred order filling mode.
- DeviationPoints: maximum slippage in points.
- EnableMaxSpreadFilter: enable spread filter.
- MaxSpreadPoints: maximum allowed spread.
- EnableMarginLevelFilter: enable current margin level filter.
- MinCurrentMarginLevelPercent: minimum current margin level.
- CheckProjectedMarginLevel: check margin level after a new order.
- MinProjectedMarginLevelPercent: minimum projected margin level.
- MaxLotsPerOrder: maximum lots per order.
- UseInitialStopLoss: enable initial stop loss.
- InitialStopLossPoints: initial stop loss distance in points.
- UseATRInitialStop: use ATR-based initial stop loss.
- ATRPeriod: ATR period.
- ATRStopMultiplier: ATR stop multiplier.
- EnableDailyLossStop: enable daily loss stop.
- MaxDailyLossPercent: maximum daily loss percent.
- EnableEquityDrawdownStop: enable equity drawdown stop.
- MaxEquityDrawdownPercent: maximum equity drawdown percent.
- EnableTotalEquityTakeProfit: enable total equity take profit.
- TotalEquityTakeProfitPercent: total equity take profit percent.
- CloseAllOnRiskStop: close all EA positions after a risk stop.
- DisableAfterRiskStop: stop new entries after a risk stop.
- EnableConsecutiveLossPause: pause after consecutive losses.
- MaxConsecutiveLosses: number of consecutive losses before pause.
- PauseMinutesAfterLossStreak: pause time in minutes.
- UseTradingSession: enable trading session filter.
- TradeStartHour: trading start hour.
- TradeEndHour: trading end hour.
Logs and Panel
- EnableLogs: enable general logs.
- EnableSignalLogs: enable signal logs.
- EnableSignalReasonLogs: enable no-entry and no-add reason logs.
- EnableDebugLogs: enable debug logs.
- LogThrottleSeconds: repeated log throttle in seconds.
- EnablePanel: enable chart panel.
- PanelCorner: panel corner.
- PanelX: panel X offset.
- PanelY: panel Y offset.
### Risk Notice
This Expert Advisor does not guarantee profit. Grid and Martin-style strategies may create high exposure during strong one-way market movement. Always test the EA first and use conservative risk settings.
