oberon2007

Stop loss and position size calculator (ATR)

Calculates and plots Stop Loss and Position Size, based on desired ATR factor.

Displays Stop Loss Price, SL Distance Percent and Position Size overlayed in the chart and plots a stop loss line.
Additionally Stop Loss, ATR, SL Distance and Position Size are also displayed in the Data Window.

Available settings:

Trade - long / short
ATR timeframe - Allows to use ATR based on different timeframe than the current chart.
ATR factor - Stop Loss will be calculated by multiplying ATR with this factor.
Show last - Amount of previous stop loss lines to plot
Line Offset - Positions previous sl calculation under/above current price.
Calculation Offset - Displays calculation based on price action of previous bar(s).
Label Display Distance - Defines position of label relative to current bar.
Risk - Amount you are going to risk if stop loss is hit.

Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?