RicardoSantos

[RS]Average Expansion Dynamic Oscillator V0

EXPERIMENTAL:
Oscillator Version.
calculation of extremes and price range for averaging movement.
while price is above market is rising, when bellow market is falling. also can discern strength from the gap of the averages.
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
study(title='[RS]Average Expansion Dynamic Oscillator V0', overlay=false)
window = input(title='Interval Window:', type=integer, minval=1, defval=5)
multiplier = input(title='Average Multiplier:', type=float, minval=0.01, maxval=0.99, defval=0.5)

h = valuewhen(high >= highest(window), high, 0)
l = valuewhen(low <= lowest(window), low, 0)

rising_falloff = l + ((highest(window)-l)*multiplier)
falling_falloff = h - ((h-lowest(window))*multiplier)

//plot(title='High Extreme', series=h, color=h!=h[1]?na:black)
//plot(title='Low Extreme', series=l, color=l!=l[1]?na:black)

//plot(title='+ Decay', series=rising_falloff, color=rising(rising_falloff, window)?green:silver)
//plot(title='- Decay', series=falling_falloff, color=falling(falling_falloff, window)?maroon:silver)

buy = max(close, falling_falloff)-falling_falloff
sel = min(close, rising_falloff) - rising_falloff

plot(title='+ Decay', series=buy, style=line, color=green, linewidth=1)
plot(title='- Decay', series=sel, style=line, color=maroon, linewidth=1)
plot(title='+ Decay', series=buy, style=histogram, color=green, linewidth=2)
plot(title='- Decay', series=sel, style=histogram, color=maroon, linewidth=2)