本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。
//@version=3
//Author: MS Money Moves, LLC
//Kevin D.
//Published 9/29/2019
//Tested in high volatility stocks (biotech) but also works great for Futures, Crypto and other Currency trading.
//
//This CCI will produce harmonic patterns that I have found to be "HIDDEN" within charts. Other patterns I have found include both bullish and bearish Head & Shoulders and Cup+handles.
//Patterns are to be interpreted the same as one would see price action within a chart.
study(title="CCI+EMA", shorttitle="MS_SQUEEZE_CCI")
length1 = input(14, minval=1, title="CCI")
ma_length = input(13, minval=5, title="MA")
src = input(close, title="Source")
ma1 = sma(src, length1)
cci1 = (src - ma1) / (0.015 * dev(src, length1))
//---------------
plot(cci1, linewidth=2)
plot(ema(cci1, ma_length), color=red, linewidth=1)
//-----------
plotColr = (cci1 > ema(cci1, ma_length)) ? lime : black
plotCCIEMA = plot(series=cci1, color=plotColr, linewidth=2)
//------------
band5 = hline(300, color=red)
band0 = hline(200, title="Overbought", color=red)
band1 = hline(100, color=black)
band2 = hline(0,title="zero")
band3 = hline(-100, color=black)
band4 = hline(-200, title="Oversold", color=green)
band6 = hline(-300, color=green)
//-------------
fill(band0, band4, color=blue, transp=95)
fill(band4, band6, color=lime, transp=95)
fill(band0, band5, color=red, transp=95)
//-------------