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%
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.