tux

TUX Time Trend

This script was inspired by @ChartArt.
GREEN = UPTREND
RED = DOWNTREND

TREND IS DETERMINED BY IF THE CLOSE IS BELOW OR ABOVE THE SMA SET (DEFAULT 20)
It has the trend of the following time-frames:
1 HR
2 HR
3 HR
4 HR
6 HR
8 HR
12 HR
1 DAY
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?
study(title="TUX Time Trend", shorttitle="TUX Time Trend", overlay=true)
len = input(20, minval=1, title="Length")
src = input(close, title="Source")
out = sma(src, len)
//plot(out, color=blue, title="MA")
s1 = security(ticker, "60", sma(close,len)) // 1 HR 
s1c = iff(security(ticker, "60", sma(close,len)) > security(ticker, "60", close), red, green)
plot(s1,linewidth=2, title="1 HR", color=s1c)

s2 = security(ticker, "120", sma(close,len)) // 2 HR 
s2c = iff(security(ticker, "120", sma(close,len)) > security(ticker, "120", close), red, green)
plot(s2,linewidth=2, title="2 HR", color=s2c)

s3 = security(ticker, "180", sma(close,len)) // 3 HR 
s3c = iff(security(ticker, "180", sma(close,len)) > security(ticker, "180", close), red, green)
plot(s3,linewidth=2, title="3 HR", color=s3c)

s4 = security(ticker, "240", sma(close,len)) // 4 HR 
s4c = iff(security(ticker, "240", sma(close,len)) > security(ticker, "240", close), red, green)
plot(s4,linewidth=2, title="4 HR", color=s4c)

s6 = security(ticker, "360", sma(close,len)) // 6 HR 
s6c = iff(security(ticker, "360", sma(close,len)) > security(ticker, "360", close), red, green)
plot(s6,linewidth=2, title="6 HR", color=s6c)

s8 = security(ticker, "480", sma(close,len)) // 8 HR 
s8c = iff(security(ticker, "480", sma(close,len)) > security(ticker, "480", close), red, green)
plot(s8,linewidth=2, title="8 HR", color=s8c)

s12 = security(ticker, "720", sma(close,len)) // 12 HR 
s12c = iff(security(ticker, "720", sma(close,len)) > security(ticker, "720", close), red, green)
plot(s12,linewidth=2, title="12 HR", color=s12c)

sd = security(ticker, "D", sma(close,len)) // D 
sdc = iff(security(ticker, "D", sma(close,len)) > security(ticker, "D", close), red, green)
plot(sd,linewidth=2, title="D", color=sdc)

sw = security(ticker, "W", sma(close,len)) // D 
swc = iff(security(ticker, "W", sma(close,len)) > security(ticker, "W", close), red, green)
//plot(sw,linewidth=2, title="W", color=swc)

sm = security(ticker, "M", sma(close,len)) // D 
smc = iff(security(ticker, "M", sma(close,len)) > security(ticker, "M", close), red, green)
//plot(sm,linewidth=2, title="M", color=smc)