Dr_KV

トレンドスカウターα(2色)

//@version=3
study(title="Pattern color", overlay=true)

fast = input(title="FastPeriod", type=integer, defval=25, minval=1)
slow = input(title="SlowPeriod", type=integer, defval=75, minval=1)
trans = input(title="Trans", type=integer, defval=65, minval=0, maxval=100)

FastAvg = sma(close, fast)
SlowAvg = sma(close, slow)

plot(FastAvg, color=#223a70)
plot(SlowAvg, color=red)

clr = if close >= FastAvg and FastAvg > SlowAvg
// pattern1
#0066ff
else
if FastAvg > close and close >= SlowAvg
// pattern2
#FF0000
else
if FastAvg >= SlowAvg and SlowAvg > close
// pattern3
#FF0000
else
if SlowAvg > FastAvg and FastAvg >= close
// pattern4
#FF0000
else
if SlowAvg >= close and close > FastAvg
//pattern5
#0066ff
else
if close > SlowAvg and SlowAvg >= FastAvg
// pattern6
#0066ff
else
#ffffff

bgcolor(clr, transp=trans)
Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact Dr_KV for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases you can find a good open-source alternative for free in our Community Scripts.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?

Warning: please read before requesting access.