BYBIT:BTCUSD.P   BTCUSD Perpetual Contract
//@version=4
study("Wolfe Waves", overlay=true)

// Impostazioni personalizzabili
bullish_color = color.green
bearish_color = color.red

// Trova uno schema Wolfe su grafici a 5 minuti
h1 = security(syminfo.tickerid, '5', high)
h2 = security(syminfo.tickerid, '5', high)
h3 = security(syminfo.tickerid, '5', high)
h4 = security(syminfo.tickerid, '5', high)
l1 = security(syminfo.tickerid, '5', low)
l2 = security(syminfo.tickerid, '5', low)
l3 = security(syminfo.tickerid, '5', low)
l4 = security(syminfo.tickerid, '5', low)
a = h1 - l1
b = h2 - l2
c = h3 - l3
d = h4 - l4
e = 0.618 * a
f = 0.618 * b
g = 0.618 * c
x1 = bar_index
y1 = l4
x2 = bar_index
y2 = h3
x3 = bar_index
y3 = l3
x4 = bar_index
y4 = h2

if (h1 < h2 and l1 < l2 and h2 < h3 and l2 > l3 and h3 < h4 and l3 > l4 and (abs(b / a - 1) < 0.01 or abs(c / b - 1) < 0.01 or abs(d / c - 1) < 0.01))
// Impostazioni di collegamento personalizzabili
line_style = line.style_dashed
line_width = 2
line_color = bullish_color
line_color_ext = bearish_color

// Disegna la struttura del modello Wolfe
line.new(x1, y1, x2, y2, extend=extend.right, style=line_style, width=line_width, color=line_color)
line.new(x2, y2, x3, y3, extend=extend.both, style=line_style, width=line_width, color=line_color_ext)
line.new(x3, y3, x4, y4, extend=extend.both, style=line_style, width=line_width, color=line_color)

// Disegna le linee di estensione del modello Wolfe
target_range = d + e + f + g
if (h4 + target_range > y2)
line.new(x4, y4, x4 + target_range, y2, extend=extend.right, style=line_style, width=line_width, color=line_color)
if (l4 - target_range < y2)
line.new(x4, y4, x4 - target_range, y2, extend=extend.right, style=line_style, width=line_width, color=line_color)
if (h4 + target_range > y3)
line.new(x3, y3, x3 + target_range, y3 + target_range, extend=extend.right, style=line_style, width=line_width, color=line_color_ext)
if (l4 - target_range < y3)
line.new(x3, y3, x3 - targe
Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.