Sanıyorum, "Saksıyı çalıştırınca biraz daha yakın bir tahmin geliştirdim."
Diyelim:
Geçen yılın kapanışına göre, sonraki 12 aylık periyodda,
ENKAI hissesi XU030, XU100 ve XAUUSD ilişkisi nasıl gelişmiş. Oransal ENKAI fiyatı nasıl oluşmuş "son kapanışa göre"...:
https://i.ibb.co/8sVgmSj/secenek.png
Yaklaştım mı?
Kod:
//@version=5
indicator (title='Yeni StratejiGa', shorttitle='PSG', overlay=false)
per=input.timeframe(title='Per1', defval="12M")
xclose1 = request.security(syminfo.tickerid, per, close[1])
xclose = request.security(syminfo.tickerid, per, close)
cls=input.source(close)
endeks1 = input.string("BIST:XU030", "Endeks1", options=["BIST:XU030", "BIST:XU100", "FXOPEN:XAUUSD"])
endeks2 = input.string("BIST:XU100", "Endeks2", options=["BIST:XU030", "BIST:XU100", "FXOPEN:XAUUSD"])
endeks3 = input.string("FXOPEN:XAUUSD", "Endeks3", options=["BIST:XU030", "BIST:XU100", "FXOPEN:XAUUSD"])
e1close = request.security(endeks1, per, close[1])
e2close = request.security(endeks2, per, close[1])
e3close = request.security(endeks3, per, close[1])
float e1x = ((xclose1 / e1close)+1) * xclose
float e2x = ((xclose1 / e2close)+1)* xclose
float e3x = ((xclose1 / e3close)+1)* xclose
plot(e1x, color=color.rgb(70, 166, 255), title="endeks1", linewidth = 1 , style=plot.style_circles)
plot(e2x, color=color.rgb(255, 8, 160), title="endeks2", linewidth = 1 , style=plot.style_circles)
plot(e3x, color=color.rgb(187, 255, 0), title="endeks3", linewidth = 1 , style=plot.style_circles)
plotcandle(open, high, low, close, color=close < open ? color.red : color.green, bordercolor=close < open ? color.red : color.green, title="fiyat")