XAU DumpRisk + FVG Dashboard v1 (MQL5)

MQL5 Indicatori

Specifiche

Objective

Build a standalone dashboard module (preferably an EA, can also be an indicator) for XAUUSD that evaluates dump (sharp drop) risk and displays the result directly on the chart (on-screen display).

✅ The module must not open trades.
✅ The module only calculates and displays:

  • DumpRisk % (0–100)

  • Mode: NORMAL / SAFE / NO_TRADE

  • Top reasons (2–3) why the risk is high

  • Lock (if a hard trigger forces NO_TRADE for a period of time)


Quality Requirements (Critical)

  • 100% compatible with MT5 / MQL5

  • 0 errors, 0 warnings in MetaEditor

  • Robust CopyRates() / CopyBuffer() usage: always check return values

  • CPU optimization

    • Perform calculations only on a new M5 bar when ComputeOnlyOnNewM5Bar = true

    • Recalculate FVG (H1/H4) only when needed (ideally on a new H1/H4 bar + caching)

    • No unnecessary work in OnTick()

  • Code must be clean and clearly commented (functions, logic, score mapping)

  • All thresholds, weights, values, and settings must be input parameters (tunable directly in MT5, not only in code)


1) INPUTS (Everything Adjustable in MT5)

1.1 Global Thresholds and Modes

  • int DropPoints = 30;

  • int HorizonMinutes = 60; (buffer)

  • int ScoreSafe = 35;

  • int ScoreNoTrade = 60;

  • int NoTradeLockMinutes = 60;

  • bool ComputeOnlyOnNewM5Bar = true;

  • bool ShowDashboard = true;

1.2 Category Weights (Contributions to 0–100)

All must be input so they can be tuned:

  • int W_Volatility = 25;

  • int W_Micro = 25;

  • int W_Divergence = 20;

  • int W_Spread = 15;

  • int W_Session = 10;

  • int W_Structure = 10;

  • int W_FVG_ContribMax = 20; (maximum FVG contribution to the final score)

Note: The developer must ensure clamping/normalization so the system works correctly even if the weights are changed.


2) Modules (Architecture)

A) DataCache

  • Safe CopyRates() for: M1, M5, H1, H4

  • Maintain lastBarTime for M5/H1/H4

  • If ComputeOnlyOnNewM5Bar = true , compute only on a new M5 bar

B) FeatureEngine

Compute category sub-scores:

  • Volatility (0.. W_Volatility )

  • Microstructure (0.. W_Micro )

  • Divergences / exhaustion (0.. W_Divergence )

  • Spread proxy (0.. W_Spread )

  • Session (0.. W_Session )

  • Structure (0.. W_Structure )

C) FVGEngine (H1 + H4)

  • Detect bearish FVG zones (3-candle model)

  • Fill status: when filled >= FVG_FillPct → zone becomes inactive

  • Find nearest bearish FVG below + stack count

  • Compute FVG_RiskScore (0..25), then
    FVG_Contrib = min(W_FVG_ContribMax, FVG_RiskScore)

D) DumpRiskEngine

  • Compute final DumpRiskScore (0..100) as the sum of category contributions (normalized to weights)

  • Determine mode: NORMAL / SAFE / NO_TRADE

  • Apply hard triggers + lock

E) Dashboard (Display)

  • Use OBJ_LABEL (preferred), top-left corner

  • Show DumpRisk %, Mode, lock (if active), and top reasons


3) Exact Calculations + Score Mapping (v1)

IMPORTANT: All thresholds and boundaries below must be input parameters (tunable in MT5).


3.1 Volatility (0..W_Volatility)

Inputs

  • int ATR_Period = 14;

  • double Vol_Ratio_L1 = 0.90;

  • double Vol_Ratio_L2 = 1.20;

  • double Vol_Ratio_L3 = 1.50;

  • double Vol_Ratio_L4 = 1.90;

  • int Vol_Score1 = 5;

  • int Vol_Score2 = 8;

  • int Vol_Score3 = 12;

  • int Vol_Score4 = 17;

  • int Vol_Score5 = 22;

TR spikes (bonus)

  • int TRSpikes_Lookback = 24;

  • double TRSpikes_Factor = 1.8;

  • int TRSpikes_B1 = 1;

  • int TRSpikes_B2 = 2;

  • int TRSpikes_B3 = 3;

  • int TRSpikes_Th1 = 2;

  • int TRSpikes_Th2 = 4;

  • int TRSpikes_Th3 = 6;

