TradingView
everget
14 set 2019 16:26

[RESEARCH] Fancy Shapes 

Apple Inc.NASDAQ

Descrizione

This is what can be done with stacked plot shapes
Commenti
Hadus
Maybe for the last candle we could even make the shape change as the current price changes.. I'll see what I can do :)
everget
@Hadus, okay :)
Hadus
@everget, try it on a forex pair (it updates better on those for some reason).

Not perfect but pretty cool.

//@version=4
study("Fancy Moving Shape", overlay=false)

frames = 3
frame = (timenow/1000)%frames

y0 = frame-1
offset0 = 0
colour = frame==0 ? color.red : frame==1 ? color.purple : frame==2 ? color.blue : color.black

plot(3, transp=100)
plot(-3, transp=100)

plotshape(y0, location=location.absolute, style=shape.flag, size=size.huge, color=colour, transp=80, show_last=1, offset=offset0)
plotshape(y0, location=location.absolute, style=shape.flag, size=size.large, color=colour, transp=80, show_last=1, offset=offset0)
plotshape(y0, location=location.absolute, style=shape.flag, size=size.normal, color=colour, transp=80, show_last=1, offset=offset0)
plotshape(y0, location=location.absolute, style=shape.flag, size=size.small, color=colour, transp=80, show_last=1, offset=offset0)
plotshape(y0, location=location.absolute, style=shape.flag, size=size.tiny, color=colour, transp=80, show_last=1, offset=offset0)
Altro