PROTECTED SOURCE SCRIPT
Güncellendi

Position Sizing Calculator with ADR%, Account %, and RSI

19
LET ME KNOW IN COMMENTS IF YOU HAVE ANY ISSUES!
Overview

The Position Sizing Calculator with ADR% + RSI is a indicator that helps traders calculate position sizes based on risk management parameters (stop loss at low of day). It uses a fixed percentage of the account size, risk per trade, and stop loss distance (current price minus daily low) to determine the number of shares or contracts to trade. Additionally, it displays the Average Daily Range (ADR) as a percentage, the Relative Strength Index (RSI), and the price’s percentage distance from the daily low in a real-time table.

Features

  • Position Sizing: Calculates position size based on a fixed account percentage, risk per trade, and stop loss distance, ensuring the position value stays within the allocated capital.
  • ADR% Display: Shows the ADR as a percentage of the daily low, colored green if >5% or red if ≤5%.
  • RSI Display: Shows the RSI, colored green if oversold (<30), red if overbought (>70), or gray otherwise.
  • Distance from Low: Displays the current price’s percentage distance from the daily low for context.
  • Real-Time Table: Presents all metrics in a top-right table, updating in real-time.
  • Position Value Cap: Ensures the position value doesn’t exceed the allocated capital.
  • Minimum Stop Loss: Prevents oversized positions due to very small stop loss distances.


Customizable Parameters

  • Account Size ($): Set the total account balance (default: $1,000, min: $100, step: $100).
  • Risk Per Trade (%): The percentage of allocated capital to risk per trade (default: 1%, range: 0.1% to 10%, step: 0.1%).
  • Max % of Account: The fixed percentage of the account to allocate for the trade (default: 50%, range: 10% to 100%, step: 1%).
  • ADR Period: The number of days to calculate the ADR (default: 14, min: 1, step: 1).
  • RSI Length: The period for RSI calculation (default: 14, min: 1, step: 1).
  • Min Stop Loss Distance ($): The minimum stop loss distance to prevent oversized positions (default: $0.01, min: $0.001, step: $0.001).


Calculations

  • Stop Loss Distance: Current price minus daily low, with a minimum value set by the user.
  • Position Size: (Account Size * Max % of Account * Risk Per Trade %) / Stop Loss Distance, capped so the position value doesn’t exceed the allocated capital.
  • ADR%: 100 * (SMA(daily high / daily low, ADR Period) - 1), reflecting the average daily range relative to the low.
  • RSI: Calculated using the smoothed average of gains and losses over the RSI period, with special handling for zero gains or losses.
  • Distance from Low: (Current Price - Daily Low) / Daily Low * 100.


Table Display

  • Account Size: The input account balance.
  • Risk Per Trade: The risk percentage.
  • Stop Loss Distance: The price difference between the current price and daily low.
  • Distance from Low: The percentage distance from the daily low.
  • Account % Used: The fixed percentage of the account allocated.
  • Position Size: The calculated number of shares or contracts.
  • Position Value: The position size multiplied by the current price.
  • ADR %: The ADR percentage, colored green (>5%) or red (≤5%).
  • RSI: The RSI value, colored green (<30), red (>70), or gray (30–70).


Usage

Ideal for traders managing risk by allocating a fixed portion of their account and sizing positions based on stop loss distance.
The ADR% and RSI provide market context, with color coding to highlight high volatility or overbought/oversold conditions.
Adjust the customizable parameters to fit your trading style, such as increasing the risk percentage for aggressive trades or adjusting the ADR/RSI periods for different time horizons.
Sürüm Notları
LET ME KNOW IN COMMENTS IF YOU HAVE ANY ISSUES!
Overview

The Position Sizing Calculator with ADR% + RSI is a indicator that helps traders calculate position sizes based on risk management parameters (stop loss at low of day). It uses a fixed percentage of the account size, risk per trade, and stop loss distance (current price minus daily low) to determine the number of shares or contracts to trade. Additionally, it displays the Average Daily Range (ADR) as a percentage, the Relative Strength Index (RSI), and the price’s percentage distance from the daily low in a real-time table.

Features

Position Sizing: Calculates position size based on a fixed account percentage, risk per trade, and stop loss distance, ensuring the position value stays within the allocated capital.
ADR% Display: Shows the ADR as a percentage of the daily low, colored green if >5% or red if ≤5%.
RSI Display: Shows the RSI, colored green if oversold (<30), red if overbought (>70), or gray otherwise.
Distance from Low: Displays the current price’s percentage distance from the daily low for context.
Real-Time Table: Presents all metrics in a top-right table, updating in real-time.
Position Value Cap: Ensures the position value doesn’t exceed the allocated capital.
Minimum Stop Loss: Prevents oversized positions due to very small stop loss distances.

Customizable Parameters

Account Size ($): Set the total account balance (default: $1,000, min: $100, step: $100).
Risk Per Trade (%): The percentage of allocated capital to risk per trade (default: 1%, range: 0.1% to 10%, step: 0.1%).
Max % of Account: The fixed percentage of the account to allocate for the trade (default: 50%, range: 10% to 100%, step: 1%).
ADR Period: The number of days to calculate the ADR (default: 14, min: 1, step: 1).
RSI Length: The period for RSI calculation (default: 14, min: 1, step: 1).
Min Stop Loss Distance ($): The minimum stop loss distance to prevent oversized positions (default: $0.01, min: $0.001, step: $0.001).

Calculations

Stop Loss Distance: Current price minus daily low, with a minimum value set by the user.
Position Size: (Account Size * Max % of Account * Risk Per Trade %) / Stop Loss Distance, capped so the position value doesn’t exceed the allocated capital.
ADR%: 100 * (SMA(daily high / daily low, ADR Period) - 1), reflecting the average daily range relative to the low.
RSI: Calculated using the smoothed average of gains and losses over the RSI period, with special handling for zero gains or losses.
Distance from Low: (Current Price - Daily Low) / Daily Low * 100.

Table Display

Account Size: The input account balance.
Risk Per Trade: The risk percentage.
Stop Loss Distance: The price difference between the current price and daily low.
Distance from Low: The percentage distance from the daily low.
Account % Used: The fixed percentage of the account allocated.
Position Size: The calculated number of shares or contracts.
Position Value: The position size multiplied by the current price.
ADR %: The ADR percentage, colored green (>5%) or red (≤5%).
RSI: The RSI value, colored green (<30), red (>70), or gray (30–70).

Usage

Ideal for traders managing risk by allocating a fixed portion of their account and sizing positions based on stop loss distance.
The ADR% and RSI provide market context, with color coding to highlight high volatility or overbought/oversold conditions.
Adjust the customizable parameters to fit your trading style, such as increasing the risk percentage for aggressive trades or adjusting the ADR/RSI periods for different time horizons.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.