OPEN-SOURCE SCRIPT
Actualizado

HTF Candle Projections [LuxAlgo]

2 316
The HTF Candle Projections indicator projects recent and current higher timeframe candles onto the right side of the chart, providing a clear visualization of macro trends and internal candle composition.

🔶 USAGE

The tool is designed to bridge the gap between lower timeframe execution and higher timeframe context. By projecting HTF candles into the future space (right of the current bar), traders can maintain a clear perspective on the larger trend without constantly switching tabs.

🔹 HTF Trend Alignment
Traders can use the projected candles to ensure their lower timeframe (LTF) entries align with the broader market direction. For instance, a scalp trader might only look for long setups if the current projected Daily candle is bullish. This "Top-Down" filter helps traders avoid "fighting the trend" by providing a constant visual reminder of the HTF candle's polarity and momentum.

🔹 Anticipating Reversals & Level Origins
The indicator includes connection lines that trace back from the projected HTF wicks to the exact LTF bars that established the High and Low of that period. This allows traders to pinpoint the specific price action or "order block" responsible for the HTF extrema. If price returns to the origin of an HTF wick, traders can watch for a reaction, as these levels often represent areas of significant supply or demand.

🔹 Internal Sentiment Divergence
A unique feature of this script is the "Internal Sentiment Bars." These small bars inside the HTF candle body show the ratio of bullish vs. bearish LTF bars that make up that specific HTF candle.
  • If a bullish HTF candle has a high bearish sentiment bar, it suggests a "weak" or "grinding" trend where sellers are actively fighting the move, potentially signaling exhaustion.
  • Conversely, if the sentiment bars align strongly with the HTF candle direction (e.g., a bullish candle with almost entirely bullish sentiment), it indicates a high-conviction "power move" with little resistance.


🔹 Range Play & Breakouts
The indicator highlights the absolute highest high and lowest low of the entire projected sequence with solid connection lines. These lines define the current HTF trading range. Traders can use these boundaries to identify mean reversion opportunities within the range or to prepare for high-probability breakout trades once price moves beyond these absolute levels.

🔹 Visualizing Wick Development
By observing the live development of the current HTF candle, traders can see "wicking" behavior as it happens. If the current price is far from the HTF high but the connection line remains anchored there, it visually confirms a rejection from that level. This real-time feedback is crucial for identifying if an HTF candle is closing as a "Pin Bar" or "Shooting Star" before the timeframe actually expires.

🔶 DETAILS

The script uses a custom data structure to track the Open, High, Low, and Close of the selected timeframe. It also tracks the specific bar index of the highs and lows to draw the connection lines accurately. The absolute high and low of the entire projected sequence are highlighted with solid lines to identify the "Range High" and "Range Low" of the projected window.

🔶 SETTINGS

  • HTF Timeframe: Sets the higher timeframe to be projected (e.g., Daily, Weekly, Monthly).
  • Candle Width (Bars): Determines how many bars wide each projected candle appears on the right side of the chart.
  • Gap Between Candles: Sets the horizontal spacing between the projected HTF candles.
  • Number of HTF Candles: The total number of candles to project (previous completed candles + current live candle).
  • Show Internal Sentiment Bars: Toggles the visibility of the internal bull/bear composition bars.


🔹 Colors

  • HTF Bull/Bear Body: Adjusts the colors and transparency of the main projected candle bodies.
  • Sentiment Bull/Bear: Sets the color for the internal composition bars (ratio of LTF closes).
  • Wick Color: Customizes the color of the projected candle wicks.
  • Connection Line: Sets the color for the dotted lines connecting HTF wicks to their LTF origins.
  • Absolute High/Low Connection: Sets the color for the solid lines marking the highest and lowest points of the projected set.
Notas de prensa
- Fixed memory issues on lower timeframes
Notas de prensa
- Switched to xloc.bar_time to prevent memory issues on drawings

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.