RicardoSantos

[RS]Study into sequential probabilitys V0

EXPERIMENTAL:
just some experimentation to check results, putting it out there. :P
odds of the next bar being up or down bar.
สคริปต์โอเพนซอร์ซ

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
//@version=2
study(title='[RS]Study into sequential probabilitys V0')
up_bar = close > open
down_bar = close < open

up_sequence = max(0, barssince(up_bar == 0) - 1)
down_sequence = max(0, barssince(down_bar == 0) - 1)

up_bars = cum(up_bar)
down_bars = cum(down_bar)

up_odds = (up_bars/n)*100
down_odds = (down_bars/n)*100

forecast_up_odds = ((up_bars/n) * pow((up_bars/n), up_sequence))*100
forecast_down_odds = ((down_bars/n) * pow((down_bars/n), down_sequence))*100

plot(forecast_up_odds, color=green)
plot(forecast_down_odds, color=maroon)