Greenmood

GreenMood inchart KST

Threshold min / max as well as usual KST 0.41% settings (ROCx, SMA ) can be changed in format view.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//@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")