Price Close ProbabilityThe Price Close Probability Indicator is designed to help traders estimate the likelihood of price closing above or below specified levels within a given bar. By placing two levels on your chart, you can quickly gauge the probability of the current price bar closing above or below these levels in real-time.
Key Features:
Dynamic Probability Calculation: The indicator continuously updates the probability of price closing above or below your set levels as the current bar progresses, providing you with timely insights as the bar approaches its close.
Customizable Standard Deviation : Adjust the length of the Standard Deviation used in the calculations to tailor the probability estimates to your preferred settings.
User-Friendly Probability Table : A clean, easy-to-read table displays the calculated probabilities, helping you make informed trading decisions at a glance.
Assumptions and Considerations:
While the indicator assumes that returns are normally distributed, which may not fully reflect reality, it still offers a valuable approximation of the probabilities for price movement within the current bar.
Future Enhancements (Coming Soon):
Multi-Bar Probability: Calculate probabilities across multiple bars to enhance your forecasting capabilities.
Additional Levels: Set more than two levels for a broader analysis of price movements.
Refined Distribution Modeling: Improve the accuracy of probability calculations by adjusting for more realistic return distributions.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.

# Probabilities

Price Scenarios - The Quant ScienceGENERAL OVERVIEW
Price Scenarios - The Quant Science is a quantitative statistical indicator that provides a forecast probability about future prices moving using the mathematical-statistical formula of statistical probability and expected value.
HOW TO USE
The indicator displays arrow-shaped signals that represent the probable future price movement calculated by the indicator, including the current percentage probability. Additionally, the candlesticks are colored based on the predicted direction to facilitate visual analysis. By default, green is used for bullish movements and red for bearish movements. The trader can set the analysis period (default value is 200) and the percentage threshold of probability to consider (default value is greater than 0.50 or 50%) through the user interface.
USER INTERFACE
Lenght analysis: with this features you can handle the length of the dataset to be used for estimating statistical probabilities.
Expected value: with this feature you can handle the threshold of the expected value to filter, only probabilities greater than this threshold will be considered by the model. By default, it is set to 0.50, which is equivalent to 50%.
Design Settings: modify the colors of your indicator with just a few clicks by managing this function.
We recommend disabling 'Wick' and 'Border' from the settings panel for a smoother and more efficient user experience.

Rolling VWAP [QuantraSystems]Rolling VWAP
Introduction
The Rolling VWAP (R͜͡oll-VWAP) indicator modernizes the traditional VWAP by recalculating continuously on a rolling window, making it adept at pinpointing market trends and breakout points.
Its dual functionality includes both the dynamic rolling VWAP and a customizable anchored VWAP, enhanced by color-coded visual cues, thereby offering traders valuable flexibility and insight for their market analysis.
Legend
In the Image you can see the BTCUSD 1D Chart with the R͜͡oll-VWAP overlay.
You can see the individually activatable Standard Deviation (SD) Bands and the main VWAP Line.
It also features a Trend Signal which is deactivated by default and can be enabled if required.
Furthermore you can find the coloring of the VWAP line to represent the Trend.
In this case the trend itself is defined as:
Close being greater than the VWAP line -> Uptrend
Close below the VWAP line -> Downtrend
Notes
The R͜͡oll-VWAP can be used in a variety of ways.
Volatility adjusted expected range
This aims to identify in which range the asset is likely to move - according to the historical values the SD Bands are calculated and thus their according probabilities displayed.
Trend analysis
Trending above or below the VWAP shows up or down trends accordingly.
S/R Levels
Based on the probability distribution the 2. SD often works as a Resistance level and either mid line or 1. SD lines can act as S/R levels
Unsustainable levels
Based on the probability distributions a SD level of beyond 2.5, especially 3 and higher is hit very seldom and highly unsustainable.
This can either mean a mean reversion state or a momentum slowdown is necessary to get back to a sustainable level.
Please note that we always advise to find more confluence by additional indicators.
Traders are encouraged to test and determine the most suitable settings for their specific trading strategies and timeframes.
Methodology
The R͜͡oll-VWAP is based on the inbuilt TV VWAP.
It expands upon the limitations of having an anchored timeframe and thus a limited data set that is being reset constantly.
Instead we have integrated a rolling nature that continuously calculates the VWAP over a customizable lookback.
To also keep the base utility it is possible to use the anchored timeframes as well.
Furthermore the visualization has been improved and we added the coloring of the main VWAP line according to the Trend as stated above.
The applicable Trend signals are also part of that.
The parameter settings and also the visualizations allow for ample customizations by the trader.
For questions or recommendations, please feel free to seek contact in the comments.

Probability Trend IndicatorUnderstanding the Indicator:
The indicator calculates the probabilities of upward and downward trends based on the percentage change in price over a specified lookback period.
It displays these probabilities in a table and plots a histogram to represent the difference between the probabilities.
The colors of the histogram bars indicate the trend direction and whether the trend is increasing or decreasing.
Setting the Lookback Period:
The indicator allows you to specify the lookback period, which determines the number of bars to consider for calculating the probabilities.
By default, the lookback period is set to 50 bars. However, you can adjust it based on your trading preferences and the timeframe you're analyzing.
Analyzing the Probabilities:
The indicator calculates the probabilities of upward and downward trends and displays them in a table on the chart.
The probabilities are presented as percentages, representing the likelihood of each type of trend occurring.
You can use these probabilities to gain insights into the potential market direction and assess the strength of the prevailing trend.
Interpreting the Histogram:
The histogram is plotted based on the difference between the probabilities of upward and downward trends, known as the oscillator value.
The histogram bars are colored to provide visual cues about the trend direction and whether the trend is gaining or losing strength.
Green bars indicate upward trends, and red bars indicate downward trends.
Lighter shades of green or red suggest increasing trends, while darker shades suggest decreasing trends.
Making Trading Decisions:
The indicator serves as a tool for assessing the probabilities of trends and can be used alongside other technical analysis methods.
You can consider the probabilities, the histogram pattern, and the overall market context to make informed trading decisions.
It's important to remember that no indicator or tool can guarantee future market movements, so prudent risk management and additional analysis are essential.

