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)

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.