selam.

TW de kullandığım 9-15-kıjunsen indikatörünü yapamıyorum. wma lar indikatörsüz yapmak mümkün ancak kıjunsen yapamıyorum. rica etsem yardımcı olur musunuz?

codeler;

ma3_len = input(9, "Length", group='WMA')

src3 = input(close, "Source")

res3 = input.timeframe('1W', "Resolution", title="wma9Periyod")

htf_ma3 = ta.wma(src3, ma3_len)

out3 = request.security(syminfo.tickerid, res3, htf_ma3)

plot(out3, color=color.rgb(10, 147, 0), linewidth=3, title='WMA-9HAFTALIK')

 

ma4_len = input.int(15, "Length", group='WMA')

src4 = input(close, "Source")

res4 = input.timeframe('1W', "Resolution", title="wma15Periyod")

htf_ma4 = ta.wma(src4, ma4_len)

out4 = request.security(syminfo.tickerid, res4, htf_ma4)

plot(out4, color=color.rgb(255, 136, 0), linewidth=3, title='WMA-15HAFTALIK')

 

// Haftalık 9 EMA'nın %15 fazlasını hesapla

percent_increase = input.int(15, title="Percent Increase") / 100

 

// ATR'yi kullanmadan %15 artışı hesapla

trailing_percent = 1 + percent_increase

trailing_value = out3 * trailing_percent

 

// Plot the trailing line

plot(trailing_value, color=color.rgb(0, 4, 7), linewidth=2, style=plot.style_cross, title='Trailing %15')

 

// Haftalık 9 WMA'nın %30 fazlasını hesapla

percent_increase1 = input.int(30, title="Percent Increase") / 100

 

// ATR'yi kullanmadan %30 artışı hesapla

trailing_percent1 = 1 + percent_increase1

trailing_value1 = out3 * trailing_percent1

 

// Plot the trailing line

plot(trailing_value1, color=color.rgb(255, 0, 0), linewidth=1, title='Trailing %30')

 

/////

// Haftalık 9 WMA'nın %40 fazlasını hesapla

percent_increase2 = input.int(40, title="Percent Increase") / 100

 

// ATR'yi kullanmadan %40 artışı hesapla

trailing_percent2 = 1 + percent_increase2

trailing_value2 = out3 * trailing_percent2

 

// Plot the trailing line

plot(trailing_value2, color=color.rgb(255, 136, 0), linewidth=1, title='Trailing %40')

 

///////

// Haftalık 9 WMA'nın %50 fazlasını hesapla

percent_increase3 = input.int(50, title="Percent Increase") / 100

 

// ATR'yi kullanmadan %60 artışı hesapla

trailing_percent3 = 1 + percent_increase3

trailing_value3 = out3 * trailing_percent3

 

// Plot the trailing line

plot(trailing_value3, color=color.rgb(184, 0, 65), linewidth=1, title='Trailing %50')

 

// Haftalık 9 WMA'nın %60 fazlasını hesapla

percent_increase4 = input.int(70, title="Percent Increase") / 100

 

// ATR'yi kullanmadan %60 artışı hesapla

trailing_percent4 = 1 + percent_increase4

trailing_value4 = out3 * trailing_percent4

 

// Plot the trailing line

plot(trailing_value4, color=color.rgb(184, 0, 65), linewidth=1, title='Trailing %70')

 

///kijunsel

 

Midpoint(length) =>

    math.avg(ta.highest(length), ta.lowest(length))

 

kijunTimeFrame = input.timeframe('1W', group="kijunsen")

kijunPeriods = input.int(20, title='Kijun Periods', minval=1, group="kijunsen")

 

kijun = request.security(syminfo.tickerid, kijunTimeFrame, Midpoint(kijunPeriods))

 

plot(kijun, title='Kijun Target', color=color.new(#820179, 0), linewidth=2)