Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Twitter !
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

Risk Lot From Stop Line - indicateur pour MetaTrader 5

Vues:
184
Note:
(1)
Publié:
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

Position size is the part of risk management that is easiest to get wrong by hand. The value of one point is different for every symbol: Forex pairs, gold, indices and CFDs all have their own contract size, tick value and volume step. This indicator does the calculation for you directly on the chart.

When the indicator starts, a dashed stop line appears one ATR below the price. Drag it to where your stop should be. The panel immediately shows the direction (stop below the price = buy, above = sell), the distance in points, the volume for your risk and the real risk after the volume is rounded to the broker's step.

Risk Lot From Stop Line on an XAUUSD H1 chart

Why the real risk is shown separately

The volume is always rounded DOWN to the volume step, so the risk never exceeds the plan. But on small accounts and wide stops the calculated volume can be smaller than the minimum volume. In that case the indicator shows the minimum volume and how much it really risks. If it is more than N times the planned risk (2 by default), the text turns red: the trade should be skipped or the stop moved. This situation is common on gold, where 0.01 lot with a 50 dollar stop already risks 50 dollars.

Input parameters

  • Risk, % of the base (default 1.0).
  • Base amount (default 0 = current balance). Set a fixed amount if you want the risk from a fixed base, not from the balance.
  • Warn if minimum volume risk > N x planned (default 2.0).
  • Stop line color, panel text color, panel corner, font size.

How the loss is calculated

The loss per 1.0 lot is taken from OrderCalcProfit, which uses the terminal's own calculation mode for the symbol. Before the account is connected OrderCalcProfit may return zero; then the indicator falls back to the tick value (SYMBOL_TRADE_TICK_VALUE_LOSS and SYMBOL_TRADE_TICK_SIZE). The entry price is the Ask for a buy and the Bid for a sell, so the spread is included.

The line is kept when you change the timeframe and removed together with the indicator. The indicator does not open trades.

HTF EMA No Lookahead HTF EMA No Lookahead

Higher-timeframe EMA (fast and slow) on a lower-timeframe chart, using only higher-timeframe bars that are already closed. Values never change after the bar closes.

Round Number Levels Session Grid Round Number Levels Session Grid

Round number levels for Gold (XAUUSD) and any symbol on MT5. Draws major and minor round levels around price plus Asia, London and New York session open lines, with an optional alert when a candle closes across a major level. Open source code.

Trade History in R Trade History in R

Shows the closed trades of the account in R (net profit divided by the money at risk at entry): expectancy, win rate, drawdown in R, losing streak, per-symbol summary and CSV export.

Prop Firm Equity Guard daily loss and max drawdown protector Prop Firm Equity Guard daily loss and max drawdown protector

Prop Firm Equity Guard protects prop-firm challenges and funded accounts. It monitors live equity against your daily loss and max drawdown limits, then closes all positions, deletes pending orders and locks trading before the firm's limit is hit. A safety buffer makes it act early, and anything opened while locked is closed instantly. It supports static and trailing drawdown, an optional profit target lock and alerts, saves its state through restarts, and shows an on-chart dashboard with room left and a reset countdown. It works alongside manual trading and other EAs.