Logic

  • Compute ATR_M5 , ATR_H1

  • baseline = ATR_H1 / 12

  • ratio = ATR_M5 / baseline

  • Map ratio to base score ( Vol_Score1..Vol_Score5 )

  • Add bonus based on spike count (0.. TRSpikes_B3 )

  • Clamp result to 0..W_Volatility (scale if required)


3.2 Microstructure (0..W_Micro)

Micro = Wicks + FailedBO + BearImpulse
Each component has its own maximum points (all adjustable).

Inputs

  • int WickBars = 12;

  • int Wick_Max = 12;

  • int FailedBO_Lookback = 20;

  • int FailedBO_Max = 6;

  • int BearImpulse_LookbackM1 = 6;

  • double BearImpulse_ATRMult = 1.2;

  • int BearImpulse_Max = 7;

3.2.1 WickScore (0..Wick_Max)

Threshold inputs

  • double Wick_AvgUpper_T1 = 0.22;

  • double Wick_AvgUpper_T2 = 0.30;

  • double Wick_AvgUpper_T3 = 0.38;

  • int Wick_AvgScore1 = 1;

  • int Wick_AvgScore2 = 3;

  • int Wick_AvgScore3 = 6;

  • int Wick_AvgScore4 = 8;

  • double Wick_BadFrac_T1 = 0.10;

  • double Wick_BadFrac_T2 = 0.25;

  • double Wick_BadFrac_T3 = 0.40;

  • int Wick_BadScore1 = 0;

  • int Wick_BadScore2 = 2;

  • int Wick_BadScore3 = 3;

  • int Wick_BadScore4 = 4;

  • double Wick_BodyRatioBad = 0.25;

  • double Wick_UpperRatioBad = 0.40;

Logic

  • avgUpperScore + badFracScore , clamp to 0..Wick_Max

3.2.2 FailedBreakoutScore (0..FailedBO_Max)

Inputs

  • int FBO_Th1 = 1;

  • int FBO_Th2 = 3;

  • int FBO_Th3 = 5;

  • int FBO_Score0 = 0;

  • int FBO_Score1 = 1;

  • int FBO_Score2 = 3;

  • int FBO_Score3 = 5;

  • int FBO_Score4 = 6;

  • int FBO_LocalWindow = 5; (comparison window for local high)

3.2.3 BearImpulseScore (0..BearImpulse_Max)

Inputs

  • double Impulse_ClosePosMax = 0.25;

  • double Impulse_BodyFactor = 0.60;
    (open-close must exceed Impulse_BodyFactor * ATR_M1 * BearImpulse_ATRMult)

  • double Impulse_Str1 = 1.2;

  • double Impulse_Str2 = 1.8;

  • int Impulse_Score1 = 4;

  • int Impulse_Score2 = 6;

  • int Impulse_Score3 = 7;


3.3 Divergences / Exhaustion (0..W_Divergence)

Div = RSI state + RSI divergence + EMA slope

Inputs

  • int RSI_Period = 14;

  • int EMA_SlopeBars = 10;

  • int Div_RSI_Max = 6;

  • int Div_RSIdiv_Max = 8;

  • int Div_EMAslope_Max = 6;

RSI state inputs

  • double RSI_T1 = 55;

  • double RSI_T2 = 60;

  • double RSI_T3 = 65;

  • int RSI_S1 = 1;

  • int RSI_S2 = 3;

  • int RSI_S3 = 4;

  • int RSI_S4 = 6;

RSI divergence inputs

  • int Div_SwingLookback = 60;

  • int Div_Score = 8;

EMA slope inputs (points)

  • double EMA_Slope_PosHi = 15;

  • double EMA_Slope_PosLo = 5;

  • double EMA_Slope_Neg = -5;

  • int EMA_Slope_S0 = 0;

  • int EMA_Slope_S1 = 2;

  • int EMA_Slope_S2 = 4;

  • int EMA_Slope_S3 = 6;


3.4 Spread Proxy (0..W_Spread)

Inputs

  • int Spread_BufferM1 = 50;

  • double SpreadZ_T1 = 0.5;

  • double SpreadZ_T2 = 1.0;

  • double SpreadZ_T3 = 1.5;

  • double SpreadZ_T4 = 2.0;

  • int Spread_S1 = 2;

  • int Spread_S2 = 5;

  • int Spread_S3 = 9;

  • int Spread_S4 = 12;

  • int Spread_S5 = 15;

Implementation

  • Use a circular buffer of spread values, update on a new M1 bar

  • z = (SpreadNow - mean) / std

  • Map to points, clamp to 0..W_Spread


