Dest123

VolumeVsVSMAComparison

Volume vs the volume sma .

Blue is low volume , green is normal, yellow is high, and red is very high.

Top bar is 100sma, middle is 25sma, and bottom is 5 sma .
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

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.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
//@version=2
study("VolumeVsVSMAComparison")
//strategy("Testing")

//changePosition(up) =>
  //  strategy.close_all()
//    up ? strategy.entry("buy", strategy.long, 10) : strategy.entry("sell", strategy.short, 10)
  //  up

smaVal = 100
lowVolume = volume < sma(volume,smaVal)*0.8
highVolume = volume > sma(volume,smaVal)*1.5
mediumHighVolume = volume > sma(volume,smaVal)*1

smaVal2 = 25
lowVolume2 = volume < sma(volume,smaVal2)*0.8
highVolume2 = volume > sma(volume,smaVal2)*1.5
mediumHighVolume2 = volume > sma(volume,smaVal2)*1

smaVal3 = 5
lowVolume3 = volume < sma(volume,smaVal3)*0.8
highVolume3 = volume > sma(volume,smaVal3)*1.5
mediumHighVolume3 = volume > sma(volume,smaVal3)*1

change = sma((close-open),1)
goingUp = ((change > change[1]))// and (change[1] > change[2]))

plot(close,"", lowVolume ? blue : highVolume ? red : mediumHighVolume ? orange : green, linewidth=3)
plot(close-5,"", lowVolume2 ? blue : highVolume2 ? red : mediumHighVolume2 ? orange : green, linewidth=3)
plot(close-10,"", lowVolume3 ? blue : highVolume3 ? red : mediumHighVolume3 ? orange : green, linewidth=3)

//changePosition(goingUp)
//if (not na(goingUp[1]))
    //if (goingUp != goingUp[1])
        //if ((lowVolume[1] or lowVolume[2]) and highVolume) or (highVolume[1] and not highVolume)
        //if goingUp
            //strategy.entry("buy", strategy.long, strategy.position_size == 0 ? 10 : 20)
        //else
//            strategy.entry("sell", strategy.short, strategy.position_size == 0 ? 10 : 20)

//plot(strategy.equity, "", blue)
//plot(strategy.netprofit+100)
//plot(close, "", (goingUp ? green : red))
//plot(open, "", (((sma(open,3) > sma(open,3)[1]) and (sma(open,3)[1] > sma(open,3)[2])) ? green : red))

//plot(macd, color=blue)
//plot(signal, color=orange)