OPEN-SOURCE SCRIPT

Prometheus Cauchy Probability

The Cauchy probability distribution is a distribution that is better suited to be used on non normal data, such as stock returns. Markets characterized by volatility and fat-tails can be better modeled like this.

This script provides two values to a user. The blue line represents the probability for the underlying to rise. The purple line represents its probability to fall. Rise and fall by how much? By default a prediction of 0.5% is set, but users can adjust it. The script automatically calculates based on how many bars would be in an entire day. For example there are 390 minutes from 9:30am to 4:00pm est. time so the script uses 390 bars. Users have the option to set a custom bars back length.

Developer’s note. This script works best with extended market hours on. Every example shown will have it on. The more price and volatility the better!

Code breakdown:



This function is what calculates the Cauchy cumulative density function.



x represents the target price. x0 represents the current highest price of the day. Gamma is the standard deviation of prices over the desired length. x_lo, x0_lo, are variables to determine the probability of falling. Inputting these values into the function we get back our chance of rising and falling. Our blue and purple line.

Trade Examples:
imagen

Step 1: After a move down there is some choppiness, the values are close to each other and moving sharply.

Step 2: The chance to rise (Blue Line) strongly moves above the chance to fall (Purple Line), uptrend ensues.

Step 3: Small breaks below the purple line show breaks in the overall trend.

Step 4: Strong move down in price, and up in purple line end up trend.

imagen

Step 1: Strong cross in purple and blue line, marking the start of a downtrend.

Step 2: Small breaks above the purple line show breaks in the overall trend.

Step 3: Strong move up in price, and up in the blue line end downtrend.

Day trading example:
imagen

Custom input:
Step 1: Pre market weakness ends with a move up in the blue line and price.

Step 2: Consolidation in the uptrend with a small downtrend and above the purple line.

Step 3: Strong move up in price, and up in the blue line end consolidation and resumes strong uptrend.

imagen

This example is with custom input: 100 bars back, and 1% prediction.

Step 1: Downtrend starts after a big move up.

Step 2: Big crossover in blue and purple line. Uptrend starts.

Step 3: Lines get close signaling choppiness.

Step 4: Purple crosses over blue ending uptrend.

No indicator is 100% accurate, we encourage traders to use them along with their own discretion. Please use these tools with your own decision making. Comments about desired features and updates are encouraged!
Bands and ChannelsChart patternsCycles

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad