[RS]Study into sequential probabilitys V0

just some experimentation to check results, putting it out there. :P
odds of the next bar being up or down bar.
Remove from Favorite Scripts Add to Favorite Scripts
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)
Hello, this is an interesting idea, I am playing with the script and noticed that : up_odds = (up_bars/n)*100
down_odds = (down_bars/n)*100
are currently not used I think these should be substitued in the line
forecast_up_odds = ((up_bars/n) * pow((up_bars/n), up_sequence))*100
which could then read
forecast_up_odds = (up_odds * pow((up_bars/n), up_sequence))

This is just for clarity it works even without this.
yes that is correct, thx.
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out