Indicator · Pine Script v6 · On the chart

Risk Position Tool

by allanninal

This indicator calculates position sizing and risk parameters directly on the price chart.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code194
Settings19inputs
LicenceCustom licence
Last update6 days ago22 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Users set entry, stop loss, and take profit levels interactively or via inputs, and the script computes broker lot sizes based on specified account balance and risk preferences. It plots entry, stop, and target projection boxes across the chart alongside a dashboard panel displaying calculated lots, cash risk, expected reward, and reward-to-risk ratio. The tool only performs calculations and does not execute broker orders.

Details

Published by

allanninal on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Screeners & dashboards, Support & resistance

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

pine-scriptpinescript-v6risk-managementtradingviewtradingview-indicator

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Entry bartime0entryTime
priceprice0entryPrice
Stop lossprice0stopPrice
Take profitprice0tpPrice
Account balancefloat10000balance
Account currencystringUSDacctCcy
Risk measured asstringRISK_PCTriskMode
Risk per tradefloat1.0riskValue
Units in one lotstringUNITS_AUTOunitsMode
Custom units in one lotfloat1unitsCustom
Lot stepfloat0.01lotStep
minfloat0.01lotMin
Show all 19 settings
SettingTypeDefaultVariable
maxfloat100lotMax
PanelbooltrueshowPanel
panelPosstringposition.top_rightpanelPos
Entrycolor#2962FFentryColor
Stopcolor#F23645stopColor
Targetcolor#089981tpColor
Box length after the last barint30boxBars
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

575 stars

This overlay indicator scans a pasted list of symbols for ICT liquidity sweep patterns using prior swing sweeps. The screening method looks back one, two, or three swings and can list long and short signals in a results table with adjustable rows, position, an

Indicator v5 SMC / ICT / price actionScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Liquidity Sweep Pattern Scanner
330 stars

This indicator monitors multiple cryptocurrency symbols for trading signals. It calculates and plots entry prices, take profit, and stop loss levels for each symbol including BTCUSDT, ETHUSDT, BNBUSDT and others. Price crossovers trigger buy, sell or close ale

Indicator v5 Support & resistanceScreeners & dashboards
Updated 2 months ago · None stated GitHub repository of Multi Alert Long/Short [Alorse]

BZ-tracker

by Allen1212
303 stars

The BZ-tracker indicator marks ARK Invest buy and sell transactions on stock charts with labels. It plots green labels for purchases and red labels for sales, each annotated with a multiplier such as X1 or X2 to show the number of ARK ETFs trading the stock on

Indicator v4 Support & resistanceScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of BZ-tracker
257 stars

This indicator overlays an intraday SPX and ES chart with a midnight session range, regular-trading-hours opening levels, and a VWAP projection box. It draws the midnight high, mid, and low, flags edge rejections within an absolute tolerance, and plots optiona

Indicator v6 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of SPX Midnight Box + Snag Logic

Golden Bullet Strategy

by TradersPost
218 stars

The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh

Indicator v6 SMC / ICT / price actionSessions & time
Updated 3 months ago · None stated GitHub repository of Golden Bullet Strategy

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers