Pipsgrowth EX16015 Trend
MT5 Expert Advisor (Open Source) · USDJPY · M5, H1
Pipsgrowth.com EX16015 USDJPY_Aggressive_Trend_Rider_EA — Aggressive trend rider with pyramiding, full 12-layer stack.
Overview
Pipsgrowth EX16015 Trend is a USDJPY trend rider on M5 and H1 that filters the market with four stacked indicators — ADX(14) for trend strength, a custom internal Hull MA for direction, Bollinger Bands(20, 2.0) for volatility context, and MACD(12,26,9) for momentum — then adds up to three positions in the direction of the trend with progressively smaller risk per layer (3.0%, 2.0%, 1.5%). It is the most fully-equipped trend EA in the EX16 family: in addition to the standard pyramid and trailing stop, it moves the stop to breakeven plus 5 pips after 15 pips of profit, partial-closes 50% of the position at 30 pips, then tightens the trailing distance from 15 pips to 10 pips once price reaches 50 pips of profit, and finally enforces an 8-hour time-based exit. The brief header describes twelve architecture layers (REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester) — the actually-wired implementation covers all of those except the OnTester fitness pass, which is absent.
The trend filter is the heart of the system. UpdateMarketState() runs at the start of every new bar and reads four values: currentADX from the iADX(14) handle, currentATR from iATR(14) for dashboard display, the Hull color from the in-process CHullV3 class, and a boolean isInTrend that becomes true only when currentADX > 30.0. The Hull MA is not loaded via iCustom — it is computed directly inside the EA. The CHullV3 class builds the Hull value as LWMA(sqrt(period), 2*LWMA(period/divisor) - LWMA(period)) using a hand-rolled linear-weighted moving average over Hull_Period=16 closes with a Hull_Divisor=2.0 half-period, then derives direction by comparing the current and previous Hull values. The CHullV3 class exposes GetValue(index) for raw levels and GetColor(index) which returns 1.0 (green/bullish), 2.0 (red/bearish), or 0.0 (flat). This internal-only implementation is one of EX16015's distinctive design choices — sibling trend EAs in the EX16 family use a single iMA handle, but EX16015 substitutes a hand-coded multi-WMA calculation so the Hull does not depend on any external indicator file being installed in the MQL5 Indicators folder.
The signal decision lives in AnalyzeTrendBreakout(), which the OnTick handler dispatches to once per new bar. The first filter is the regime gate: if ADX is below 30, no signal fires. The second filter is the Bollinger Bands expansion gate, which is gated by the Require_BB_Expansion input — by default that input is false, so the BB expansion check is skipped entirely; turning it on enables a volatility confirmation that the upper-minus-lower band width must be expanding by at least BB_Expansion_Percent=10.0% versus the prior bar's width. The third filter is MACD direction: a bullish MACD requires macdMain[0] > macdSignal[0] && macdMain[0] > 0 (main line above signal line and both above zero), bearish the mirror. The fourth filter is the Hull-MACD alignment: a buy is only valid if the Hull is bullish AND the MACD is bullish, and a sell only if the Hull is bearish AND the MACD is bearish. The fifth and final filter is the S/R breakout: the EA scans the last SR_LookbackBars=50 bars for swing highs and swing lows (defined as bars whose high is greater than all bars within ±SR_SwingStrength=5 of them, or whose low is less than the same neighborhood), builds a srLevels[] array of support and resistance zones of SR_ZonePoints=30 points each, and a buy signal only fires if the current bar's close crosses above a level that has been touched at least twice (the touches >= 2 filter). If no S/R breakout occurs but ADX exceeds the threshold by 5 (i.e. ADX > 35), the EA accepts the signal anyway as a "very strong trend" — a fallback that lets it trade in the absence of a clean breakout during the strongest trending sessions.
Pyramid construction uses three tiers with progressive risk reduction. OpenBuyPosition(int pyramidLevel) and OpenSellPosition(int pyramidLevel) use a different risk percentage for each level: tier 1 uses Entry1_RiskPercent=3.0%, tier 2 uses Entry2_RiskPercent=2.0%, tier 3 uses Entry3_RiskPercent=1.5%. All three positions share the same StopLoss_Pips=15 distance, so the per-position lot size scales naturally with the risk percentage against the account balance via CalculateLotSize(). CalculateLotSize() computes riskAmount = balance * riskPercent/100, derives riskPerLot = slDistance / tickSize * tickValue, and floors the result to the broker's LotsStep before clamping to LotsMin/LotsMax. New layer 2 is added by CheckPyramidingOpportunity() only after the base position has moved Pyramid_Trigger1_Pips=30 pips in profit; layer 3 fires only after the base position has moved Pyramid_Trigger2_Pips=60 pips in profit. The pyramid is conditioned on EnablePyramid=true and capped at MaxPositions=3. Every pyramid add requires the trend to still be intact (isInTrend==true) and the Hull direction to agree with the position direction.
Exit management is the most layered in the EX16 family. There is no fixed take-profit — tp=0 is passed to every trade.Buy() and trade.Sell() call. Instead, ManageExistingPositions() runs the following checks in order, every new bar, for each open position: (1) breakeven step — if profitPips >= Breakeven_Pips=15, ManageBreakeven() moves the stop to openPrice + Breakeven_Plus_Pips*10*point (i.e. 5 pips above entry for buys, 5 pips below entry for sells) so a loss is converted to a small guaranteed profit; (2) partial close — once profitPips >= PartialClose_Pips=30, ManagePartialClose() closes 50% of the position via TryClosePartial_EX16015() and marks positions[i].partialClosed=true so the partial never re-fires; (3) trailing stop — once profitPips >= Trailing_Activation_Pips=20, ManageTrailingStop() ratchets the stop to bid - Trailing_Distance_Pips*10*point (i.e. 15 pips behind price for buys). The trailing distance automatically tightens: if profitPips > Trailing_Tight_After_Pips=50, the distance switches to Trailing_Tight_Distance=10 pips, locking in more profit on extended trends; (4) time exit — MaxTrade_Hours=8 means any position that has been open for 8 hours is force-closed via TryClose_EX16015(); (5) trend reversal — if the Hull flips color against a position's direction, the EA immediately closes that position. All three order-modifying helpers (TryClose_EX16015, TryClosePartial_EX16015, TryModify_EX16015) implement a 3-attempt retry loop on REQUOTE, TIMEOUT, PRICE_OFF, and PRICE_CHANGED retcodes, with 200ms sleep between close/partial attempts and 100ms between modify attempts.
The EA also runs a hard safety stack via CheckDailyLimits() and UpdateDailyTracking(). The day boundary is detected by currentDay != iTime(_Symbol, PERIOD_D1, 0), at which point the previous day's P&L is logged and counters reset. The daily loss limit is Daily_Loss_Limit_Percent=10.0% of the start-of-day balance; hitting it freezes all new entries for the rest of the day. The daily profit target is Daily_Profit_Target_Percent=50.0%, gated by StopAfter_BigWin=true — when hit, the EA prints a celebration message and stops opening new trades. The Max_Daily_Trades=5 cap blocks entries once five trades have been taken in the same calendar day. IsAllowedSession() checks the broker's local hour against four toggles: Trade_London=true (8-16 GMT), Trade_NY=true (13-22 GMT), Trade_LondonNY_Overlap=true (13-16 GMT), and Trade_Asian=false (0-8 GMT). CheckSpread() enforces Max_Spread_Pips=2.0 for USDJPY. Position state is tracked in a custom PositionData struct array with ticket, entry price, lot size, open time, pyramid level, and partial-close flag.
The on-chart dashboard (UpdateDashboard()) shows the running balance, today's P&L, total gain against a $100 baseline, distance to a $1000 target, ADX value, Hull direction, current open position count, and trades-today count. The S/R zones are drawn as filled rectangles extending from the start of the lookback window to 30 bars beyond the current bar, in Support_Color=clrDodgerBlue and Resistance_Color=clrCrimson. Entry markers are drawn as OBJ_ARROW (code 233) with a text label like "BUY L1 @price" in lime for buys and orange for sells. The header advertises MagicNumber=22216015, InpTradeComment="Psgrowth.com Expert_16015", and uses ORDER_FILLING_FOK with 50 points of allowed slippage. The architecture claim of twelve layers is mostly accurate, with OnTester being the only layer not implemented in code; the EA compiles cleanly, releases all four indicator handles in OnDeinit, and has no defined constants — every threshold sits in the 50 input parameters across 11 named groups.
On USDJPY at M5, the default 15-pip stop is tight enough to keep individual risk contained at 3% of a $100 balance (the floor position) — the candle range on USDJPY M5 during the London/New York overlap commonly spans 8-20 pips, so 15 pips represents a high-conviction stop that the candle range can sometimes exceed but rarely by much. The breakeven-plus-5 step is the most important exit feature for small accounts: it converts an unprofitable setup into a small win without leaving the trade exposed to a full 15-pip loss. The 50% partial at 30 pips then recoups a meaningful slice of the risk and lets the remainder run under the tightened 10-pip trail. The 8-hour time exit is the safety net for the case where the trend fails to materialize — without it, a position that never reaches the 15-pip breakeven trigger would sit until the trailing stop or the trend reversal eventually closes it, which on quiet days can take a full London-to-NY cycle.
Strategy Deep Dive
UpdateMarketState runs at the start of each new bar and pulls ADX(14) via CopyBuffer, ATR(14) for the dashboard, and the Hull color from the in-process CHullV3 class — a hand-coded LWMA composition (Hull = LWMA(sqrt(period), 2*LWMA(period/divisor) − LWMA(period))) over Hull_Period=16 with Hull_Divisor=2.0, returning 1.0 for bullish, 2.0 for bearish, 0.0 for flat. AnalyzeTrendBreakout then runs five sequential gates: ADX > 30, optional BB-expansion filter (skipped by default), MACD main above signal and above zero (mirror for sells), Hull-MACD alignment, and either an S/R breakout through a level touched ≥2 times in the last SR_LookbackBars=50 bars or an ADX > 35 fallback. UpdateSRLevels scans the lookback window for swing highs and swing lows (bars whose high/low exceeds every bar within ±SR_SwingStrength=5 of it) and aggregates them into SR_ZonePoints=30-point zones, drawn as filled rectangles. OpenBuyPosition/OpenSellPosition sizes the lot via CalculateLotSize using Entry1_RiskPercent=3.0% for the first layer, 2.0% for the second, 1.5% for the third, all against the 15-pip fixed stop. CheckPyramidingOpportunity fires layer 2 at 30 pips profit and layer 3 at 60 pips, conditioned on isInTrend and Hull direction. ManageExistingPositions runs every new bar and walks each open position backward: ManageBreakeven moves the stop to entry ± 5 pips at 15 pips profit; ManagePartialClose closes 50% at 30 pips; ManageTrailingStop trails 15 pips behind price from 20 pips profit and tightens to 10 pips after 50 pips; the time exit at 8 hours force-closes; the trend-reversal check closes any position whose direction disagrees with the current Hull color. All three order-modifying helpers (TryClose/TryClosePartial/TryModify_EX16015) implement 3-attempt retry loops on REQUOTE/TIMEOUT/PRICE_OFF/PRICE_CHANGED.
A buy signal fires on a closed bar (shift=1 evaluation in AnalyzeTrendBreakout) only when ADX(14) is above 30, MACD main is above signal and above zero, the internal Hull MA is bullish (its GetColor returns 1.0), and either the close has crossed above a swing S/R level that has been touched at least twice in the last 50 bars, or ADX exceeds 35 to indicate a 'very strong trend' fallback. The pyramid layers are gated by CheckPyramidingOpportunity: layer 2 only after the base position is 30 pips in profit, layer 3 only after 60 pips — both require isInTrend and Hull direction agreement.
Exits are managed by ManageExistingPositions in layered order: breakeven-plus-5-pip step at 15 pips profit, 50% partial close at 30 pips, 15-pip trailing stop from 20 pips profit that tightens to 10 pips once profit exceeds 50 pips, trend-reversal close if the Hull flips color against the position, and a hard 8-hour time-based exit. All three order-modifying helpers (TryClose/TryClosePartial/TryModify_EX16015) retry 3 times on REQUOTE/TIMEOUT/PRICE_OFF/PRICE_CHANGED.
Fixed 15-pip stop set on the order ticket at entry from Ask (buys) or Bid (sells) and applied identically to all three pyramid layers. No global equity stop and no daily-loss circuit beyond the daily-limits check — the only global filter is the 2.0-pip spread cap and the 5-trade-per-day cap. The 15-pip stop is the tightest in the EX16 family.
No fixed take-profit — tp=0 is passed to every trade.Buy/trade.Sell call and the position runs under the layered exit stack (breakeven+5 at 15 pips, 50% partial at 30 pips, 15-pip trail tightening to 10 pips at 50 pips profit, 8-hour time exit, trend-reversal close). The philosophy is to let winners run with progressive profit-locking instead of capping the move at a fixed target.
Minimum recommended balance is $100 — at the default Entry1_RiskPercent=3.0% the floor position on a $100 account sizes to roughly 0.02 lot against the 15-pip USDJPY M5 stop. The EA expects a low-spread ECN or RAW-spread broker because the Max_Spread_Pips=2.0 cap is the only global execution filter and the 15-pip stop is too tight to survive wide spreads. Best run during the London and New York overlap (13:00-16:00 UTC) when USDJPY M5 candle bodies are largest and ADX tends to print above 30 — Asian-session USDJPY M5 ranges are typically 5-10 pips, well below the 15-pip stop and the 30-pip partial-close trigger, so the layered exit system would time out at 8 hours with no profit lock-in.
Strategy Logic
Pipsgrowth EX16015 Trend — Strategy Logic Analysis (from .mq5 source)
Family: Trend
Magic: 22216015
Version: 2.00
BRIEF:
Aggressive trend catching and pyramiding system that uses ADX, Hull MA, Bollinger Bands and MACD to detect strong trends, pyramids up to 3 positions with progressive risk reduction, and manages exits with breakeven, partial closes and trailing stops. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester
INDICATOR STACK:
- Standard
MT5indicators
KEY FUNCTIONS:
InitializeIndicators()UpdateMarketState()UpdateSRLevels()AddOrUpdateSRLevel()AnalyzeTrendBreakout()OpenBuyPosition()OpenSellPosition()CalculateLotSize()CheckPyramidingOpportunity()ManageExistingPositions()ManageBreakeven()ManagePartialClose()- ...and 13 more
INTERNAL CONSTANTS (0 total):
INPUT PARAMETERS (50 total across 11 groups):
- [===
CORESETTINGS===]MagicNumber=22216015// Magic Number - [===
CORESETTINGS===]InpTradeComment= "Psgrowth.com Expert_16015" // TradeComment - [===
TRENDDETECTION===] ADX_Period = 14 //ADXPeriod - [===
TRENDDETECTION===] ADX_TrendThreshold =30.0//ADXTrendThreshold(30=strong) - [===
TRENDDETECTION===] Hull_Period = 16 // Hull MA Period - [===
TRENDDETECTION===] Hull_Divisor =2.0// Hull Divisor - [===
TRENDDETECTION===] BB_Period = 20 // Bollinger Bands Period - [===
TRENDDETECTION===] BB_StdDev =2.0// Bollinger Bands Std Dev - [===
TRENDDETECTION===] Require_BB_Expansion =false// RequireBBExpansion(strict filter) - [===
TRENDDETECTION===] BB_Expansion_Percent =10.0//BBExpansionRequired(%) - 10=strict, 0=any - [===
TRENDDETECTION===] MACD_Fast = 12 //MACDFast - [===
TRENDDETECTION===] MACD_Slow = 26 //MACDSlow - [===
TRENDDETECTION===] MACD_Signal = 9 //MACDSignal - [===
BREAKOUTDETECTION===] Breakout_ConfirmBars = 2 // Bars to Confirm Breakout - [===
BREAKOUTDETECTION===] SR_LookbackBars = 50 // S/R Lookback Bars - [===
BREAKOUTDETECTION===] SR_SwingStrength = 5 // Swing Strength - [===
BREAKOUTDETECTION===] SR_ZonePoints = 30 // S/RZone(points) - [===
POSITIONSIZING===] Entry1_RiskPercent =3.0// Entry 1Risk(%) - [===
POSITIONSIZING===] Entry2_RiskPercent =2.0// Entry 2Risk(%) - Pyramid - [===
POSITIONSIZING===] Entry3_RiskPercent =1.5// Entry 3Risk(%) - Final pyramid - [===
POSITIONSIZING===]StopLoss_Pips=15.0// StopLoss(pips) - [===
PYRAMIDINGSETTINGS===]EnablePyramiding=true// Enable Position Pyramiding - [===
PYRAMIDINGSETTINGS===] Pyramid_Trigger1_Pips =30.0// Add Position 2After(pips) - [===
PYRAMIDINGSETTINGS===] Pyramid_Trigger2_Pips =60.0// Add Position 3After(pips) - [===
PYRAMIDINGSETTINGS===]MaxPositions= 3 // Max Pyramid Positions - [===
EXITMANAGEMENT===] Breakeven_Pips =15.0// Move to BEAfter(pips) - [===
EXITMANAGEMENT===] Breakeven_Plus_Pips =5.0// BE + Extra Pips - [===
EXITMANAGEMENT===]PartialClose_Pips=30.0// Partial Close at (pips) - [===
EXITMANAGEMENT===]PartialClose_Percent=50.0// Partial Close % - [===
EXITMANAGEMENT===] Trailing_Activation_Pips =20.0// TrailingStart(pips) - [===
EXITMANAGEMENT===] Trailing_Distance_Pips =15.0// TrailingDistance(pips) - [===
EXITMANAGEMENT===] Trailing_Tight_After_Pips =50.0// Tighten TrailAfter(pips) - [===
EXITMANAGEMENT===] Trailing_Tight_Distance =10.0// Tight TrailDistance(pips) - [===
EXITMANAGEMENT===]MaxTrade_Hours= 8 // Max TradeDuration(hours) - [===
DAILYLIMITS(PROTECTION) ===] Daily_Loss_Limit_Percent =10.0// Daily LossLimit(%) - [===
DAILYLIMITS(PROTECTION) ===] Daily_Profit_Target_Percent =50.0// Daily ProfitTarget(%) - [===
DAILYLIMITS(PROTECTION) ===] Max_Daily_Trades = 5 // Max Trades Per Day - [===
DAILYLIMITS(PROTECTION) ===]StopAfter_BigWin=true// Stop After Hitting Daily Target - [===
SPREADFILTER===] Max_Spread_Pips =2.0// MaxSpread(pips) -USDJPY:2.0|XAUUSD:6.0 - [===
SESSIONFILTER===] Trade_London =true// Trade London Session - [===
SESSIONFILTER===] Trade_NY =true// Trade NY Session - [===
SESSIONFILTER===] Trade_Asian =false// Trade Asian Session - [===
SESSIONFILTER===] Trade_LondonNY_Overlap =true// Prefer London/NY Overlap - [===
VISUALDISPLAY===]ShowDashboard=true// Show Dashboard - [===
VISUALDISPLAY===]ShowSRZones=true// Show S/R Zones - [===
VISUALDISPLAY===]ShowSignalMarkers=true// Show Entry Markers - [===
VISUALDISPLAY===] Support_Color =clrDodgerBlue// Support Color - [===
VISUALDISPLAY===] Resistance_Color =clrCrimson// Resistance Color - [===
DEBUG&LOGGING===]EnableDebugLog=true// Enable Debug Logging - [===
DEBUG&LOGGING===]ShowEntryConditions=true// Show Entry Conditions
// Pipsgrowth EX16015 Trend — Execution Flow (from source analysis)
// Family: Trend
// Aggressive trend catching and pyramiding system that uses ADX, Hull MA, Bollinger Bands and MACD to detect strong trends, pyramids up to 3 positions with progressive risk reduction, and manages exits with breakeven, partial closes and trailing stops. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester
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 onto an H4 or Daily chart for best results
- 7Configure EMA periods, ADX threshold, and lot size in the dialog
- 8Enable Allow Algo Trading and click OK
EA Parameters
| Parameter | Default | Description |
|---|---|---|
| MagicNumber | 22216015 | Magic Number |
| InpTradeComment | "Psgrowth.com Expert_16015" | Trade Comment |
| ADX_Period | 14 | ADX Period |
| ADX_TrendThreshold | 30.0 | ADX Trend Threshold (30=strong) |
| Hull_Period | 16 | Hull MA Period |
| Hull_Divisor | 2.0 | Hull Divisor |
| BB_Period | 20 | Bollinger Bands Period |
| BB_StdDev | 2.0 | Bollinger Bands Std Dev |
| Require_BB_Expansion | false | Require BB Expansion (strict filter) |
| BB_Expansion_Percent | 10.0 | BB Expansion Required (%) - 10=strict, 0=any |
| MACD_Fast | 12 | MACD Fast |
| MACD_Slow | 26 | MACD Slow |
| MACD_Signal | 9 | MACD Signal |
| Breakout_ConfirmBars | 2 | Bars to Confirm Breakout |
| SR_LookbackBars | 50 | S/R Lookback Bars |
| SR_SwingStrength | 5 | Swing Strength |
| SR_ZonePoints | 30 | S/R Zone (points) |
| Entry1_RiskPercent | 3.0 | Entry 1 Risk (%) |
| Entry2_RiskPercent | 2.0 | Entry 2 Risk (%) - Pyramid |
| Entry3_RiskPercent | 1.5 | Entry 3 Risk (%) - Final pyramid |
| StopLoss_Pips | 15.0 | Stop Loss (pips) |
| EnablePyramiding | true | Enable Position Pyramiding |
| Pyramid_Trigger1_Pips | 30.0 | Add Position 2 After (pips) |
| Pyramid_Trigger2_Pips | 60.0 | Add Position 3 After (pips) |
| MaxPositions | 3 | Max Pyramid Positions |
| Breakeven_Pips | 15.0 | Move to BE After (pips) |
| Breakeven_Plus_Pips | 5.0 | BE + Extra Pips |
| PartialClose_Pips | 30.0 | Partial Close at (pips) |
| PartialClose_Percent | 50.0 | Partial Close % |
| Trailing_Activation_Pips | 20.0 | Trailing Start (pips) |
| Trailing_Distance_Pips | 15.0 | Trailing Distance (pips) |
| Trailing_Tight_After_Pips | 50.0 | Tighten Trail After (pips) |
| Trailing_Tight_Distance | 10.0 | Tight Trail Distance (pips) |
| MaxTrade_Hours | 8 | Max Trade Duration (hours) |
| Daily_Loss_Limit_Percent | 10.0 | Daily Loss Limit (%) |
| Daily_Profit_Target_Percent | 50.0 | Daily Profit Target (%) |
| Max_Daily_Trades | 5 | Max Trades Per Day |
| StopAfter_BigWin | true | Stop After Hitting Daily Target |
| Max_Spread_Pips | 2.0 | Max Spread (pips) - USDJPY:2.0 | XAUUSD:6.0 |
| Trade_London | true | Trade London Session |
| Trade_NY | true | Trade NY Session |
| Trade_Asian | false | Trade Asian Session |
| Trade_LondonNY_Overlap | true | Prefer London/NY Overlap |
| ShowDashboard | true | Show Dashboard |
| ShowSRZones | true | Show S/R Zones |
| ShowSignalMarkers | true | Show Entry Markers |
| Support_Color | clrDodgerBlue | Support Color |
| Resistance_Color | clrCrimson | Resistance Color |
| EnableDebugLog | true | Enable Debug Logging |
| ShowEntryConditions | true | Show Entry Conditions |
#property copyright "Pipsgrowth.com"
#property link "https://pipsgrowth.com"
#property version "2.00"
#property strict
#property description "Pipsgrowth.com EX16015 USDJPY_Aggressive_Trend_Rider_EA — Aggressive trend rider with pyramiding, full 12-layer stack."
#include <Trade\Trade.mqh>
#include <Trade\PositionInfo.mqh>
#include <Trade\AccountInfo.mqh>
#include <Trade\SymbolInfo.mqh>
CTrade trade;
CPositionInfo position;
CAccountInfo account;
CSymbolInfo symbolInfo;
//+------------------------------------------------------------------+
//| INPUT PARAMETERS |
//+------------------------------------------------------------------+
//=== CORE SETTINGS ===
input group "=== CORE SETTINGS ==="
input long MagicNumber = 22216015; // Magic Number
input string InpTradeComment = "Psgrowth.com Expert_16015"; // Trade Comment
//=== TREND DETECTION ===
input group "=== TREND DETECTION ==="
input int ADX_Period = 14; // ADX Period
input double ADX_TrendThreshold = 30.0; // ADX Trend Threshold (30=strong)
input int Hull_Period = 16; // Hull MA Period
input double Hull_Divisor = 2.0; // Hull Divisor
input int BB_Period = 20; // Bollinger Bands Period
input double BB_StdDev = 2.0; // Bollinger Bands Std Dev
input bool Require_BB_Expansion = false; // Require BB Expansion (strict filter)
input double BB_Expansion_Percent = 10.0; // BB Expansion Required (%) - 10=strict, 0=any
input int MACD_Fast = 12; // MACD Fast
input int MACD_Slow = 26; // MACD Slow
input int MACD_Signal = 9; // MACD Signal
//=== BREAKOUT DETECTION ===
input group "=== BREAKOUT DETECTION ==="
input int Breakout_ConfirmBars = 2; // Bars to Confirm Breakout
input int SR_LookbackBars = 50; // S/R Lookback Bars
input int SR_SwingStrength = 5; // Swing Strength
input double SR_ZonePoints = 30; // S/R Zone (points)
//=== POSITION SIZING (AGGRESSIVE) ===
input group "=== POSITION SIZING ==="
input double Entry1_RiskPercent = 3.0; // Entry 1 Risk (%)
input double Entry2_RiskPercent = 2.0; // Entry 2 Risk (%) - Pyramid
input double Entry3_RiskPercent = 1.5; // Entry 3 Risk (%) - Final pyramid
input double StopLoss_Pips = 15.0; // Stop Loss (pips)
//=== PYRAMIDING ===
input group "=== PYRAMIDING SETTINGS ==="
input bool EnablePyramiding = true; // Enable Position Pyramiding
input double Pyramid_Trigger1_Pips = 30.0; // Add Position 2 After (pips)
input double Pyramid_Trigger2_Pips = 60.0; // Add Position 3 After (pips)
input int MaxPositions = 3; // Max Pyramid Positions
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 Trend Following strategy EAs from our library
Pipsgrowth EX16080 Trend
Pipsgrowth.com EX16080 EURUSDTrendFollower — triple-EMA H4 trend follower, full 12-layer stack.
Pipsgrowth EX16081 Trend
Pipsgrowth.com EX16081 GoldTrendEA — XAUUSD H4 EMA cross with Fib targets, full 12-layer stack.
Pipsgrowth EX16033 Trend
Pipsgrowth.com EX16033 EA_Price_Action — price-action grid scalper, full 12-layer stack.
Community
Educational purposes only. Do NOT use with real money. Test on demo accounts only.