OPEN-SOURCE SCRIPT

Lanczos Candles

This indicator reconstructs price action using Lanczos resampling, incorporating lower timeframe data to create a more detailed representation of market movements. Traditional candle aggregation on higher timeframes tends to lose some price action detail - this indicator attempts to preserve more of that information through mathematical resampling.

The indicator samples price data from a lower timeframe and uses the Lanczos algorithm, a mathematical method commonly used in signal processing and image resampling, to reconstruct the price series at the chart's timeframe. The process helps maintain price movements that might otherwise be smoothed out in regular candle aggregation.

The main settings allow you to select the source timeframe for sampling, adjust the Lanczos filter width to balance smoothness versus detail preservation, and optionally enable Heikin Ashi calculation. The filter width parameter (default: 3) affects how aggressive the smoothing is - higher values produce smoother results while lower values retain more of the original variation.

This approach can be useful for technical analysis when you want to work with higher timeframes while maintaining awareness of significant price movements that occurred within those candles. The optional Heikin Ashi mode can help visualize trends in the resampled data.

The indicator works best when there's a clear ratio between your chart timeframe and the source timeframe (for example, using 1-minute data to build 5-minute candles).
ashiCandlestick analysisdspeducationalheikinheikin-ashiheikinashijapaneseLTFPine utilitiesresampleupscale

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


También en:

Exención de responsabilidad