OPEN-SOURCE SCRIPT
已更新

Position Size calculator

103
Overview
This indicator automatically calculates the average candle body size (|open − close|) for the current trading day and derives a position size (quantity) based on your fixed risk per trade (default ₹1000).

For example:
If today’s average candle body = ₹3.50 and risk = ₹1000 → Quantity = 285

How It Works:

The indicator calculates the absolute difference between open and close (the candle’s body) for every bar of the current day.
It averages those body sizes to estimate the average daily volatility.
Then it divides your chosen risk per trade by the average body size to estimate an appropriate quantity.
It automatically resets at the start of each new day.

Why Use It

While risk size can be derived manually or using TradingView’s built-in Long/Short Position Tool, this indicator provides a faster, more practical alternative when you need to make quick trade decisions — especially in fast-moving intraday markets.

It keeps you focused on execution rather than calculation.
Tip
You can still verify or fine-tune the quantity using the Long/Short Position Tool or a manual calculator, but this indicator helps you react instantly when opportunities appear.
版本注释
Overview

This indicator automatically calculates position size (quantity) based on your fixed risk per trade (default ₹1000).
You can choose whether to base the calculation on today’s average candle body or the latest candle’s body size — giving you flexibility depending on your trading style.

Example

If today’s average candle body = ₹3.50 and risk = ₹1000 → Quantity = 285
If the latest candle’s body = ₹4.00 → Quantity = 250

How It Works

The indicator measures the absolute difference between open and close (the candle’s body).

It automatically resets at the start of each new day.

Depending on your selected mode:

Average Body Mode
: Uses the average candle body size of all bars for the current day to reflect the day’s typical volatility.

Latest Candle Body Mode: Uses the most recent candle’s body size to capture immediate market momentum.

The quantity is then calculated as:
Quantity = Risk per Trade ÷ Body Size

Why Use It


While position sizing can be done manually or via TradingView’s Long/Short Position Tool, this indicator provides a faster, more execution-focused method — ideal for traders who need to act quickly during fast intraday moves.

It helps you focus on execution rather than calculation, with the flexibility to adapt position sizing dynamically as market conditions change.

Tip


You can still cross-check or refine the calculated quantity using the Long/Short Position Tool or manual methods — but this indicator offers an instant, on-chart estimate that keeps you ready for immediate trades.
版本注释
added- latest candle body calculation

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。