Reinforced RSI - The Quant Science This strategy was designed and written with the goal of showing and motivating the community how to integrate our 'Probabilities' module with their own script.
We have recreated one of the simplest strategies used by many traders. The strategy only trades long and uses the overbought and oversold levels on the RSI indicator.
We added stop losses and take profits to offer more dynamism to the strategy. Then the 'Probabilities' module was integrated to create a probabilistic reinforcement on each trade.
Specifically, each trade is executed, only if the past probabilities of making a profitable trade is greater than or equal to 51%. This greatly increased the performance of the strategy by avoiding possible bad trades.
The backtesting was calculated on the NASDAQ:TSLA , on 15 minutes timeframe.
The strategy works on Tesla using the following parameters:
1. Lenght: 13
2. Oversold: 40
3. Overbought: 70
4. Lookback: 50
5. Take profit: 3%
6. Stop loss: 3%
Time period: January 2021 to date.
Our Probabilities Module, used in the strategy example:

Probabilities Module - The Quant Science This module can be integrate in your code strategy or indicator and will help you to calculate the percentage probability on specific event inside your strategy. The main goal is improve and simplify the workflow if you are trying to build a quantitative strategy or indicator based on statistics or reinforcement model.
Logic
The script made a simulation inside your code based on a single event. For single event mean a trading logic composed by three different objects: entry, take profit, stop loss.
The script scrape in the past through a look back function and return the positive percentage probability about the positive event inside the data sample. In this way you are able to understand and calculate how many time (in percentage term) the conditions inside the single event are positive, helping to create your statistical edge.
You can adjust the look back period in you user interface.
How can set up the module for your use case
At the top of the script you can find:
1. entry_condition : replace the default condition with your specific entry condition.
2. TPcondition_exit : replace the default condition with your specific take profit condition.
3. SLcondition_exit : replace the default condition with your specific stop loss condition.

Divergence Backtester - V2Further attempts to study divergence impact on price in shorter terms.
Previous study can be found here:
In this script, we are trying to gather the stats based on last two pivot state together. For example, Individual table of Pivot High Projection is as explained below:
But, by looking at the bigger picture, we can further estimate following things regarding the current unconfirmed pivot and the new pivot which is yet to be formed.

Bayesian BBSMA OscillatorSometime ago (very long ago), one of my tinkering project was to do a spam or ham classification type app to filter news I'd wanna read. So I built myself a Naive Bayes Classifier to feed me my relevant articles. It worked great, I can cut through the noise.
The hassle was I needed to manually train it to understand what I wanna read. I trained it using 50 articles and to my surprise, it's enough.
Complexity Theory
I've been reading a book called The Road to Ruin by Jim Rickards. He described how he got to his conclusion of how the stock market works by using Complexity Theory. Bill Williams would agree. Jim tells us that by using just enough data, we calculate the probability of an event to occur. We can't say for sure when but we know it's coming. This was my light bulb moment.
While Jim talks much about Bayesian Inference in which a probability of an event can always be updated as more evidence comes to light, I had my eyes set on binary probabilities of when prices are going up and down.
Assumptions
These are my assumptions:
Prices breaking up a Bollinger basis line will have fuel to go up even higher
Prices will go down when prices have broken up a Bollinger upper band
Scalping is the main method so we should use a lower period Moving Average (MA)
When prices are above MA, it's likelier a correction to the downside is imminent
When prices are below MA, it's likelier a correction to the upside is imminent
Optimize parameters for 1 hour timeframe which will give us time to react while still having more opportunities to trade
Building Blocks
Jim Rickards started with limited data (events) while in technical trading, data are plentiful. I decided to classify 2 events which are:
Next candles would be breaking up
Next candles would be breaking down
Key facts:
We won't know for sure when prices are going to break
We won't know for sure how much the prices movements are going to be
Formulas
Breaking up:
Pr(Up|Indicator) = Pr(Indicator|Up) * Pr(Up) / Pr(Indicator|Up) * Pr(Up) + Pr(Indicator|Down) * Pr(Down)
Breaking down:
Pr(Down|Indicator) = Pr(Indicator|Down) * Pr(Down) / Pr(Indicator|Down) * Pr(Down) + Pr(Indicator|Up) * Pr(Up)
Reading The Oscillator
Green is the probability of prices breaking up
Red is the probability of prices breaking down
When either green or red is flatlining ceiling, immediately on the next candle when the probability decreases go short or long based on which direction you're observing - Strong Signal
When either green or red is flatlining ceiling, take no action while it's ceiled
Usually when either green or red is flatlining bottom, the next candle when the probability increases, immediately take a short long position based on the direction you're observing - Weak Signal
When either green or red is flatlining bottom, take no action while it's bottomed
Alerts
Use Once per Bar option when generating alerts.

Multi-Timeframe Probability Zones [DW]This is an experimental study based on multi-timeframe price action and a simple average.
Use it to quickly identify MTF support and resistance, and high probability price levels.
NOTE: Because higher timeframe levels are not certain until the interval is closed, refresh your chart as new levels are drawn.