3.5 Session Risk (0..W_Session)

Inputs

  • int Session_London_Start = 8;

  • int Session_London_End = 10;

  • int Session_NY_Start = 14;

  • int Session_NY_End = 16;

  • int Session_Rollover_Start = 23;

  • int Session_Rollover_End = 1; (handle midnight crossover 23–01)

  • int Session_Add = 4;

Clamp result to 0..W_Session


3.6 Structure (0..W_Structure)

Inputs

  • int BOS_Lookback = 20;

  • double BOS_BufferPoints = 2;

  • int Struct_ScoreNoBOS = 2;

  • int Struct_ScoreBOS = 10;

Logic

  • structureLow from bars 2..(lookback+1)

  • If close(shift=1) < structureLow - BOS_BufferPoints*_Point → BOS = true


4) FVG ENGINE (H1 + H4) – Exact and Adjustable

Inputs

  • bool UseFVG = true;

  • ENUM_TIMEFRAMES FVG_TF1 = PERIOD_H1;

  • ENUM_TIMEFRAMES FVG_TF2 = PERIOD_H4;

  • int FVG_LookbackH1 = 400;

  • int FVG_LookbackH4 = 250;

  • double FVG_FillPct = 80.0;

  • double FVG_StackATRWindow = 1.5;

  • double FVG_DistATR_T1 = 0.75;

  • double FVG_DistATR_T2 = 1.50;

  • double FVG_DistATR_T3 = 2.50;

  • double FVG_SizeATR_T1 = 0.40;

  • double FVG_SizeATR_T2 = 0.80;

Scoring inputs

  • int FVG_S_Dist1 = 12;

  • int FVG_S_Dist2 = 7;

  • int FVG_S_Dist3 = 3;

  • int FVG_S_Size1 = 1;

  • int FVG_S_Size2 = 3;

  • int FVG_S_Size3 = 5;

  • int FVG_S_Stack0 = 0;

  • int FVG_S_Stack1 = 1;

  • int FVG_S_Stack2 = 3;

  • int FVG_S_Stack3 = 4;

  • int FVG_S_InsideZone = 4;

Combining

  • double FVG_CombineH1Weight = 0.65;

  • double FVG_CombineH4Weight = 0.35;

Output

  • FVG_RiskScore in range 0..25

  • FVG_Contrib = min(W_FVG_ContribMax, FVG_RiskScore)


5) Hard Triggers + NO_TRADE Lock (Adjustable)

Inputs

  • int HardA_FVG_Min = 12;

  • bool HardA_RequireBOS = true;

  • int HardA_LockMinutes = 60;

  • int HardB_FVG_Min = 10;

  • bool HardB_RequireBearImpulse = true;

  • double HardB_LockFactor = 0.75;

Logic

  • If lock is active → always NO_TRADE

  • Trigger A: FVG >= HardA_FVG_Min AND BOS == true
    → NO_TRADE + lock HardA_LockMinutes

  • Trigger B: FVG >= HardB_FVG_Min AND BearImpulse == true
    → NO_TRADE + lock round(NoTradeLockMinutes * HardB_LockFactor)


6) Dashboard Output (Display) + Reasons

Display using OBJ_LABEL .

Required lines

  1. DumpRisk: XX% | Mode: NORMAL/SAFE/NO_TRADE

  2. Drop: 30pts | Safe:35 | NoTrade:60

  3. Vol: x Micro: x Div: x Spr: x Sess: x Str: x FVG: x

  4. Reasons: ... (top 2–3 texts)

  5. Lock: XX min (only if active)

Top reasons must be selected from the highest contributing categories.

Examples

  • FVG(H4): bearish below

  • BOS(M5): true

  • BearImpulse(M1): true

  • SpreadZ: 2.1

  • Wicks: high distribution


7) Performance Rules (Must Be Followed)

OnTick

  • If ComputeOnlyOnNewM5Bar = true → only check for a new bar; compute only then

CopyRates

  • M5: only required windows (e.g., ~80 bars for divergence)

  • M1: only for impulse + spread-buffer update on a new M1 bar

FVG

  • H1/H4 scan only when needed + caching
    (do not scan 400/250 bars on every tick)


Delivery

  • .mq5 file (EA or indicator)

  • Compiles with 0 warnings / 0 errors

  • Short usage notes:

    • how to attach it to XAUUSD M5

    • what Mode means


Con risposta

