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

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية