OPEN-SOURCE SCRIPT
Telah dikemas kini

Risk Module

107
Risk Module
This indicator provides a visual reference to determine position sizing and approximate stop placement. It is designed to support trade planning by calculating equalized risk per trade based on a stop distance derived from volatility. The tool offers supportive reference points that allow for quick evaluation of risk and position size consistency across varying markets.

Equalized Risk Per Trade
The indicator calculates the number of shares that can be traded to maintain consistent monetary risk. The formula is based on the distance between the current price and the visual stop reference, adjusting the position size proportionally.

Position Size = Dollar Risk / (Entry Price – Stop Price)

The risk is calculated as a percentage of account size; both of which can be set in the indicator’s settings tab. This creates a consistent risk exposure across trades regardless of volatility or structural stop distance.

Stop Placement Reference
The visual stop reference is derived from the Average True Range (ATR), providing a volatility-based anchor. The default value is set to 2 × ATR, but this can be customized.

Price Model: Uses the current price ± ATR × multiplier. This model reacts to price movement and is set as the default option.

EMA Model: Uses the 20-period EMA ± ATR × multiplier. This model is less reactive and can be an option when used in combination with an envelope indicator.

Chart Elements
Stop Levels: Plotted above and below either the current price or EMA, depending on the selected model. These serve as visual reference points for stop placement; the lower level a sell stop for long trades, the upper level a buy stop for short trades.

Information Table: Displays the number of shares to trade, stop level and percentage risk. A compact mode is available to reduce the table to essential information (H/L and Shares).

Settings Overview
  • Stop Model: Choose between “Price” or “EMA” stop calculation logic.
  • ATR Multiplier: Change the distance between price/EMA and the stop reference.
  • Account Size / Risk %: These risk parameters are used to calculate dollar risk per trade.
  • Visible Bars: Number of recent bars to show stop markers on.
  • Compact Mode: Minimal table view for reduced chart footprint.
  • Table Position / Size: Controls table placement and scale on the chart.
Nota Keluaran
Discretion
Stop placement should be based on discretion and derived from structure and context. The plotted levels are not intended for precise use, but for approximate evaluation and quick scenario building. The common reference range is between 1 and 3 ATR.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.