Chameleon FLP
- Utilità
-
Lian To
Algorithmic Trader & MQL Developer | 5+ Years of Building Systems That Actually Work - Versione: 3.10
Chameleon Floating Loss Protector "Your last line of defense against runaway drawdown."
Overview
Chameleon Floating Loss Protector (FLP) is a lightweight risk management utility that runs silently in the background and acts as an automatic circuit breaker for your trading account.
When the total floating loss of your monitored positions exceeds a predefined threshold, the EA immediately closes all affected positions — then resets itself and resumes monitoring, ready for the next trade.
No manual intervention required. No second-guessing. Just clean, automatic protection.
The Problem It Solves
Every trader knows the scenario: you step away from the screen, a news event hits, and by the time you're back, a manageable drawdown has turned into a serious loss. Or your EA grid starts compounding during a trending market and the floating loss spirals before the next safety check fires.
Chameleon FLP eliminates that risk by acting the moment your loss threshold is crossed — not on the next candle, not at the end of the session, but on the next tick.
Key Features
Fixed Nominal Threshold
Set your maximum acceptable floating loss in your account currency (USD, EUR, GBP, etc.). Simple, intuitive, and independent of balance fluctuations. If your open positions collectively hit that number, everything gets closed.
Multi-Magic Number Monitoring
Enter a comma-separated list of Magic Numbers to monitor specific EAs: 1111, 2222, 3333 . Enter 0 to monitor all open positions regardless of Magic Number. Mix and match as needed.
Non-Blocking Architecture
Position evaluation runs in OnTick() . The actual close sequence runs in OnTimer() . This means the EA never freezes your chart, never blocks other EAs, and never misses a tick while processing a close.
Retry and Verification Logic
Each position close is attempted up to the configured retry limit. After the close sequence, a verification loop confirms all positions are actually closed. If any remain open after all retries, you receive an immediate warning alert.
Algo Trading Status Detection
The EA detects when the Algo Trading button is toggled off in MT5 and updates the panel status instantly. Close execution is also blocked if algo trading is disabled at the moment of trigger — no silent failures.
Triple Notification System
Get notified via MT5 Alert popup, Email, and Push Notification to your mobile app — all configurable independently.
TradingView-Style Control Panel
A clean, always-on-top information panel gives you a real-time view of your exposure at a glance.
CONFIGURATION section
- Active Magic Number filter
- Loss threshold in account currency
- Algo trading enabled / disabled status
LIVE EXPOSURE section
- Number of monitored open positions
- Current floating P/L
- Loss vs. limit ratio with a color-coded progress bar that shifts green → orange → red as you approach the threshold
STATUS section
- Current EA state with animated indicator dot
- Timestamp of the last close trigger
The panel uses a dark charcoal color scheme inspired by TradingView and always renders above all other chart objects, even when multiple indicators and EAs are running simultaneously.
How It Works
- Attach the EA to any chart. It does not trade — it only monitors and closes.
- Set MaxLossAmount to the maximum floating loss you can tolerate in your account currency.
- Set MagicNumberList to the Magic Numbers of the EAs you want to protect, or 0 for all positions.
- Walk away with confidence.
The EA monitors every tick. The moment total floating loss (including swap) hits your threshold, it closes all monitored positions with retry logic, verifies the result, sends your chosen notifications, and immediately resumes monitoring.
Input Parameters
Loss Threshold
- MaxLossAmount (default: 100.0) — Maximum floating loss in account currency before close is triggered
Magic Number Filter
- MagicNumberList (default: "0") — Comma-separated Magic Numbers to monitor. Use 0 to monitor all open positions
Execution Settings
- MaxRetry (default: 3) — Close retry attempts per position if the first attempt fails
- RetryDelayMs (default: 500) — Milliseconds between retry attempts
Notifications
- AlertOnClose (default: true) — Show MT5 alert popup when threshold is triggered
- SendEmailAlert (default: false) — Send email notification on trigger
- SendPushAlert (default: false) — Send push notification to MT5 mobile app
Panel Display
- ShowPanel (default: true) — Display the real-time info panel on chart
Important Notes
- This EA does not open, modify, or manage trades in any way — it only closes positions when the threshold is breached.
- Recommended: attach it to a dedicated chart (e.g. EURUSD M1) so it runs independently from your trading EAs.
- Ensure Algo Trading is enabled in MT5 and the EA has live trading permission enabled in its settings.
- Always test on a demo account first to confirm behavior matches your expectations before using on a live account.
Trading involves risk. This tool reduces exposure but cannot guarantee full protection against all market conditions, including price gaps and slippage during close execution.

L'utente non ha lasciato alcun commento sulla valutazione.