RicardoSantos

[RS]Point And Figure Overlay V0

Point and Figure Overlay:
  • tf: time frame to use.
  • mode: ATR or Traditional.
  • modeValue: can be whole number for ATR mode(ex:.15) or floating point value for Traditional(ex:.0.12345).
  • reversal: number of reversal bricks.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study("[RS]Point And Figure Overlay V0", shorttitle="[RS]PFO.V0", overlay=true)
tf = input('D')
mode = input('ATR')
modeValue = input(14.00, type=float)
reversal = input(1)

pf = pointfigure(tickerid, 'close', mode, modeValue, reversal)
pfh = pointfigure(tickerid, 'high', mode, modeValue, reversal)
pfl = pointfigure(tickerid, 'low', mode, modeValue, reversal)

spfo = security(pf, tf, open)
spfc = security(pf, tf, close)
spfh = security(pfh, tf, high)
spfl = security(pfl, tf, low)

p1 = plot(spfo, color=gray)
p2 = plot(spfc, color=black)

osc = spfc > spfo ? spfc : spfo
p0 = plot(osc, color=gray)

fill(p0, p1, color=green, transp=70)
fill(p0, p2, color=maroon, transp=70)

t0 = plot(max(spfo, spfc), color=silver)
t1 = plot(spfh, color=silver)
b0 = plot(min(spfo, spfc), color=silver)
b1 = plot(spfl, color=silver)

fill(t0, t1, color=maroon, transp=40)
fill(b0, b1, color=green, transp=40)