PROTECTED SOURCE SCRIPT

Bayes Probability Index by DGT

Updated
What is Probability?
It is a measure for calculating the chances or the possibilities of the occurrence of a random event. In simple words, it calculates the chance of the favorable outcome amongst the entire possible outcomes. Mathematically, if you want to answer what is probability, it is defined as the ratio of the number of favorable events to the total number of possible outcomes of a random events.

Is this enough? May be or may be not

Let’s consider an example,
A simple probability question may ask: "What is the probability of Amazon.com's stock price falling?"
How about if we extend our question a step further by asking: "What is the probability of AMZN stock price falling given that the Dow Jones Industrial Average (DJIA) index fell earlier?"
Now we are ready to consider conditional probability and Bayes' Theorem is where we could find answer to this question

Bayes' Theorem
Bayes' theorem, named after 18th-century British mathematician Thomas Bayes, is a mathematical formula for determining conditional probability. Conditional probability is the likelihood of an outcome occurring, based on prior knowledge of conditions or another related event occurring. Bayes' theorem provides a way to revise existing predictions or theories (update probabilities) given new or additional evidence. Bayes' theorem thus gives the probability of an event based on new information that is, or may be related, to that event

Formula For Bayes' Theorem
P(A|B) = P(B∣A) * P(A) /P(B)
= P(B∣A) * P(A) / (P(B∣A)* P(A) + P(B∣A’)* P(A’) )

where
A and B are events and P is probability
P(A|B) is the posterior probability, the probability of A after taking into account B
P(A) is the prior probability, the probability of A belief
P(A’) is the prior probability, the probability of A disbelief : P(A’)=1- P(A)
P(B) is the prior probability, the probability of B belief
P(B∣A) is the conditional probability or likelihood, the degree of belief in B given that proposition of A belief (A true)
P(B∣A’) is the conditional probability or likelihood, the degree of belief in B given that proposition of A disbelief (A false)

Bitcoin was the first-ever cryptocurrency, designed by Satoshi Nakamoto. In its likeness, all other cryptocurrencies were then created. The relationship between Bitcoin and altcoins remains something crypto analyst watch closely. This study aims to display the likelihood of bullish movement for ALTS-USDT pairs taking into consideration of bullish move probability of BTC-USDT pair

What to look for:
Percentage Value of the Conditional Probability and/or Simple Probability. When value is above %50 than bullish move is more probable, conversely when the value is below %50 bearish move is more likely

Limitations: Conditional Probability Line will be shown for daily time frame only, Simply Probability Line would be available for all time frames

Conditional Probability is calculated with the condition of BTC-USDT pair so using Conditional Probability is suggested with ALTS-USDT pairs.

Indicators aim to generate a potential signal/indication of an upcoming opportunity, but, the Indicators themselves do not guarantee the future movement of a given financial instrument, and are most useful when used in combination with other techniques.

Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely

Disclaimer: The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Release Notes
small update : warning message added in cases where bayesin conditional probability is not calculated
cases are clearly stated in the description of this study. warning is added in case the description not taken into account
Release Notes
typo correction
Release Notes
major update : multi frame supoort added
Release Notes
major update : usage extended to all markets. Condition to calculate the Bayesian probability of chosen symbol can be selected by the user of their choice that they believe related to the chosen symbol. Condition can be another symbol or index

additionally the base line moved to 0, so values above 0 indicates the probability of bull move is higher and values below 0 indicates the probability of bull move is lower
Release Notes
Update :
* Correlation Coefficient
  - Conditional probability is the likelihood of an outcome occurring, based on prior knowledge of conditions or another related event occurring. In the trading world, trying to find answer to a question such as "What is the probability of AMZN stock price falling by taking into consideration the Dow Jones Industrial Average (DJIA) index?". In this case the likelihood of an outcome occurring will be based on probability calculations including both 'AMZN' and 'DJIA'. Here comes another question, "What is the relationship between 'AMZN' and 'DJIA'? Do they move up and down together or they move in opposite directions?" .
  - As a result addition of Correlation Coefficient graphical display aims to present the relationship of the two instruments, where Correlation Coefficient is used in statistics to measure the correlation between two sets of data, that is, expresses the extent to which two variables are related.
   > Positive values indicate a positive correlation, where the values of both variables tend to increase together.
   > Negative values indicate a negative correlation, where the values of one variable tend to increase when the values of the other variable decrease.
   > The closer value to zero, the weaker the linear relationship

* Statistics Panel
  - Displays Simple Probability, Conditional Probability and Correlation Coefficient outputs

* Pine Script v5 Update
ALTSbayesBTCUSDTconditionalcorrelationCorrelation Coefficient (CC)DGTforecastingprobabilitysentimentstatisticalprobabilityTrend Analysis

Protected script

This script is published closed-source and you may privately use it freely.

Want to use this script on a chart?

Disclaimer