SteynTrade

Colored Volume Bars standard deviation from mean

The colour bars:
Green: Price up - Volume > 2 x STD of last 21 bars
Blue: Price up - Volume > 1 x STD of last 21 bars
Maroon: Price down - Volume > 2 x STD of last 21 bars
Purple: Price down - Volume > 1 x STD of last 21 bars
Grey: not high volume bar
Green line: 2 bar sma
Red line: 8 period sma of the greenline
Bollinger band: 55 period sma of the 21 period sma with bands 1.618 deviation from the mean

Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?
//
// @PVSA volume indicator -SteynTrade
//
study("Colored Volume Bars standard deviation from mean", shorttitle="Volume Deviation")
lookback=input(21)
showMA=input(true)
lengthMA1=input(2)
lengthMA2=input(8)
lengthband=input(55)

v1=volume
c1=close
o1=open

vsma1=sma(v1,lengthMA1)
vsma2=sma(vsma1,lengthMA2)
vsma3=sma(v1[lookback],lookback)
vstd=stdev(v1[lookback],lookback)

c=	iff(c1>o1 and v1>(vsma3+(2 * vstd)), green,
	iff(c1>o1 and v1>(vsma3+vstd), blue, 
	iff(c1<o1 and v1>(vsma3+(2 * vstd)), maroon,
	iff(c1<o1 and v1>(vsma3+vstd), purple, gray))))
plot(v1, style=columns, color=c)
plot(vsma1, style=line, color=green)
plot(vsma2, style=line, color=red, linewidth=2)


ma=sma(vsma1,lengthband)
offs=(1.618 * stdev(vsma1, lengthband))
up=ma+offs
dn=ma-offs
mid=(up+dn)/2
plot(showMA?up:na, color=black)
plot(showMA?dn:na, color=black)
plot(showMA?mid:na, color=blue, linewidth =2)