Pipsgrowth EX14005 Scalper
MT5 Expert Advisor (Open Source) · XAUUSD · M5
Pipsgrowth.com EX14005 XAUUSD Scalper — multi-filter gold scalper, full 12-layer stack.
Overview
EX14005 is a multi-confirmation XAUUSD scalper whose logic revolves around an eight-handle indicator stack voting against an adaptive threshold on every new bar of the configured timeframe. The MQL5 source builds four mandatory handles in OnInit — a fast EMA(8), a slow EMA(21), an RSI(14), and an ATR(14) — and adds four more only if their respective filter booleans are true: Bollinger Bands(20, 2.0), Stochastic(14, 3, 3), MACD(12, 26, 9), and Volumes with VOLUME_TICK over a 20-bar window. The Trade.mqh library's CTrade is set up with magic 22214005, a 30-point deviation, and ORDER_FILLING_FOK before any of the handles are requested, and a single CTrade instance is reused for the partial-close and modify paths via three retry helpers (TryClose_EX14005, TryClosePartial_EX14005, TryModify_EX14005) that loop three times on REQUOTE/TIMEOUT/PRICE_OFF/PRICE_CHANGED with a 200ms Sleep — TryModify_EX14005 only retries on REQUOTE/TIMEOUT, not price changes. ValidateInputs runs a hard pre-flight: RiskPercent must be in (0, 5], StopLoss in [50, 1000] points, TakeProfit in [50, 2000] points, MaxTrades in [1, 10], otherwise the EA refuses to start with INIT_PARAMETERS_INCORRECT.
The signal engine in GetTradingSignal is a seven-source voting system. The first vote is the MA crossover: a buy fires when FastEMA[0] > SlowEMA[0] AND FastEMA[1] <= SlowEMA[1] — a two-bar cross confirmation, not a single-bar break — and a sell is the mirror. A second MA-based path adds a vote when price sits above the slow EMA and the fast EMA is rising, or below the slow EMA and falling, so the EA can still register a directional bias even if the strict crossover missed on this bar. The third source is the candle on bar 1: close[1] > open[1] counts for buy, close[1] < open[1] counts for sell. The fourth is RSI(14): a buy needs RSI[0] < 65 (not overbought) OR RSI[0] < inp_RSI_Oversold (default 30), and a sell needs RSI[0] > 35 (not oversold) OR RSI[0] > inp_RSI_Overbought (default 70) — both the neutral-band and the extreme reading contribute the same single vote, so the EA never gets two RSI votes on the same bar. The remaining three votes come from GetBollingerBandsConfirmation, GetStochasticConfirmation, and GetMACDConfirmation, each of which returns +1, 0, or -1 depending on whether the price is breaking out of the bands, whether Stochastic is crossing inside the adaptive oversold/overbought band, or whether the MACD main line is crossing its signal. GetVolumeConfirmation then runs a separate veto: it compares the current tick volume to a 20-bar average, and if the ratio is below 0.3 (very low volume) it sets both the buy and sell confirmation counts to zero, blanking every other vote — the EA will not open a position into a dead market even if six other filters all agree.
The number of confirmations required is not a constant — it is computed by GetAdaptiveSignalStrength, which reads the current market condition from a five-state classifier maintained by UpdateMarketCondition. The classifier compares the current ATR(14) value against a three-bar ATR average and the spread between the fast and slow EMAs against the prior bar's high-low range, and assigns one of: MARKET_VOLATILE (ATR > 1.5x average), MARKET_QUIET (ATR < 0.7x average), MARKET_TRENDING_UP or MARKET_TRENDING_DOWN (trend ratio > 0.3, plus MA sign), or MARKET_RANGING (the default). GetAdaptiveSignalStrength then takes the base inp_SignalSensitivity — 1 for High sensitivity, 2 for Medium, 3 for Low — and adjusts it: +1 in volatile markets (need more votes to fire), -1 in quiet markets or trending markets (need fewer votes), unchanged in ranging. The result is the threshold the buyConfirmations and sellConfirmations totals are compared against, so the EA's hit-rate and frequency shift with the detected regime without any parameter change from the user.
A trade that passes the signal gate goes to OpenPosition, which calls CalculateLotSize. When inp_FixedLotSize is 0 (the default), the lot is derived from account balance times inp_RiskPercent (default 1.5%) divided by stop-loss points times the symbol's per-point tick value, then rounded to the broker's volume step and clamped to the broker's min and max lot. If inp_UseMartingale is true and g_ConsecutiveLosses is positive, the risk amount is multiplied by inp_MartingaleMultiplier^losses (default 1.5) and capped at 10% of balance. The stop loss and take profit are passed to g_Trade.PositionOpen as hard broker-side orders: SL is 150 points (1.50 on 2-decimal XAUUSD) and TP is 300 points (3.00), giving a 1:2 reward-to-risk asymmetry. The trade is then tagged with comment Psgrowth.com Expert_14005. The order can only fire when CanOpenNewPosition returns true, which requires CountPositions (a magic- and symbol-filtered iteration over PositionsTotal) to be below inp_MaxTrades (default 2), TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) to be set, and the symbol to be tradeable.
ManagePositions runs every new bar on each matching position and chains three management layers. ApplyPartialClose computes the half-TP target as inp_TakeProfit * 0.5 (150 points), and once the position's profit in points reaches that target it closes inp_PartialClosePercent of the volume (default 50%) through TryClosePartial_EX14005. ApplyBreakEven waits for profit >= inp_BreakEvenPoints (default 100 points) and then calls TryModify_EX14005 to slide the stop loss to the entry price, locking the trade at zero risk. ApplyTrailingStop activates only after the position is in profit by at least inp_TrailingStop (default 100 points) and ratchets the stop loss in increments of inp_TrailingStep (default 20 points) — the new stop must be at least 20 points above the previous stop to fire, which prevents thrashing on every tick. The trailing direction is direction-aware: for a buy, the new SL is bid minus 100 points; for a sell, the new SL is ask plus 100 points. The three layers overlap cleanly because each one is guarded by its own input enable flag, so the user can disable partial close or break-even without breaking trailing.
The market gate that sits in front of every signal check is IsMarketConditionsSuitable, which combines five sub-checks. IsSpreadAcceptable rejects bars where SymbolInfoInteger(_Symbol, SYMBOL_SPREAD) is above inp_MaxSpread (default 50 points = 5 pips on 5-digit gold). IsVolatilityAcceptable rejects bars where ATR(14) is outside the [inp_MinATR, inp_MaxATR] window (defaults 0.5 to 15.0 XAUUSD dollars) — the lower bound filters out quiet, low-edge bars and the upper bound filters out news spikes where the spread is wide and slippage is likely. IsTradingTime applies a session filter in server time, not GMT: London is 8-17, New York is 13-22, Asian is 1-7, and the three toggles inp_TradeLondonSession, inp_TradeNewYorkSession, inp_TradeAsianSession decide which of these windows is permitted. The default config — London on, New York on, Asian off — makes the EA active through most of the tradable weekday except the Asian range. IsTradingTime also blocks the rollover hour (23:00 to 00:00) and Friday after 21:00. IsDrawdownAcceptable computes (balance - equity) / balance * 100 and blocks new entries when it exceeds inp_MaxDrawdown (default 15%). IsNewsTime, when inp_AvoidNews is true, blocks entries on the first Friday of each month between 12:00 and 16:00 server time, which is a simplified proxy for the US NFP release — note that inp_AvoidNews is false by default, so the news filter is dormant unless the user enables it. OnTradeTransaction then updates g_ConsecutiveLosses by inspecting HistoryDealGetDouble(trans.deal, DEAL_PROFIT) whenever a deal closes for the EA's magic, incrementing on a loss and resetting to zero on a win, which is the input the Martingale sizing path reads.
What to expect in practice: this is a confirmation-stacked short-horizon EA, not a martingale-on-by-default grid, but the source has the same code-generation signature as other recent EX14 family builds — MapTimeframeInt and MapAppliedPriceInt are duplicated six times each across the input sections, and the EA_NAME constant sits next to the same constant strings as its siblings. The compile will fold the duplicates cleanly, but the redundancy is a tell that this is a template-built scalper rather than a hand-tuned one. The default timeframe setting inp_Timeframe = 4 resolves through MapTimeframeInt to PERIOD_M30 even though the file header advertises M5, so live deployment should verify the chart period matches the intended signal cadence. On a typical gold tick with 1.5% risk, a winning trade nets roughly 4.5% of the SL distance in R-multiple terms at 1:2 RR; the partial-close layer at 50% of TP means the EA realizes about half the target profit in cash and lets the remaining half run into the trailing stop, which is a common compromise between locking profit and giving the trade room to extend. The recommended balance floor is the documented $100 — the EA does not enforce a minimum in OnInit — but a realistic expectation for the trailing logic to do useful work is closer to $1,000 on a sub-30-point-spread broker, because the 100/20 trailing parameters will not engage meaningfully on cent accounts where the absolute point movement is small relative to spread costs.
Strategy Deep Dive
EX14005 builds eight indicator handles in OnInit — a fast EMA(8), a slow EMA(21), an RSI(14), an ATR(14), plus optional Bollinger Bands(20, 2.0), Stochastic(14, 3, 3), MACD(12, 26, 9), and tick Volumes — and on every new bar of the selected timeframe it pulls 10 bars of each into pre-allocated buffers via CopyBuffer. UpdateMarketCondition then classifies the bar into one of five states (TRENDING_UP, TRENDING_DOWN, RANGING, VOLATILE, QUIET) using ATR-vs-3-bar-avg and the fast/slow EMA spread versus the prior bar's range. GetTradingSignal tallies seven vote sources — MA crossover, MA direction, candle direction, RSI position, Bollinger band position, Stochastic adaptive cross, MACD crossover — into buy and sell confirmation counts, then GetVolumeConfirmation either adds a vote (ratio > 1.2), vetoes the whole signal (ratio < 0.3), or stays neutral, after which the counts are compared against GetAdaptiveSignalStrength, which adjusts the base inp_SignalSensitivity (1 to 3) by ±1 based on the market state. OnTick then chains IsMarketConditionsSuitable (spread, session, ATR band, drawdown, news) → ManagePositions (partial close + break-even + trailing on each position matching magic 22214005) → CanOpenNewPosition → OpenPosition, which calls CalculateLotSize for 1.5%-risk sizing with optional Martingale (1.5x per consecutive loss, capped at 10% of balance) and passes the order through g_Trade.PositionOpen with the 150 / 300 hard SL / TP. All modify and partial-close paths route through TryModify_EX14005 and TryClosePartial_EX14005, which retry up to three times on REQUOTE / TIMEOUT / PRICE_OFF / PRICE_CHANGED.
A long entry requires the FastEMA(8) to cross above the SlowEMA(21) over two bars (FastEMA[0] > SlowEMA[0] AND FastEMA[1] <= SlowEMA[1]), with RSI(14) confirming by staying below 65 or in oversold territory below 30, and the total buy-confirmation count from MA bias, candle direction, Bollinger Bands, Stochastic, MACD, and volume must meet the adaptive threshold returned by GetAdaptiveSignalStrength — typically 1 vote in quiet or trending markets, 2 votes in ranging markets, 3 votes in volatile markets. Volume veto: if the current tick volume is below 30% of the 20-bar average, both buy and sell counts are zeroed and no trade fires. A short entry is the mirror, with the bearish candle (close[1] < open[1]) and the BB / Stochastic / MACD votes flipped to negative.
Three-stage management runs on every new bar via ManagePositions. ApplyPartialClose closes 50% of the position volume once profit reaches 50% of the take-profit target (150 points on a 300-point TP). ApplyBreakEven moves the stop loss to the entry price once profit exceeds 100 points. ApplyTrailingStop then ratchets the stop by 20-point steps once profit exceeds 100 points beyond the current stop (or entry if no break-even fired yet). All three modify / partial-close calls go through TryModify_EX14005 and TryClosePartial_EX14005, which retry up to three times on REQUOTE / TIMEOUT / PRICE_OFF / PRICE_CHANGED with a 200ms Sleep. There is no time-based exit and no reverse-signal exit — the only path to closing a position is the broker-side TP, the partial-close, the break-even stop, or the trailing stop.
Hard broker-side stop loss of 150 points (1.50 on 2-decimal XAUUSD) is attached to every order at open via g_Trade.PositionOpen. Once profit reaches 100 points, ApplyBreakEven slides the SL to the entry price (zero-risk). ApplyTrailingStop then ratchets the SL in 20-point steps as profit extends. The global drawdown gate at 15% via IsDrawdownAcceptable blocks new entries only — it does not flatten open positions.
Take profit is 300 points (3.00 on 2-decimal XAUUSD) set as a hard broker-side TP at order open, giving a 1:2 reward-to-risk against the 150-point SL. ApplyPartialClose additionally realizes 50% of the position volume in cash once profit reaches 150 points (50% of the TP target), so on a typical winner the EA banks roughly half the TP into realized P&L and lets the remainder ride into the trailing stop or the full TP, whichever fires first.
Minimum recommended balance is the documented $100 (the EA does not enforce a minimum in OnInit), but a realistic working balance for the trailing logic to engage meaningfully is $1,000 or more, because the 100/20 trailing parameters need real movement in points to ratchet. The default timeframe is M30 (resolved from inp_Timeframe=4 via MapTimeframeInt, not the M5 the file header advertises), the max-spread gate is 50 points (5 pips on 5-digit), and the session filter defaults to London 8-17 server time and New York 13-22 server time, with Asian and Friday-after-21:00 disabled — so the EA is calibrated for a gold trader running on an ECN or RAW-spread broker with sub-30-point typical spreads during the London / New York overlap, who wants confirmation-stacked entries (typically 2-3 votes met out of 7 possible sources) over single-crossover signals and is comfortable with the 1.5% default risk per trade plus the optional 1.5x Martingale.
Strategy Logic
Pipsgrowth EX14005 Scalper — Strategy Logic Analysis (from .mq5 source)
Family: Scalper
Magic: 22214005
Version: 2.00
BRIEF:
XAUUSD scalper using Fast/Slow MA crossover with RSI, ATR, Bollinger Bands, Stochastic, MACD, and volume multi- confirmation filters. Includes session filtering, partial profit taking, break-even, trailing stops, and drawdown control
INDICATOR STACK:
- Standard
MT5indicators
KEY FUNCTIONS:
ValidateInputs()InitializeIndicators()IsNewBar()UpdateIndicators()IsMarketConditionsSuitable()IsSpreadAcceptable()IsTradingTime()IsVolatilityAcceptable()IsDrawdownAcceptable()IsNewsTime()CanOpenNewPosition()CountPositions()- ...and 16 more
INTERNAL CONSTANTS (0 total):
INPUT PARAMETERS (45 total across 6 groups):
- [=== Trading Strategy ===]
inp_Timeframe= 4 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Scalping Timeframe - [=== Trading Strategy ===]
inp_FastMA= 8 // Fast Moving Average Period - [=== Trading Strategy ===]
inp_SlowMA= 21 // Slow Moving Average Period - [=== Trading Strategy ===]
inp_RSI_Period= 14 //RSIPeriod - [=== Trading Strategy ===]
inp_RSI_Oversold=30.0//RSIOversold Level - [=== Trading Strategy ===]
inp_RSI_Overbought=70.0//RSIOverbought Level - [=== Trading Strategy ===]
inp_ATR_Period= 14 //ATRPeriod for Volatility - [=== Risk Management ===]
inp_RiskPercent=1.5// Risk Percentage perTrade(1-3%) - [=== Risk Management ===]
inp_FixedLotSize=0.0// Fixed LotSize(0 = Auto Calculation) - [=== Risk Management ===]
inp_StopLoss= 150 // StopLoss(points) - [=== Risk Management ===]
inp_TakeProfit= 300 // TakeProfit(points) - [=== Risk Management ===]
inp_TrailingStop= 100 // TrailingStop(points) - [=== Risk Management ===]
inp_TrailingStep= 20 // TrailingStep(points) - [=== Risk Management ===]
inp_MaxTrades= 2 // Maximum Concurrent Trades - [=== Risk Management ===]
inp_MaxDrawdown=15.0// Maximum Drawdown Percentage - [=== Market Conditions ===]
inp_MaxSpread= 50 // MaximumSpread(points) - [=== Market Conditions ===]
inp_MinATR=0.5// MinimumATRforTrading(XAUUSDdollars) - [=== Market Conditions ===]
inp_MaxATR=15.0// MaximumATRforTrading(XAUUSDdollars) - [=== Market Conditions ===]
inp_TradeLondonSession=true// Trade London Session - [=== Market Conditions ===]
inp_TradeNewYorkSession=true// Trade New York Session - [=== Market Conditions ===]
inp_TradeAsianSession=false// Trade Asian Session - [=== Market Conditions ===]
inp_AvoidNews=false// Avoid NewsTrading(disabled for testing) - [=== Multi-Confirmation Filters ===]
inp_UseVolumeFilter=true// Use Volume Confirmation - [=== Multi-Confirmation Filters ===]
inp_UseBollingerBands=true// Use Bollinger Bands Filter - [=== Multi-Confirmation Filters ===]
inp_UseStochastic=true// Use Stochastic Filter - [=== Multi-Confirmation Filters ===]
inp_UseMACDFilter=true// UseMACDFilter - [=== Multi-Confirmation Filters ===]
inp_UseAdaptiveFilters=true// Use Adaptive Market Condition Filters - [=== Multi-Confirmation Filters ===]
inp_SignalSensitivity= 1 // SignalSensitivity(1=High, 2=Medium, 3=Low) - [=== Multi-Confirmation Filters ===]
inp_VolumePeriod= 20 // Volume Average Period - [=== Multi-Confirmation Filters ===]
inp_BBPeriod= 20 // Bollinger Bands Period - [=== Multi-Confirmation Filters ===]
inp_BBDeviation=2.0// Bollinger Bands Deviation - [=== Multi-Confirmation Filters ===]
inp_StochKPeriod= 14 // Stochastic %K Period - [=== Multi-Confirmation Filters ===]
inp_StochDPeriod= 3 // Stochastic %D Period - [=== Multi-Confirmation Filters ===]
inp_StochSlowing= 3 // Stochastic Slowing - [=== Multi-Confirmation Filters ===]
inp_MACDFast= 12 //MACDFastEMA - [=== Multi-Confirmation Filters ===]
inp_MACDSlow= 26 //MACDSlowEMA - [=== Multi-Confirmation Filters ===]
inp_MACDSignal= 9 //MACDSignal Line - [=== Advanced Features ===]
inp_UsePartialClose=true// Use Partial Profit Taking - [=== Advanced Features ===]
inp_PartialClosePercent=50.0// Partial Close Percentage - [=== Advanced Features ===]
inp_UseBreakEven=true// Use Break Even - [=== Advanced Features ===]
inp_BreakEvenPoints= 100 // Break Even Points - [=== Advanced Features ===]
inp_UseMartingale=false// UseMartingale(Risky) - [=== Advanced Features ===]
inp_MartingaleMultiplier=1.5// Martingale Multiplier - [=== Identity ===]
InpMagicNumber=22214005// MagicNumber(222xxx) - [=== Identity ===]
InpTradeComment= "Psgrowth.com Expert_14005" // Trade comment
// Pipsgrowth EX14005 Scalper — Execution Flow (from source analysis)
// Family: Scalper
// XAUUSD scalper using Fast/Slow MA crossover with RSI, ATR, Bollinger Bands, Stochastic, MACD, and volume multi- confirmation filters. Includes session filtering, partial profit taking, break-even, trailing stops, and drawdown control
ON_INIT:
Create indicator handles: standard set
Initialize state variables
Detect broker GMT offset
ON_TICK:
1. Refresh indicator buffers (closed-bar shift=1)
2. Manage existing positions:
- Break-even check
- ATR trailing stop
- Profit lock ratchet
- Time-based exit
- Opposite-signal exit
3. If new bar:
a. ClassifyRegime() — ADX/ATR/BB regime detection
b. NoTradeGate() checks:
- Market open + session filter
- Spread limit
- Cooldown after loss
- Consecutive loss limit
- Kill switch
- Max drawdown
- Max concurrent positions
- Daily/weekly loss limits
c. GenerateSignal() — strategy-specific entry logic
d. CheckConfirm() — HTF alignment + R:R + ADX minimum
e. Calculate position size from risk %
f. Execute with retry logic
g. Mark bar to prevent duplicates
ON_TESTER:
Custom fitness = weighted(RecoveryFactor, ROI, ProfitFactor, TradeCount, Sharpe, Drawdown)Optimization Profile
How to Install This EA on MT5
- 1Download the .mq5 file using the button above
- 2Open MetaTrader 5 on your computer
- 3Click File → Open Data Folder in the top menu
- 4Navigate to MQL5 → Experts and paste the .mq5 file there
- 5In MT5, right-click Expert Advisors in the Navigator panel → Refresh
- 6Drag the EA from the Navigator onto any chart (M1 or M5 recommended)
- 7In the EA dialog, enable Allow Algo Trading and set your lot size
- 8Click OK — the EA will begin trading automatically
EA Parameters
| Parameter | Default | Description |
|---|---|---|
| inp_Timeframe | 4 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Scalping Timeframe |
| inp_FastMA | 8 | Fast Moving Average Period |
| inp_SlowMA | 21 | Slow Moving Average Period |
| inp_RSI_Period | 14 | RSI Period |
| inp_RSI_Oversold | 30.0 | RSI Oversold Level |
| inp_RSI_Overbought | 70.0 | RSI Overbought Level |
| inp_ATR_Period | 14 | ATR Period for Volatility |
| inp_RiskPercent | 1.5 | Risk Percentage per Trade (1-3%) |
| inp_FixedLotSize | 0.0 | Fixed Lot Size (0 = Auto Calculation) |
| inp_StopLoss | 150 | Stop Loss (points) |
| inp_TakeProfit | 300 | Take Profit (points) |
| inp_TrailingStop | 100 | Trailing Stop (points) |
| inp_TrailingStep | 20 | Trailing Step (points) |
| inp_MaxTrades | 2 | Maximum Concurrent Trades |
| inp_MaxDrawdown | 15.0 | Maximum Drawdown Percentage |
| inp_MaxSpread | 50 | Maximum Spread (points) |
| inp_MinATR | 0.5 | Minimum ATR for Trading (XAUUSD dollars) |
| inp_MaxATR | 15.0 | Maximum ATR for Trading (XAUUSD dollars) |
| inp_TradeLondonSession | true | Trade London Session |
| inp_TradeNewYorkSession | true | Trade New York Session |
| inp_TradeAsianSession | false | Trade Asian Session |
| inp_AvoidNews | false | Avoid News Trading (disabled for testing) |
| inp_UseVolumeFilter | true | Use Volume Confirmation |
| inp_UseBollingerBands | true | Use Bollinger Bands Filter |
| inp_UseStochastic | true | Use Stochastic Filter |
| inp_UseMACDFilter | true | Use MACD Filter |
| inp_UseAdaptiveFilters | true | Use Adaptive Market Condition Filters |
| inp_SignalSensitivity | 1 | Signal Sensitivity (1=High, 2=Medium, 3=Low) |
| inp_VolumePeriod | 20 | Volume Average Period |
| inp_BBPeriod | 20 | Bollinger Bands Period |
| inp_BBDeviation | 2.0 | Bollinger Bands Deviation |
| inp_StochKPeriod | 14 | Stochastic %K Period |
| inp_StochDPeriod | 3 | Stochastic %D Period |
| inp_StochSlowing | 3 | Stochastic Slowing |
| inp_MACDFast | 12 | MACD Fast EMA |
| inp_MACDSlow | 26 | MACD Slow EMA |
| inp_MACDSignal | 9 | MACD Signal Line |
| inp_UsePartialClose | true | Use Partial Profit Taking |
| inp_PartialClosePercent | 50.0 | Partial Close Percentage |
| inp_UseBreakEven | true | Use Break Even |
| inp_BreakEvenPoints | 100 | Break Even Points |
| inp_UseMartingale | false | Use Martingale (Risky) |
| inp_MartingaleMultiplier | 1.5 | Martingale Multiplier |
| InpMagicNumber | 22214005 | Magic Number (222xxx) |
| InpTradeComment | "Psgrowth.com Expert_14005" | Trade comment |
#property copyright "Pipsgrowth.com"
#property link "https://pipsgrowth.com"
#property version "2.00"
#property strict
#property description "Pipsgrowth.com EX14005 XAUUSD Scalper — multi-filter gold scalper, full 12-layer stack."
// Include necessary libraries
#include <Trade/Trade.mqh>
#include <Trade/PositionInfo.mqh>
#include <Trade/OrderInfo.mqh>
#include <Trade/AccountInfo.mqh>
//+------------------------------------------------------------------+
//| Input Parameters - Trading Strategy |
//+------------------------------------------------------------------+
ENUM_TIMEFRAMES MapTimeframeInt(int tf)
{
switch(tf)
{
case 1: return PERIOD_M1;
case 2: return PERIOD_M5;
case 3: return PERIOD_M15;
case 4: return PERIOD_M30;
case 5: return PERIOD_H1;
case 6: return PERIOD_H4;
case 7: return PERIOD_D1;
default: return PERIOD_H1;
}
}
ENUM_APPLIED_PRICE MapAppliedPriceInt(int ap)
{
switch(ap)
{
case 1: return PRICE_CLOSE;
case 2: return PRICE_OPEN;
case 3: return PRICE_HIGH;
case 4: return PRICE_LOW;
case 5: return PRICE_MEDIAN;
case 6: return PRICE_TYPICAL;
case 7: return PRICE_WEIGHTED;
default: return PRICE_CLOSE;
}
}
ENUM_TIMEFRAMES g_inp_Timeframe = PERIOD_H1;
input group "=== Trading Strategy ==="
input int inp_Timeframe = 4; // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Scalping Timeframe
input int inp_FastMA = 8; // Fast Moving Average Period
input int inp_SlowMA = 21; // Slow Moving Average Period
input int inp_RSI_Period = 14; // RSI Period
input double inp_RSI_Oversold = 30.0; // RSI Oversold Level
input double inp_RSI_Overbought = 70.0; // RSI Overbought Level
input int inp_ATR_Period = 14; // ATR Period for Volatility
ENUM_TIMEFRAMES MapTimeframeInt(int tf)
{
switch(tf)
{
case 1: return PERIOD_M1;
case 2: return PERIOD_M5;Full source code available on download
Educational purposes only. Do NOT use with real money. Test on demo accounts only.
Clear Warning: Educational Purposes Only
Clear Warning: This Expert Advisor is for educational and testing purposes only. Do NOT use it with real money. Test only on demo accounts. Trading with real money involves substantial risk of capital loss. This does not constitute investment advice.
Recommended Brokers for This EA
These EAs run on MT5 — use a regulated broker with fast execution and tight spreads
Markets.com
Exness
IC Markets
Similar Expert Advisors
View All Expert AdvisorsMore Scalping strategy EAs from our library
Pipsgrowth EX14020 Scalper
Pipsgrowth.com EX14020 AIXAUUSDScalper — AI-assisted XAUUSD scalper, full 12-layer stack.
Pipsgrowth EX10006 Momentum-Scalper
Pipsgrowth.com EX10006 USDJPY Scalper — USDJPY pullback momentum scalper, full 12-layer stack.
Pipsgrowth EX14021 Scalper
Pipsgrowth.com EX14021 EURUSDScalper — BB + MACD divergence scalper, full 12-layer stack.
Community
Educational purposes only. Do NOT use with real money. Test on demo accounts only.