Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Indicateurs

ATR Volatility Risk and Position Size Calculator HUD - indicateur pour MetaTrader 5

Meng Chang Chen
Meng Chang Chen
  • Founder & Quantitative Systems Architect à  ApexDesk Quant
  • Chine
  • 1235
ApexDesk Quant conçoit des logiciels institutionnels sans DLL pour MetaTrader 5 et MetaTrader 4, dédiés aux traders financés et portefeuilles systématiques.
NOS STANDARDS TECHNIQUES
Vues:
20
Publié:
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

ATR Volatility Risk and Position Size Calculator HUD on XAUUSD




ATR Volatility Risk and Position Size Calculator HUD is a lightweight, zero-DLL MetaTrader 5 indicator that computes volatility-calibrated Stop-Loss and Take-Profit distances from ATR(N) alongside exact broker-normalized lot sizes for three configurable risk tiers (default: 0.5%, 1.0%, and 2.0%).




Key Features:


- Broker-Accurate Lot Sizing: Uses SYMBOL_TRADE_TICK_VALUE_LOSS (with fallback to SYMBOL_TRADE_TICK_VALUE), SYMBOL_TRADE_TICK_SIZE, and SYMBOL_VOLUME_STEP / MIN / MAX normalization so position sizes remain accurate across 5-digit FX, 3-digit JPY pairs, Metals (XAUUSD/XAGUSD), Indices, and Crypto.


- Three Configurable Risk Tiers: Simultaneously displays lot sizes and exact currency risk amounts for three user-defined risk percentages (e.g., 0.5%, 1.0%, 2.0%) based on Account Equity or Balance.


- Volatility-Calibrated SL & TP: Automatically computes Stop-Loss and Take-Profit distances in points, price units, and Reward-to-Risk ratio from the live ATR(N) reading on the active chart symbol and timeframe.


- Non-Trading Read-Only Indicator: Zero DLL imports, zero network calls, and zero automated order execution—purely an analytical on-chart risk HUD.


- Compact On-Chart HUD: Lightweight object-based panel with configurable corner placement, colors, and clean deinitialization on removal.




Input Parameters:


- ATR Period & Applied Timeframe: Controls the volatility lookback window used for distance calculations.


- SL ATR Multiplier & TP ATR Multiplier: Scales the Stop-Loss and Take-Profit distances relative to current ATR.


- Risk Tier 1 / Tier 2 / Tier 3 (%): Percentage of account capital risked per trade if stopped out at the ATR Stop-Loss distance.


- Risk Basis (Equity / Balance): Selects whether lot sizing references live Account Equity or Balance.


- HUD Appearance & Corner: Adjusts panel corner anchor, offsets, font size, and color scheme.




How to Use:


Attach the indicator to any MetaTrader 5 chart (FX, XAUUSD, Indices, or Crypto). The HUD updates automatically on new ticks and bar transitions, showing current ATR value, suggested SL/TP distances in points, and exact normalized lot sizes for each risk tier.

Channel Breakout EA with ATR trailing stop and risk-percent sizing Channel Breakout EA with ATR trailing stop and risk-percent sizing

Donchian channel breakout Expert Advisor with EMA trend filter, ATR stop, ATR trailing stop, break-even and position size from risk % of balance.

InputRules: Rules Between Inputs and the Share of Passes They Reject InputRules: Rules Between Inputs and the Share of Passes They Reject

A library for MetaTrader 5 that declares rules between the inputs of an Expert Advisor once in the code. OnInit rejects a combination that breaks a rule, with the reason in the Journal; before an optimization starts, OnTesterInit estimates which share of its passes the rules would reject and warns above a limit you set.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.