OPEN-SOURCE SCRIPT

First Candle +0.9% Line

82
//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)

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.