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)

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.