OPEN-SOURCE SCRIPT
Zaktualizowano Candle Countdown & Position Sizer

Candle Countdown & Position Sizer
A compact on-chart table that keeps the two things a scalper checks most in one place: time and size.
It shows:
- Live clock with seconds, in the timezone you pick (Exchange, UTC, NY, London, Tokyo, Sydney).
- Countdown to the next 1m, 5m and 15m candle — so you always know how long the current bar has left. Each row turns to your chosen alert color in the final seconds before the candle closes.
- Suggested lot size based on ATR volatility, so your risk stays constant trade to trade.
How the sizing works
Tell it three things:
- how many dollars you're willing to lose on the trade,
- how wide your stop is, as a multiple of ATR (default 2× ATR),
- the ATR length and smoothing (Wilder or exponential — default EMA 100).
It computes the stop distance from current ATR and returns the lot size that caps your loss at that dollar amount if the stop is hit, rounded to a whole number. Flip on the debug toggle to also see the raw ATR and stop
distance behind the calculation.
Notes
- Updates arrive on price ticks, so during very quiet periods the clock may skip a second.
- Lot size uses the symbol's point value — always confirm it against your broker's contract specs before trading.
- Candle countdowns are anchored to UTC and are exact for intraday timeframes on 24h markets.
Not financial advice — a position-sizing aid. You are responsible for your own risk.
A compact on-chart table that keeps the two things a scalper checks most in one place: time and size.
It shows:
- Live clock with seconds, in the timezone you pick (Exchange, UTC, NY, London, Tokyo, Sydney).
- Countdown to the next 1m, 5m and 15m candle — so you always know how long the current bar has left. Each row turns to your chosen alert color in the final seconds before the candle closes.
- Suggested lot size based on ATR volatility, so your risk stays constant trade to trade.
How the sizing works
Tell it three things:
- how many dollars you're willing to lose on the trade,
- how wide your stop is, as a multiple of ATR (default 2× ATR),
- the ATR length and smoothing (Wilder or exponential — default EMA 100).
It computes the stop distance from current ATR and returns the lot size that caps your loss at that dollar amount if the stop is hit, rounded to a whole number. Flip on the debug toggle to also see the raw ATR and stop
distance behind the calculation.
Notes
- Updates arrive on price ticks, so during very quiet periods the clock may skip a second.
- Lot size uses the symbol's point value — always confirm it against your broker's contract specs before trading.
- Candle countdowns are anchored to UTC and are exact for intraday timeframes on 24h markets.
Not financial advice — a position-sizing aid. You are responsible for your own risk.
Informacje o Wersji
- Risk Mode: Fixed $ or % of Account. Size your position by a fixed dollar risk, or by a percentage of your account balance (new Account Size and Risk % inputs).- Stop split into two rows. Stop ATR (n) shows the stop distance in points (n = your ATR multiple). Stop Cash (x%) shows the actual cash at risk for the suggested lot count — displayed only in % of Account mode, where it's meaningful.
- ATR & Stop now shown by default (the old debug toggle is gone).
- Configurable countdowns. Master show/hide plus three timeframe slots you can each pick and toggle — no longer locked to 1m/5m/15m.
- ATR default is now EMA length 5 (was EMA 100) for a faster read on current volatility.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.