PROTECTED SOURCE SCRIPT
JRien Position Sizer (Real-Time) — ATR / LOD / Manual % $ Risk

Real time position sizing based on real time potential entry price and calculations based on max risk. Usable on multi timeframes. You can also input manually your entry and stop based on your own discretion. I usually use a spreadsheet to calculate these things but wanted a way to see this in real time without needing to type out Entry, ATR, Stops, etc - TradingView has all this information already so why not just have it automatically update!
4 Stop Types:
Based on the stocks ATR (mainly used on daily charts but options if you use other timeframe ATR) and uses a multiple of that ATR to base the plot. Many traders use less than 0.6ATR to base your stop as a rule and max entry 60% from LOD as another rule.
You're able to input your desired % stop and this will dynamically move with the current entry (last) price.
You're able to input your desired price $ stop and this will dynamically move with the current entry (last) price.
Calculates your position based on if you were to have your stop at LOD and also calculates % of ATR away from LOD. Many swing traders use LOD for their stop so this moving dynamically with the current LOD and automatically calculating this is useful.
Calculates:
Entry (Last)
ATR (14 | D)
ATR Stop Price
Manual Stop Percent
Manual Stop Price
Final Stop
Risk per Share ($)
Shares by Risk
Shares by Stake
Final Shares
Final Position Cost
Potential Stop Loss
LOD Price
Loss at LOD
LOD Risk % of Account
LOD dist as % of ATR
Customizable table - can hide items, change color and size.
Also an option to hide historical data - so plots start at market open!
Let me know if any calculations are incorrect, good luck!
- JRien
4 Stop Types:
Based on the stocks ATR (mainly used on daily charts but options if you use other timeframe ATR) and uses a multiple of that ATR to base the plot. Many traders use less than 0.6ATR to base your stop as a rule and max entry 60% from LOD as another rule.
You're able to input your desired % stop and this will dynamically move with the current entry (last) price.
You're able to input your desired price $ stop and this will dynamically move with the current entry (last) price.
Calculates your position based on if you were to have your stop at LOD and also calculates % of ATR away from LOD. Many swing traders use LOD for their stop so this moving dynamically with the current LOD and automatically calculating this is useful.
Calculates:
Entry (Last)
ATR (14 | D)
ATR Stop Price
Manual Stop Percent
Manual Stop Price
Final Stop
Risk per Share ($)
Shares by Risk
Shares by Stake
Final Shares
Final Position Cost
Potential Stop Loss
LOD Price
Loss at LOD
LOD Risk % of Account
LOD dist as % of ATR
Customizable table - can hide items, change color and size.
Also an option to hide historical data - so plots start at market open!
Let me know if any calculations are incorrect, good luck!
- JRien
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.