1
Sviluppatore 1
Valutazioni
(304)
Progetti
544
35%
Arbitraggio
77
31% / 42%
In ritardo
196
36%
Caricato
2
Sviluppatore 2
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
3
Sviluppatore 3
Valutazioni
(2)
Progetti
1
100%
Arbitraggio
2
0% / 100%
In ritardo
0
In elaborazione
4
Sviluppatore 4
Valutazioni
(490)
Progetti
950
75%
Arbitraggio
26
19% / 65%
In ritardo
100
11%
Caricato
Pubblicati: 1 articolo, 6 codici
5
Sviluppatore 5
Valutazioni
(6)
Progetti
8
0%
Arbitraggio
2
0% / 100%
In ritardo
0
Gratuito
6
Sviluppatore 6
Valutazioni
(1)
Progetti
1
100%
Arbitraggio
0
In ritardo
0
Gratuito
7
Sviluppatore 7
Valutazioni
(14)
Progetti
15
40%
Arbitraggio
2
50% / 50%
In ritardo
1
7%
Gratuito
8
Sviluppatore 8
Valutazioni
(24)
Progetti
30
13%
Arbitraggio
10
0% / 50%
In ritardo
8
27%
In elaborazione
Ordini simili
Hi, I have a specific set of rules and a strategy to execute a trade. I'm looking for a developer to assist me in developing an MQL5 EA based on my strategies
I need someone to build a Telegram bot signal provider for IQ Option that works like this: 🔔 NEW SIGNAL! 🎫 Trade: 🇬🇧 GBP/USD 🇺🇸 (OTC) ⏳ Timer: 2 minutes ➡️ Entry: 5:29 PM 📈 Direction: BUY 🟩 ↪️ Martingale Levels: Level 1 → 5:31 PM Level 2 → 5:33 PM Level 3 → 5:35 PM Requirements: The bot should send signals automatically to Telegram. Must support multiple trades and martingale levels. I will test it for 3 days
Fix issue on script Enhanced version of the Red Magma Algo Market Structure indicator with sophisticated) alert system that prevents fake alerts and provides visual/audio notifications based on the trading flowchart logic. What it does (aligned with your chart): · Detects Break of Structure (BOS) after a consolidation · Marks demand zones: o Low-risk zone = origin of impulse (deep pullback) o
Indicator 30 - 150 USD
Has anyone heard of the tradingview indicator trend pulse pro v2? I'm looking for something similar if you haven't heard about feel free to Google it and get back to me
Looking for NinjaTrader 8 Developer I’m looking for an experienced NinjaTrader 8 (C#) developer to build a custom indicator based on the Jackson–Dalton Trading System . Requirements: Jackson zones (Z1 / Z2 / Z3) VWAP with volume-weighted standard deviation Session volume profile (POC, VAH, VAL) Day-type classification Configurable alerts Support for BTC/USDT and ETH/USDT Clean, modular code with full source Optional
I am looking for an experienced MQL5 developer to work on a two-phase project based on a clearly defined intraday trading strategy for DAX (M1 timeframe) . The project is intentionally divided into two distinct phases . Phase 1 is mandatory and consists of developing a custom indicator to visually evaluate and validate the strategy. Phase 2 is optional and will consist of developing the Expert Advisor , only if Phase
I need a professional in Pine Script Indicators that can develop my strategies into Indicators that will work on Tradingview platform Here is where you can get information about the strategies i want to develop https://chartprime.com/strategies
Hello i just funded 3 mt5 accounts i want them all seperate on my desktop and install a tradingpanel that i bought on mql5 market, should be an easy job but i tried it and it didnt work so if anyone can do it we can go on any desk or skype and fix it
Hello I want a code for my MetaTrader 4 and MetaTrader 5 indicator I want to give my indicator with license to my students this indicator will reach to my google sheet and if user MetaTrader 4 or Metatrader 5 account number doesnt reach to Exired date, it will go on work. other wise it freeze the indicator drawings or delete the indicator from chart the google sheet is like that
I am looking for an experienced MQL5 developer to modify and enhance my existing Expert Advisor, "Gold Levels Trader". The current version has a low win rate (~30%) and issues with ATR-based Stop Loss execution. I want to replace the current "pips drop/rise" logic with Fibonacci Retracement levels for entry signals, implement a Daily Drawdown Limit , and add Pending Orders functionality

Informazioni sul progetto

Budget
30+ USD
IVA (23%): 6.9 USD
Totale: 37 USD
Per lo sviluppatore
27 USD

Cliente

(3)
Ordini effettuati7
Numero di arbitraggi0