0 beğenilme 0 beğenilmeme
483 kez görüntülendi
//@version=2
strategy("aaa", shorttitle="aaaa", overlay=false)

threshold = input(title="Price Difference Threshold", type=float, defval=0, step=0.001)

getDiff() =>
    yesterday=security(tickerid, 'D', close[1])
    today=security(tickerid, 'D', close)
    delta=today-yesterday
    percentage=delta/yesterday
    
closeDiff = getDiff()
 
buying = closeDiff > threshold ? true : closeDiff < -threshold ? false : buying[1]

hline(0, title="zero line")

bgcolor(buying ? green : red, transp=25)
plot(closeDiff, color=silver, style=area, transp=75)
plot(closeDiff, color=aqua, title="prediction")

longCondition = buying
if (longCondition)
    strategy.entry("Long", strategy.long)

shortCondition = buying != true
if (shortCondition)
    strategy.entry("Short", strategy.short)
Grafik kategorisinde (43 puan) tarafından | 483 kez görüntülendi

1 cevap

0 beğenilme 0 beğenilmeme
merhaba ,

diğer dillere hakim olmadığımızdan olumlu dönüş yapamıyoruz,

formülde ne yapılmak isteniyor net şekilde açıklarsanız belki uyarlanması konusunda yardımcı olabiliriz

bilgilerinize
(40,169 puan) tarafından
9,718 soru
9,677 cevap
5,197 yorum
49,258 kullanıcı