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

Position Tool - TradingView-style Long/Short position calculator - indicateur pour MetaTrader 5

Oleksandr Duiko
Oleksandr Duiko
MQL5 and Python developer focused on automated trading systems for MetaTrader 5 and crypto exchanges.
What I build:
• Expert Advisors for XAUUSD, Forex and crypto CFDs — scalpers, grid, trailing, session/breakout logic
Vues:
76
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 Tool brings the familiar Long/Short Position drawing from TradingView to MetaTrader 5. It draws a target zone and a stop zone on the chart and calculates the correct lot size for your risk, so you can plan a trade visually before you open it.

Drag the Entry, Stop or Target line with the mouse and every number updates instantly: lot size, money at risk, potential reward, reward-to-risk ratio, distance in points and required margin. Profit and loss per lot are taken from OrderCalcProfit(), so the result is correct for any symbol (Forex, metals, indices, crypto CFDs) and any account currency.

Position Tool on XAUUSD H4

How to use

  • Attach the indicator to a chart: the tool appears at the current price with a 1 x ATR(14) stop and a 2:1 target.
  • Drag the Entry line to move the whole tool (price and time). Drag the ends of the Entry line to change the width.
  • Drag the Stop and Target lines to set your levels. If you drag the Target to the other side of the Entry, the tool switches between Long and Short automatically.
  • Long/Short button mirrors the tool, Reset button places it at the current price again.

The lot is rounded down to the symbol's volume step, so the real risk never exceeds your setting. If even the minimum lot is larger than your risk, the tool shows a MIN LOT > RISK warning.

Inputs

  • Risk mode: % of account or a fixed amount in account currency.
  • Risk, % of account / Risk, account currency.
  • % is calculated from: Balance or Equity.
  • Start as Long, Default reward:risk on reset, Default stop on reset (x ATR(14)), Tool width in bars.
  • Colors of the target zone, stop zone, entry line and text, font size.

The tool only draws and calculates; it does not place any orders.

MA Toolkit MA Toolkit

MA Toolkit: a compact moving average indicator written from scratch. Choose SMA, EMA or LWMA for a fast and a slow line, see the fast line colored by its slope, and get optional crossover arrows, alerts and an info panel.

Round Numbers – automatic psychological thresholds Round Numbers – automatic psychological thresholds

Horizontal lines at round figures around the displayed price, with a spacing that adjusts according to the zoom level.

Previous Day High, Low and Close Levels Previous Day High, Low and Close Levels

Draws the previous day High, Low and Close as horizontal levels on the chart, with optional history for several past days, extension of today's levels to the right and price labels.

Risk Drift Audit: the Real Risk of Every Past Trade Risk Drift Audit: the Real Risk of Every Past Trade

Shows the risk every past trade really took (the loss at its stop loss as a % of the balance at entry) and how far a fixed lot drifted from the tested risk. Read-only.