TradingView
everget
Sep 14, 2019 4:26 PM
[RESEARCH] Fancy Shapes
NASDAQ:AAPL
1D
Apple Inc.
NASDAQ
Description
⋅
Sep 14, 2019 4:26 PM
This is what can be done with stacked plot shapes
Trend Analysis
shapes
research
Comments
Hadus
⋅
Dec 11, 2019 2:13 PM
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
⋅
Dec 11, 2019 4:19 PM
@Hadus
, okay :)
Hadus
⋅
Dec 11, 2019 4:55 PM
@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)
More