//@version=2 study('GreenMood inchart KST', overlay=true) //data = close >= open //plotshape(data, style=shape.triangleup,location=location.abovebar, color=green) //plotshape(not data, style=shape.triangledown,location=location.belowbar, color=red) // KST VARIABLE ROC1=input(10) ROC2=input(13) ROC3=input(15) ROC4=input(20) SMA1=input(6) Magnitude_Bull=input(-0.5) Magnitude_Bear=input(0.5) // KST INPUT ROCma1 = sma(roc(close,ROC1), 10) ROCma2 = sma(roc(close,ROC2), 10) ROCma3 = sma(roc(close,ROC3), 10) ROCma4 = sma(roc(close,ROC4), 15) ZeroLine = hline(0) // KST CALCULATION KST = ROCma1 + (ROCma2*2) + (ROCma3*3) + (ROCma4*4) SIGNAL = sma (KST, SMA1) plotgreenKST = iff((crossover(KST, SIGNAL)) and KST <Magnitude_Bull, crossover(KST,SIGNAL),na) plotredKST = iff((crossunder(KST, SIGNAL)) and KST >Magnitude_Bear, crossunder(KST,SIGNAL),na) // KST OUTPUT plotshape(plotgreenKST, style=shape.triangleup, location=location.bottom, color=lime, size=size.small, text="KST Buy") plotshape(plotredKST, style=shape.triangledown, location=location.top, color=red, size=size.small, text="KST Sell")