I need a professional XAUUSD signal indicator for MetaTrader 5, written entirely in MQL5 (.mq5).
IMPORTANT: This is NOT an auto-trading EA. It must never open, close or modify trades. It only analyzes XAUUSD and generates signals + MT5 push notifications.
1. Multi-timeframe analysis:
H4 → H1 → M30 → M15 → M10 → M5 → M1.
2. Detect market structure:
- Swing High / Swing Low
- BOS
- MSS
- CHOCH
- Bullish/Bearish HTF bias
- Internal and external structure
3. Detect liquidity:
- Buy-side liquidity (BSL)
- Sell-side liquidity (SSL)
- Equal highs/lows
- Previous highs/lows
- Liquidity sweeps
4. Detect and validate:
- Displacement
- FVG
- IFVG
- Order Blocks
- Breaker Blocks
- Premium/Discount
- Fresh/mitigated POIs
5. Signal logic:
HTF context → Liquidity → Sweep → Displacement → MSS/BOS → FVG/OB/Breaker → POI → M5 setup → M1 refinement.
Prefer BUY LIMIT / SELL LIMIT at strong pending POIs.
BUY NOW / SELL NOW should only be generated when lower-timeframe confirmation is already complete.
Only ONE best setup should be generated, not multiple random entries.
6. Entry / Stop Loss / Take Profit:
Entry must be refined from actual market structure.
SL must use structural invalidation and should be as tight as market structure reasonably allows.
TP must target realistic opposing liquidity/market structure.
Do NOT artificially create a large RR using unrealistic TP or unsafe SL.
7. Zero-Float refinement:
I want an entry refinement system designed to find entries close to structural turning points.
If a valid tight structural SL is not available, reject the setup instead of forcing one.
8. Setup states:
WATCH
ARMED
CONFIRMED
INVALIDATED
EXPIRED
If the conditions are incomplete, show WATCH/NO TRADE instead of inventing a signal.
9. Signal output:
XAUUSD
BUY LIMIT / SELL LIMIT / BUY NOW / SELL NOW
Entry
SL
TP
RR
Timeframe
Setup score
Reason
Invalidation
10. Alerts:
MT5 terminal alerts + immediate MT5 mobile push notifications.
Prevent duplicate alerts for the same setup.
11. Chart:
Clearly display the selected POI, Entry, SL, TP, liquidity, FVG/OB and setup status without overcrowding the chart.
12. NO REPAINT / NO HINDSIGHT:
Signals must use only information available at the time they are generated.
Historical losing signals must not disappear or move afterward.
13. Debugging:
I need a debug mode showing exactly why a setup was accepted or rejected:
HTF bias, liquidity sweep, displacement, MSS/BOS, FVG, OB, M5 confirmation and M1 confirmation.
14. Logging:
Keep signal history and preferably allow CSV export for later statistical analysis/backtesting.
15. Performance:
Must be optimized for MT5/VPS 24/7 operation and must not rescan unnecessary thousands of candles on every tick.
16. All important thresholds must be configurable inputs.
17. Deliverables:
- Complete editable YLLI_ENTRY.mq5 source code
- Compiled EX5
- No DLL dependency
- No Python dependency
- No external paid dependency
- Instructions for installation/settings
Before development starts, I want the developer to explain exactly how Sweep, MSS/BOS, Displacement, FVG, Order Block, POI and Zero-Float Entry will be defined algorithmically. These definitions must be agreed before coding.