OPEN-SOURCE SCRIPT
MudHome - HTF Last X Candles (Range + Live Price Label)

This indicator provides a live Higher Timeframe (HTF) context overlay on lower-timeframe charts by displaying the most recent HTF candles as a compact inset, alongside a dynamically updating price range.
It plots the last N HTF candles (up to 10), including the currently forming HTF candle, arranged left-to-right in standard chart order. This allows traders to visually track HTF structure, expansion, and volatility in real time while executing on lower timeframes.
Key Features
Displays the most recent HTF candles, including the live, still-forming candle
Candles are drawn to the right of price, preserving chart clarity
Automatically calculates and displays the HTF range high and low across the selected candles
Range labels update dynamically as the current HTF candle expands
Shows a live current-price label, updating tick-by-tick
Clean, minimal presentation — no cluttered OHLC labels
Fully configurable candle spacing, body width, colors, and offsets
Smart Validation
The indicator only renders when the selected timeframe is higher than the chart timeframe
If not, a clear prompt is shown: “Select a higher time frame”
Ideal Use Cases
HTF bias and context on LTF execution charts
Range expansion and contraction analysis
ICT-style dealing range, premium/discount framing
Session and structure awareness without switching timeframes
This tool is designed to act as a live HTF context box, keeping higher-timeframe structure visible at all times while you focus on execution.
It plots the last N HTF candles (up to 10), including the currently forming HTF candle, arranged left-to-right in standard chart order. This allows traders to visually track HTF structure, expansion, and volatility in real time while executing on lower timeframes.
Key Features
Displays the most recent HTF candles, including the live, still-forming candle
Candles are drawn to the right of price, preserving chart clarity
Automatically calculates and displays the HTF range high and low across the selected candles
Range labels update dynamically as the current HTF candle expands
Shows a live current-price label, updating tick-by-tick
Clean, minimal presentation — no cluttered OHLC labels
Fully configurable candle spacing, body width, colors, and offsets
Smart Validation
The indicator only renders when the selected timeframe is higher than the chart timeframe
If not, a clear prompt is shown: “Select a higher time frame”
Ideal Use Cases
HTF bias and context on LTF execution charts
Range expansion and contraction analysis
ICT-style dealing range, premium/discount framing
Session and structure awareness without switching timeframes
This tool is designed to act as a live HTF context box, keeping higher-timeframe structure visible at all times while you focus on execution.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.