OPEN-SOURCE SCRIPT

Trendline Indicator for Pionex 2

94
//version=5
indicator("Trendline Indicator for Pionex", overlay=true)

// ----- קו מגמה ידני -----
// יוצרים קו מגמה פשוט לגרירה ידנית
var line trendLine = line.new(x1=bar_index-10, y1=close[10], x2=bar_index, y2=close, extend=extend.right, color=color.blue, width=2)

// קבלת המחיר הנוכחי של הקו
trendPrice = line.get_price(trendLine, bar_index)

// ----- תנאי קנייה ומכירה -----
longCondition = close > trendPrice
shortCondition = close < trendPrice

// ----- הצגה גרפית של תנאי הקנייה והמכירה -----
plotshape(longCondition, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(shortCondition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.