OPEN-SOURCE SCRIPT

קריפטוניור - קווי שיאים/שפלים אוטומטיים

99
//version=5
indicator("קריפטוניור - קווי שיאים/שפלים אוטומטיים", overlay=true)

// הגדרת פרמטרים
pivotLen = input.int(5, title="אורך פיבוט (מס׳ נרות)")
lineLength = input.int(100, title="אורך קו (מס׳ נרות להארכה)")

// זיהוי שיאים ושפלים
pivotHigh = ta.pivothigh(high, pivotLen, pivotLen)
pivotLow = ta.pivotlow(low, pivotLen, pivotLen)

// ציור קווים אופקיים מהשיאים/שפלים
if not na(pivotHigh)
line.new(bar_index - pivotLen, pivotHigh, bar_index - pivotLen + lineLength, pivotHigh, color=color.red, width=1, extend=extend.none)

if not na(pivotLow)
line.new(bar_index - pivotLen, pivotLow, bar_index - pivotLen + lineLength, pivotLow, color=color.green, width=1, extend=extend.none)

// תווית לזיהוי אינדיקטור
plotshape(pivotHigh, location=location.abovebar, style=shape.triangledown, size=size.tiny, color=color.red)
plotshape(pivotLow, location=location.belowbar, style=shape.triangleup, size=size.tiny, color=color.green)

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.