TradeArmor HUD
- Utilitários
- Valentin Yotov
- Versão: 1.0
- Ativações: 5
TradeArmor HUD is an ATR-based risk panel and trade manager built to protect your account from execution errors and emotional decision-making. Before you enter a trade, its mathematical safety checks guard against spread spikes, invalid stops, and margin-busting lot sizes. Once executed, it takes over management — securing partial profits, locking in break-even, and trailing stops objectively — entirely eliminating the need for manual interference.
Works on Forex, Crypto, Metals, Indices, and CFDs. Compatible with all broker types.
This is a manual trading assistant. It does not generate signals, predict direction, or open trades automatically. You decide when and what to trade — TradeArmor handles the sizing, execution, and management.
📐 ATR-BASED RISK SIZING
Why ATR? Fixed-pip stops treat all market conditions the same — 30 pips on EURUSD means something very different during London open versus the Asian session. Fixed-lot sizing ignores your actual risk entirely. ATR solves both problems: it measures the real volatility of the instrument on your timeframe right now, and produces a stop loss distance that reflects current conditions. The result is a position size that delivers consistent risk regardless of what you're trading or when.
The panel calculates your stop loss distance from the ATR (Average True Range) on the current chart timeframe, multiplied by your chosen factor. From that SL distance, it computes the exact lot size to match your target risk percentage — updated live on every tick.
- ATR × multiplier = SL distance — adapts automatically to current volatility
- Exact lot sizing — calculated from your risk %, the ATR-derived SL distance, and account balance, with proper rounding to your broker's volume step
- Works on all instruments — Forex, cross pairs, metals, crypto, indices. Lot sizing is accurate regardless of account currency or instrument type
- Commission-aware — round-trip commission is deducted from the risk budget before sizing, so the displayed risk is what you actually risk
- ATR multiplier control — adjust the multiplier directly from the panel with +/- buttons. The SL ticks, lot size, and chart zones update instantly
What you see on the panel:
- Lot size
- Tick value
- Reward (dollar amount at TP)
- Risk (dollar amount at SL)
- Spread (with color status indicator)
What you see on the chart:
- SL zone rendered as a colored rectangle with dollar risk and lot size
- TP zone rendered with reward amount
- Pending entry line (draggable) when in pending mode
Everything recalculates and redraws on every tick. What you see at the moment you click is what gets executed.
The Risk % label itself acts as a live diagnostic — it changes dynamically to show constraint states like "Max Lot", "Min Lot", "SL Inside Spread", or "Blocked", so you always know why the panel is preventing or adjusting a trade, not just that it did.
Timeframe as a risk dial: Because ATR is calculated from the current chart timeframe, switching timeframes changes your SL distance instantly. An H4 ATR produces a wider stop and smaller lot size; switching to M15 tightens the stop and increases the position size — same risk percentage, different trade geometry. Use this to visually explore how your SL/TP zones sit relative to structure on different timeframes before committing to an entry.
Constraint Navigator (ATR Hint Arrows): If your exact target risk cannot be achieved because it violates broker limits (e.g., minimum volume, maximum volume, or insufficient margin), the panel acts as a safety navigator. An amber arrow (▲ or ▼) appears in the ATR field, guiding you toward a safe and efficient setup:
- Amber ▲ (Up Arrow): Appears when you hit max volume or margin limits (effective risk is lower than requested). The arrow tells you to widen your stop (increase the ATR multiplier), which reduces lot demand and brings the setup back into safe margin territory.
- Amber ▼ (Down Arrow): Appears when you hit the broker's minimum lot size limit (effective risk is dangerously higher than requested). The arrow tells you to tighten your stop (decrease the ATR multiplier), which reduces the dollar risk per lot back toward your target.
🔄 AUTOMATED TRADE MANAGEMENT
After entry, TradeArmor manages each position on every tick. Three features work together, each with its own RR-based threshold:
Partial Profit (PP) Closes 50% of the position when profit reaches your PP threshold. If the remaining volume would fall below your broker's minimum lot, the full position is closed instead. Retries automatically if the close is unsuccessful.
Break-Even (BE) Moves the stop loss to your entry price when profit reaches your BE threshold. The BE price includes the actual commission and swap cost accumulated on the position — so it's a genuine break-even after costs, not just the raw entry price. Only fires if the result improves the current SL.
Trailing Stop (TS) Activates when profit reaches your TS trigger and trails the stop behind the highest price reached, at your configured distance. The peak price is tracked persistently — it survives timeframe switches and terminal restarts. The stop only tightens; it never moves backward.
Close Managed One-click exit of all actively managed positions (Scalping and Trending trades). Default trades are intentionally isolated and will remain open.
All management features respect the broker's modification freeze zone. No modification attempts are made when price is within the freeze distance of SL or TP.
🎯 STRATEGY PRESETS
Three presets let you switch between trading styles in one click. These presets don't just save time — they enforce discipline. Fiddling with risk parameters before every trade creates doubt and hesitation. By defining your rules in the EA inputs beforehand, you separate the planning from the execution. When the setup appears, you click the preset and execute the plan without second-guessing.
Default — Isolated multi-day entries Trades placed with the Default preset are physically isolated from the panel's bulk actions. They do not tally in the "Managed" trade counter, and they will not be closed if you click "Close Managed". This allows you to have a long-term swing trade running safely in the background while you actively day-trade around it. While you can configure PP/BE/TS for these trades if you choose, the factory default leaves them unmanaged so they have room to breathe through overnight sessions.
Scalping — Clean entries for range trading Designed for defined-target setups at structure. Lower risk per trade, break-even protection at 1R, no trailing stop. The TP is the exit — either price reaches it or it doesn't. No partial closes, no trail, no second-guessing. Use this at support and resistance boundaries for one-and-done entries.
Trending — Anchor entries for trend captures Designed for confirmed trend setups. Wider ATR multiplier gives the stop room for pullbacks. Partial profit banks 50% early to reduce exposure. Break-even protects the remainder. You can enable the trailing stop via inputs to let the position capture an open-ended move.
How they work together for day trading: The Trending preset is your anchor — the initial position taken on a confirmed trend. While it's running, the Scalping preset handles continuation entries on pullbacks within the trend. Each scalp is independent: tight stop, fixed target, low risk. If the trend breaks, the anchor's management features protect the profit; any active scalp either hits TP or takes a small, defined loss. This two-layer approach compounds gains on strong moves without increasing overall risk beyond your daily budget.
🛡️ SPREAD PROTECTION
Four layers of spread protection, all automatic:
Adaptive ceiling — learns the normal spread for the current symbol from recent tick history. Blocks execution when spread spikes significantly above the baseline. Adapts to each instrument automatically — no per-symbol configuration needed.
Absolute cap — a hard limit auto-detected per instrument type (tight for Forex, generous for crypto/indices). User-adjustable.
Spread Gate — when spread is too high at execution time, the order is queued instead of rejected. When spread normalizes, the trade executes at current market prices with a fresh ATR calculation — not the stale price from the original click. The queue times out after 60 seconds. Click again to cancel.
SL-Inside-Spread block — if your ATR-derived stop loss is narrower than the current spread, execution is blocked entirely. This prevents guaranteed instant stop-outs that would otherwise destroy the position on entry.
⚙️ BUILT FOR RESILIENCE (Under the Hood)
- Timeframe Blackout Protection: EAs re-initialize completely when you switch timeframes. If you execute a trade and instantly switch charts, standard EAs lose track of the order. TradeArmor bridges this gap using a persistent memory-state manager during terminal reloads. You will never have an "orphaned" or abandoned position due to a timeframe switch mid-execution.
- Cold-Start Security: Standard "adaptive spread" systems often fail catastrophically on Monday morning market opens or terminal restarts because their rolling tick history is momentarily blank or corrupted by gaps. TradeArmor uses historical median floors and warm-up observation gating to ensure your spread ceilings are mathematically perfect the exact second you boot up the terminal.
- Zero-Tolerance Chart Cleanup: Many MT5 panels permanently pollute your chart with "ghost buttons" and untrackable visual artifacts when you change templates or remove the EA. TradeArmor uses atomic object reclamation. If you delete the EA, 100% of its UI and visual elements are purged instantly, leaving your workspace completely pristine.
⚡ ORDER EXECUTION
Market orders — one-click Buy/Sell with immediate SL and TP placement.
Pending orders — enable Pending mode, drag the entry line on the chart to your target price. The system places a Buy Stop, Buy Limit, Sell Stop, or Sell Limit based on the entry's position relative to current price. SL and TP move with the entry line in real time.
Reliability — all orders are validated against spread, margin, and broker stop-level requirements before being sent. On requotes, the system retries automatically. On network timeouts, it detects whether the fill occurred and picks up the position seamlessly.
💾 SESSION PERSISTENCE
Your panel state survives timeframe changes, recompiles, and terminal restarts:
- Trade direction (Buy/Sell) and minimized state are preserved across timeframe switches
- Trade management state (PP/BE completion, trailing stop peak price) persists across sessions
- Each chart instance gets its own isolated workspace — multiple TradeArmor panels on different charts do not interfere with each other
Panel objects are fully cleaned up on EA removal. No orphaned chart elements.
🎛️ SETTINGS
| Parameter | Default | |
|---|---|---|
| ATR Period | 14 | Lookback period for ATR calculation [5 - 21] |
| Max Spread | 0 | 0 = auto-detect per instrument type |
| Adaptive Spread | On | Rolling spread ceiling |
| Spread Gate | On | Queue trades during high spread |
| Commission/lot | 0 | Round-trip commission for BE cost offset |
Per-preset inputs (Default, Scalping, Trending — each configurable independently): Risk %, RR Ratio, ATR Multiplier, Partial Profit RR, Break-Even RR, TS Trigger RR, TS Distance RR
Display toggles: Preset Buttons, Spread Meter, Managed Counter, Close Managed Button, Chart Watermark
Visual options: SL/TP display mode (Rectangles & Text / Text Only / Off), plus custom colors for SL zone, TP zone, labels, and pending entry line.
✅ COMPATIBILITY
| Platform | MetaTrader 5 |
| Account types | Hedging (primary). Uses ticket-based operations compatible with netting accounts |
| Instruments | Forex, Crypto, Metals, Indices, Commodities, CFDs |
| Brokers | ECN, STP, Market Maker, tiered-leverage accounts |
| Strategy Tester | Compatible — panel suppressed automatically |
📋 GETTING STARTED
- Attach TradeArmor HUD to any MT5 chart (Algo Trading must be enabled)
- Set your risk % and ATR multiplier using the panel controls
- Select Buy or Sell direction
- Review the live lot size, risk amount, and visual SL/TP zones on the chart
- Click to execute — trade management begins automatically
For pending orders: toggle Pending mode, drag the entry line to your price, then execute.
Test on a demo account before live trading. For questions or support, contact via MQL5 private message.
