OPEN-SOURCE SCRIPT

Fractal Levels with AVWAP and MACD

//version=5
indicator("Fractal Levels with AVWAP and MACD", overlay=true)

// Fractal Levels
length = input(2, title="Fractal Length")
fractalHigh = high[length] == ta.highest(high, length * 2 + 1) ? high[length] : na
fractalLow = low[length] == ta.lowest(low, length * 2 + 1) ? low[length] : na

plot(fractalHigh, title="Fractal High", color=color.red, style=plot.style_circles, linewidth=3)
plot(fractalLow, title="Fractal Low", color=color.green, style=plot.style_circles, linewidth=3)

// AVWAP Calculation
var float avwap = na
if bar_index == 0
avwap := na
else
avwap := na(avwap) ? ta.vwap(close, volume) : avwap + (close * volume - avwap * volume) / (volume + volume)

// Plotting AVWAP
plot(avwap, color=color.blue, title="AVWAP")

// MACD Calculation
[macdLine, signalLine, macdHist] = ta.macd(close, 12, 26, 9)

hline(0, "Zero Line", color=color.gray)
plot(macdHist, color=color.blue, title="MACD Histogram", style=plot.style_histogram)
plot(macdLine, color=color.red, title="MACD Line")
plot(signalLine, color=color.green, title="Signal Line")
Candlestick analysisFractalTrend Analysis

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité