Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Position Tool - TradingView-style Long/Short position calculator - indicator for 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
Views:
60
Rating:
(1)
Published:
PositionTool.mq5 (18.17 KB) view
position_tool.png (3.82 KB)
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to 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.

MACD Signals MACD Signals

Indicator edition for new platform.