TradingView
AshHowes
8. Mrz. 2017 07:04

Swing Size Indicator 

Crude Oil FuturesNYMEX

Beschreibung

Thanks to Golgistain who wrote Pivot Point H/L which is the basis of the following.

An indicator which provides simple information, namely:
a) the distance in points between last swing low and swing high, shown below 0 for low swings and above 0 for high swings, blues for lows, yellows for highs, the circles plotted at bottom (blue) and top (orange).

b) the amount of points in a bear rally between current low and last swing low - teal histograms
c) the amount of points in a bull pullback between current high and last swing high - yellow histograms

With b) and c) there is no plot if the market is above the vwap for low swings, or below the vwap for bull swings. This feature functions as a handy trend filter because it only plots retracement trades in the same direction as the trend encouraging the user to stay on the right side of the market and only go short or long when there is a reasonable amount of points to retest the last swing low or high.

e) the (default) 13 bar atr * (default) 2 above and below the zero value to give in indication of the scope of current market swings. When the histogram values are at or below the default 2, for example, usually it means there is not enough action to trade swings, which the indicator makes quite clear graphically. Also, they make it easy to compare the size of the swing relative to the average range of the bars. Gray lines above/below zero line.

So there is quite a bit of factual information in this indicator to help determine size of swings, possible profit targets (i.e. 2/3rds of swing length) etc. Nothing predictive, just a quick graphic representation in points of information already on the chart but which takes a bit of work extract. This indicator does that work whilst making it easy to instantly compare current situation with previous ones.

NOTE: it gets thrown off by large gap opens either way, usually making unrealistically large values. You have to wait for it to settle down after 13 bars.

NOTE2: also, the default swing setting is 7 bars. This means that only 3 bars after a new swing low it doesn't see that yet and so the histogram won't plot those values. You can shorten the swing length, but that makes other problems. Up to you.

You can also use it to quickly scan and see the typical swing size in points and whether or not it is worth trading.

PS Also on the chart:

IchiClouds - not plotted
Pivots H/L - not plotted
CollectiveMAatr - band is plotted without lines, and the paintbar.
Vwap.
Kommentare
AshHowes
They always take my scripts down because I don't follow the rules!
Here it is:

study("SwingSize")
len = input(10)

lowprice = lowest(low,len)
highprice = highest(high,len)

plot (lowprice-low, color = aqua, style = histogram, title = "lowswing")
plot (highprice - high, color = yellow, style = histogram, title = "highswing")

Personally, I don't use such things. I have a VWAP oscillator which I find more helpful:
This one you can plot on the chart and it shows where the price will go in the opposite direction, i.e. if it's 17 points above the Vwap, this is where 17 points below is:
study(title ="VwapOscChart", overlay = true, scale = scale.right)

osc = (close - vwap)
val = (vwap - osc)

plot(val, color = gray, style = linebr)

For a lower panel indicator:
study(title="VWAPOSC", shorttitle="VwapOsc", overlay=false)
factor = input(3.000),atrlen = input(13),highline = atr(atrlen)*factor, price= input(hlc3),lowline = highline *-1,highline2 = highline *2, lowline2 = lowline*2,
out = vwap(price)
plot(close-out, title="VwapOsc", color=fuchsia, linewidth = 2, style = histogram)
plot (0, color = white,title = "0")

plot (highline, color = white, title = "highline")
plot (lowline, color = white, title = "lowline")
plot (highline2, color = white, title = "highline")
plot (lowline2, color = white, title = "lowline")

Personally, I mainly only use Volume Profile and SR lines, but I also like Ichi when market is trending.
I made an Ichimoku-derived band which is pretty good at showing support and resistance (but also really not necessary, price action alone shows it well)

study("Collective Ichi Donchians",overlay = true)
factor = input(.618),atrlen = 21, price = input(close),

D1 = avg(highest(9),lowest(9)),
D2 = avg(highest(26),lowest(26)),
D3 = avg(highest(52),lowest(52)),
D4 = avg(highest(108),lowest(108)),

DMA = (D1+D2+D3+D4)/4,
HMA = DMA + (atr(atrlen)*factor),
LMA = DMA - (atr(atrlen)*factor),

//plot(vwap,color=fuchsia, linewidth =2, style = circles, title = "vwap")

p1 = plot(HMA, offset = 0, color= yellow, transp = 100, title ="HighBand1")
p2 = plot(LMA, offset = 0, color= aqua, transp = 100, title ="LowBand1")

fill (p1,p2,color = DMA>DMA[1] and DMA[1]>DMA[2] and close > DMA ? olive: DMA<DMA[1] and DMA[1]<DMA[2] and close < (LMA + (HMA-LMA)) ? teal : green, transp = 75, title = "Band")

Enjoy.
BaliShag
Looks nice but I can't find in the library.. What do I have to search for?
Mehr