OPEN-SOURCE SCRIPT
Position Size Calculator (For Breakout/Pullback Immediate Entry)

This is a trading script designed specifically for swing traders who use the Low of the Day (LOD) as their stop loss — a strategy employed by legendary traders such as Oliver Kell, Maggie, and many other professional market operators.
The core purpose of this script is to deliver instant and accurate share quantity calculations at the exact moment of a breakout or pullback entry. It eliminates time-consuming manual calculations, allowing you to execute your orders quickly and avoid missing the optimal entry price as the stock price often surges within minutes.
The script is self-explanatory. Shares to buy = Risk per Trade / Difference to LOD. If it shows "BAD", it means either Difference to LOD > half of ATR or 5%
The core purpose of this script is to deliver instant and accurate share quantity calculations at the exact moment of a breakout or pullback entry. It eliminates time-consuming manual calculations, allowing you to execute your orders quickly and avoid missing the optimal entry price as the stock price often surges within minutes.
The script is self-explanatory. Shares to buy = Risk per Trade / Difference to LOD. If it shows "BAD", it means either Difference to LOD > half of ATR or 5%
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.