OPEN-SOURCE SCRIPT
Cập nhật Position Sizer (% of Acct & Shares Req)

- This indicator calculates % position size and share quantity required based on total capital and user-defined risk percentages
- This indicator differs from the Shares Qty indicator in that it is based on %'s rather than a user-defined, fixed dollar amount to risk (for those who prefer to calculate risk in this manner instead)
- Tracks real-time Low of Day (LoD) during regular trading hours (RTH) for accurate stop placement
- Current price as well as output rows 2 and 3 can be toggled on/off, per preference
- Allows stop loss selection between LoD, Low of Week (LoW), and Prior Day Low (PDL)
- Keeps data updating intraday to reflect changing LoD and price conditions
- Provides a second “Stop Loss Compare” dropdown to compare two stop methods side by side
- Displays all results in a dynamic on-chart table that updates with live prices
- Shows capital amount, stop type, stop price, and share counts for three risk levels
========= - Risk rows displayed as: [x%] Risk of Cap Amt: [pos. size as % of Cap Amt], [# shares req.]
=========
Disclaimer:
This indicator is for educational and informational purposes only. It should not be used as the sole basis for trading decisions. Always combine with other forms of analysis, proper risk management techniques, and consider your individual trading plan and risk tolerance. All calculations and outputs are provided as-is, and it is your responsibility to verify their accuracy before making any trading decisions.
Phát hành các Ghi chú
- Added toggle in settings under Table Format to minimize the headers for better visibility on the chart
Phát hành các Ghi chú
- Fixed an issue where Daylight Savings price action was using incorrect LoD values (updated timezone function)
- Added option to calculate risk based on High of Day (HoD) vs Last price, user dropdown selectable
- Added toggle to use Extended Hours data
- Revised descriptions and reorganized some functions for clarity
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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ã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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.