// === MÔ HÌNH DOUBLE TOP === doubleTop = swingHigh(high, 10) and ta.highest(high, 5) == high if doubleTop label.new(x=time, y=high, text="DT", color=color.red, textcolor=color.white, size=size.small)
// === MÔ HÌNH HEAD & SHOULDERS === leftShoulder = swingHigh(high, 20) head = swingHigh(high, 10) and high > ta.highest(high, 20) rightShoulder = swingHigh(high, 20) and ta.highest(high, 10) < high headShoulders = leftShoulder and head and rightShoulder if headShoulders label.new(x=time, y=high, text="H&S", color=color.orange, textcolor=color.white, size=size.small)
// === MÔ HÌNH CUP & HANDLE === cupFormation = swingLow(low, 20) and ta.lowest(low, 10) == low handleFormation = swingHigh(high, 5) and high < ta.highest(high, 10) cupHandle = cupFormation and handleFormation if cupHandle label.new(x=time, y=low, text="C&H", color=color.green, textcolor=color.white, size=size.small)
// === MÔ HÌNH TAM GIÁC (Triangle) === triangleUp = swingHigh(high, 10) and ta.highest(high, 5) < high triangleDown = swingLow(low, 10) and ta.lowest(low, 5) > low if triangleUp label.new(x=time, y=high, text="▲", color=color.blue, textcolor=color.white, size=size.small) if triangleDown label.new(x=time, y=low, text="▼", color=color.blue, textcolor=color.white, size=size.small)
In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e testarlo. Complimenti all'autore! Puoi usarlo gratuitamente, ma il riutilizzo di questo codice nelle pubblicazioni è disciplinato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.
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.