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)