OPEN-SOURCE SCRIPT
내 스크립트

//version=5
indicator("W Pattern (Double Bottom) Alert", overlay=true)
// Pivot 설정
leftBars = 3
rightBars = 3
// 피벗 로우(저점) 두 개 탐지
pLow1 = ta.pivotlow(low, leftBars, rightBars)
pLow2 = ta.pivotlow(low, leftBars, rightBars)
// 두 번째 저점이 최근 형성되었는지
secondBottom = not na(pLow2)
// W 패턴 조건
// 1) 첫 번째 저점 존재
// 2) 두 번째 저점 존재
// 3) 두 저점 사이의 고점이 존재(넥라인)
neckline = ta.highest(high, leftBars * 4)
// 두 저점 간 가격 간격 조건 (너무 벌어지면 안됨)
validSpacing = pLow2 - pLow1 < pLow1 * 0.1
// 최종 W 패턴 조건
Wpattern = secondBottom and validSpacing and close > neckline
// 차트 표시
plotshape(secondBottom, title="Second Bottom", color=color.orange, style=shape.triangleup, size=size.tiny)
plot(neckline, "Neckline", color=color.yellow)
// 알림 트리거
alertcondition(Wpattern, title="W Pattern Detected", message="W 패턴(더블 바텀) 발생!")
indicator("W Pattern (Double Bottom) Alert", overlay=true)
// Pivot 설정
leftBars = 3
rightBars = 3
// 피벗 로우(저점) 두 개 탐지
pLow1 = ta.pivotlow(low, leftBars, rightBars)
pLow2 = ta.pivotlow(low, leftBars, rightBars)
// 두 번째 저점이 최근 형성되었는지
secondBottom = not na(pLow2)
// W 패턴 조건
// 1) 첫 번째 저점 존재
// 2) 두 번째 저점 존재
// 3) 두 저점 사이의 고점이 존재(넥라인)
neckline = ta.highest(high, leftBars * 4)
// 두 저점 간 가격 간격 조건 (너무 벌어지면 안됨)
validSpacing = pLow2 - pLow1 < pLow1 * 0.1
// 최종 W 패턴 조건
Wpattern = secondBottom and validSpacing and close > neckline
// 차트 표시
plotshape(secondBottom, title="Second Bottom", color=color.orange, style=shape.triangleup, size=size.tiny)
plot(neckline, "Neckline", color=color.yellow)
// 알림 트리거
alertcondition(Wpattern, title="W Pattern Detected", message="W 패턴(더블 바텀) 발생!")
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.