scalper ea for xauusd

MT5
v1.0.0
Scalping
scalper ea for xauusd
Type
EA
Platform
MT5
Version
1.0.0
Category
Scalping
Date
11/26/2026
Pricing
Free
Specifications & Verification Summary
Platform
MT5
Version
1.0.0
Minimum Deposit
$1,000
Hedging
Supported / Required
Trading Pairs
XAU/USD
Timeframes
M1, M5, M15, M30, H1, H4
Risk Level
medium
Max Spread
3 pips
Stop Loss
true
Take Profit
true
Martingale
No
Community Rating
No reviews yet
Backtest Metrics
No publisher backtest metrics provided

Description

f0llowup the candle movement on @xauusd.

//+------------------------------------------------------------------+
//| GOLD SNIPING - EMA + BOS risk-managed Expert Advisor |
//| Designed for MetaTrader 5. Test on demo before live trading. |
//+------------------------------------------------------------------+
#property strict
#property version "1.00"
#property description "EMA/BOS entries with capped optional recovery grid and basket risk controls."
#include <Trade/Trade.mqh>
CTrade trade;
enum ENUM_SIGNAL_MODE { EMA_TREND=0, BREAK_OF_STRUCTURE=1, EMA_AND_BOS=2, MA_TREND=3 };
enum ENUM_LOT_SIZE_MODE { STATIC_LOT=0, DYNAMIC_RISK_LOT=1 };
enum ENUM_GRID_LOT_MODE { ADDITION=0, MULTIPLIER=1 };
enum ENUM_GRID_MODE { NORMAL_GRID=0, RECOVERY_GRID=1 };
enum ENUM_CAP_ACTION { HOLD_AT_CAP=0, CLOSE_BASKET_AT_CAP=1 };
enum ENUM_PANEL_THEME { PANEL_DARK=0, PANEL_LIGHT=1 };
enum ENUM_PANEL_SIZING { PANEL_AUTO=0, PANEL_MANUAL=1 };
enum ENUM_DIRECTION_MODE { BOTH_DIRECTIONS=0, BUY_ONLY=1, SELL_ONLY=2 };
input group "SIGNAL SETTINGS"
input ENUM_SIGNAL_MODE SignalMode = EMA_AND_BOS;
input int EMA_Period = 100;
input ENUM_TIMEFRAMES EMA_Timeframe = PERIOD_M15;
input int MA_Period = 21; // Used only by MA_TREND
input int SwingLookback = 5;
input ENUM_TIMEFRAMES SignalTimeframe = PERIOD_M15;
input ENUM_DIRECTION_MODE TradeDirection = BOTH_DIRECTIONS;
input bool UseTrailingStop = true;
input bool TrailOnlyFirstPosition = true;
input int TrailingStartPoints = 1000;
input int TrailingDistancePoints = 300;
input int StopLossPoints = 3000; // 0 disables per-position stop loss
input int TakeProfitPoints = 0; // 0 disables per-position take profit
input bool UseTrendEntryFilter = true;
input bool UseGeometryFilter = true;
input double GeometryRangePercentOfGrid = 50.0;
input group "POSITION SIZING"
input ENUM_LOT_SIZE_MODE LotSizeMode = STATIC_LOT;
input ENUM_GRID_LOT_MODE GridLotMode = ADDITION;
input double InitialLot = 0.01;
input double LotAdditionStep = 0.01;
input double LotMultiplier = 2.0;
input double MaximumLot = 0.10;
input double RiskPercentOfEquity = 1.0; // Used only when LotSizeMode is DYNAMIC_RISK_LOT
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
input group "OPTIONAL GRID (HIGH RISK; OFF BY DEFAULT)"
input bool EnableGrid = false;
input int GridDistancePoints = 1000;
input int MaximumPositions = 3;
input double BasketProfitTarget = 2.0;
input ENUM_GRID_MODE GridMode = NORMAL_GRID;
input double RecoveryPercentOfGrid = 30.0;
input int RecoveryExtraPoints = 100;
input bool UseBreakEvenExit = true;
input int BreakEvenPoints = 50;
input int MinimumTradesForBreakEven = 2;
input bool UseTradeCap = false;
input int MaxTradesPerBasket = 11; // Total order entries in the current basket, including stopped-out entries
input ENUM_CAP_ACTION ActionAtTradeCap = HOLD_AT_CAP;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
input group "RISK LIMITS (ACCOUNT CURRENCY)"
input double MaximumFloatingLoss = 20.0;
input double DailyProfitTarget = 0.0;
input double DailyLossLimit = 20.0;
input bool UseDailyDrawdownPercent = false;
input double DailyDrawdownPercent = 10.0;
input int RestAfterBasketCloseMinutes = 60;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
input group "TRADING SCHEDULE (BROKER SERVER TIME)"
input int StartHour = 1;
input int StopHour = 23;
input int FridayStopHour = 0;
input bool UseTradingTimeFilter = false;
input int FilterStartHour = 8;
input int FilterStartMinute = 0;
input int FilterEndHour = 20;
input int FilterEndMinute = 0;
input group "EXECUTION"
input ulong MagicNumber = 20260810;
input int MaximumDeviationPoints = 20;
input string OrderComment = "GOLD SNIPING EA";
input group "SIGNAL VISUALIZATION AND NOTIFICATIONS"
input bool VisualizeSignals = true;
Publisher-Reported Metrics

No publisher backtest metrics provided. Always test on a demo account before live deployment.

Risk Warning
Trading involves substantial risk of loss. Past performance is not indicative of future results.

Tags

Scalping
Level trading
Expert Advisor type
Reviews

to write a review

No reviews yet. Be the first to review!
Free Download
Community Release
Instant direct download
No coins required
Community release — see license & publisher notes

to download & access