OPEN-SOURCE SCRIPT

First Candle +0.9% Line

91
//version=5
indicator("First Candle +0.9% Line", overlay=true)

// Capture the closing price of the first candle
var float first_candle_close = na

if (bar_index == 0)
first_candle_close := close

// Calculate the 0.9% level above the first candle's closing price
level = first_candle_close * 1.009 // 0.9% above the first candle close

// Plot the line at the calculated level
plot(series=level, color=color.red, linewidth=2, title="0.9% Above First Candle")

// Optional: Add a label to mark the level
if not na(first_candle_close)
label.new(x=bar_index, y=level, text="+0.9% Level", color=color.red, style=label.style_label_down, textcolor=color.white)

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.