MADR Brothers filters market trends using a long-period MADR on higher timeframes while entering trades based on overbought or oversold levels of a shorter-period MADR. The system includes risk management features such as equity-based lot sizing, optional percentage-based stop loss and take profit, and a volume ratio momentum filter. It offers optional grid and martingale modes for recovery, alongside customizable trend-following or mean-reversion configurations.
Read from MADR_Brothers.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
MagicNumber
ulong
123456
Magic Number
TrendFollowing
bool
true
Trend Following (Long MADR)
InitialTrend
Trend1
0
Initial Trend Signal
InitializeSignal
bool
false
Off Trend Signal at Range Area
FixTrend
Trend2
0
Fix Trend Signal
longMaTimeframe
ENUM_TIMEFRAMES
PERIOD_D1
Long MADR Timeframe
InpLongMaPeriod
int
5
Long MADR Period
InpLongMaDevThresholdBull
double
0.31
Bullish Signal Threshold by Long MADR
InpLongMaDevThresholdBear
double
-0.31
Bearish Signal Threshold by Long MADR
ignoreLongMaDevSig
bool
false
Ignore Trend Signal
InpMaPeriod
int
12
MADR period
InpMaDevThresholdBought
double
0.31
MADR OverBought Threshold
Show all 37 inputs
Name
Type
Default
Description
InpMaDevThresholdSold
double
-0.31
MADR OverSold Threshold
InpPeriodVR
int
144
Volume Ratio Period
InpThresholdVR
double
1.618
Required Volume Ratio Threshold (0: Off)
InpRequiredBars
int
0
Required Consecutive Bar Count (0: Off)
InpIdioticalMode
bool
false
Idiotical Mode (Reverse Order Side)
idioticalAlternation
bool
false
Turn on Idiotical Mode by Odd Loss Count
DontOpenAfter_SLTP
bool
true
Don't Open After SL/TP until Next Bar
LotCoefficient
double
0.0001
Lot Coefficient Value (Based on Equity)
MaxLossCount
int
2
Max Loss Count (0: Disable Lot Multiplier)
initialLossCount
int
1
Initial Loss Count
LotMultiplier
double
0.786
Lot Multiplier after Loss Trading
MaxLotDenominator
int
1
Denominator Max First Lot
GridSwitch
bool
false
Enable Grid
GridDistance
double
0.31
Grid Distance Percentage
GridMultiplier
double
1.618
Multiplier Each Grid Distance
GridLotMultiplier
double
0.618
Grid Order Lot Multiplier (0: Off)
TakeProfitPercentage
double
0
Take Profit Percentage (0: Off)
StopLossPercentage
double
0
Stop Loss Percentage (0: Off)
LossToRangeFactor
double
1.0
Loss to SL/TP Range Factor (1.0: Off)
CloseWithMaDev
bool
true
Close with Current MADR
closeMaDevThresholdBought
double
-0.2
Current MADR Close Bought Threshold
closeMaDevThresholdSold
double
0.2
Current MADR Close Sold Threshold
DebugMode
bool
false
Debug Mode
StopEA_MarginLevel
double
25
Debug Mode EA Stop Margin Level Percentage
CommentSwitch
bool
true
Comment On / Off
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone mitsuaki-41/MADR_Brothers from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.
IchiDCA CCBSN PropFirm EA is an automated trend-following robot for MetaTrader 5, optimized for gold and forex markets. It triggers trades based on Ichimoku Cloud breaks, filtered by dual Exponential Moving Averages and MACD indicators. The strategy manages positions through a Dollar Cost Averaging system that layers u
Se-0303 is an automated trading robot for MetaTrader 4 and 5 that employs a grid-based approach with Martingale lot scaling. It determines entries through trend analysis and M1 fractals, using coefficients to calculate order distances and take profit targets relative to price height. The EA includes specific risk contr
This Expert Advisor for MetaTrader 5 focuses on gold trading through a combination of mean-reversion signals and a grid management system. It uses multi-timeframe filters, including exponential moving averages and ADX on the H1 timeframe, to identify trend direction while executing entries on M15 based on RSI and Bolli
This Expert Advisor for MetaTrader 5 implements a martingale trading strategy triggered by the Relative Strength Index (RSI). It opens an initial position when RSI reaches overbought or oversold thresholds. If price continues to move against the initial trade, the EA layers additional orders at set point intervals, mul
This MetaTrader 5 expert advisor executes a grid trading strategy enhanced with martingale lot scaling. The system identifies market direction through multi-timeframe analysis using Exponential Moving Averages and the Average Directional Index. It features dynamic grid spacing that adjusts based on market volatility an
This MetaTrader 5 expert advisor executes a mean reversion strategy based on price deviation from a Simple Moving Average. It enters short positions when prices rise above the average and long positions when prices fall below. The algorithm utilizes an aggressive grid-based recovery system where both the entry distance