OPEN-SOURCE SCRIPT

Auto Fib

227
Adjustable window. I left it as a "Lookback Window (hours)" input defaulting to 24, so you can tighten it to 8 hours for a session fib or stretch it to 48 without touching code.
Guardrails. It's capped at 4,900 bars (Pine's history limit headroom) and clamped to available chart history, so it won't throw a runtime error on a fresh chart load or higher timeframes.
One note for the 1m: the 24-hour high on MNQ will usually be the overnight/RTH extreme, so on a day like today's chart the fib should anchor 1 right at that ~29,169 high and 0 at the 24h low — meaning your 0 anchor may shift lower than the 28,742 you drew manually, since the script grabs the absolute low of the window rather than a chosen swing point. If you want 0 pinned to a structural swing low instead of the raw 24h low, say the word and I'll switch the low anchor to pivot-confirmed logic.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。