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)

Aviso legal

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.