// === 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 true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publications is governed by House rules. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.
هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.