OPEN-SOURCE SCRIPT

Moving Average Candle

737
Moving Average Candle turns up to three moving averages into full OHLC candles instead of plain lines, so you can read a moving average's shape and momentum the way you'd read a price candle. It's built for anyone who wants to see a moving average's open, high, low and close at a glance — for example to judge a moving average's momentum and turning points the way you would judge price action, or to compare several of these MA candles against each other and against the underlying price on the same chart.

Each of the up to three MA candles can independently be calculated as SMA, EMA, WMA, VWMA, HMA, or RMA — standard formulas from TradingView's own library, with no custom modification.

MA Candle (present three times, MA Candle 1–3, each instance identically structured)

Length: number of bars the average is calculated over.
MA Type: calculation method: SMA, EMA, WMA, VWMA, HMA, or RMA.
Candle Style: Wick or Fill.
Bull / Bear: two colors: one for when the moving average's close is above its previous value, the other for the opposite case.

снимок

Each enabled MA candle is built from the moving averages of the bar's open, high, low and close, then colored by whether the moving average's close is rising or falling. The high and low are clamped so they never sit inside the body, which keeps the candle intact even for moving average types like HMA whose weighting can otherwise push a value outside a normal high/low range.

In Wick style, the high and low are drawn as a candle wick, just like a regular price candle. In Fill style, the wick is hidden and the high/low range is shown instead as a shaded band; the candle body stays visible in both styles.

снимок
снимок

This indicator is intended solely for market analysis and does not constitute investment advice or a guarantee of success. Use it at your own discretion and risk; past results are not indicative of future performance.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.