QuantBuilder | FractalystWhat's the strategy's purpose and functionality?
QuantBuilder is designed for both traders and investors who want to utilize mathematical techniques to develop profitable strategies through backtesting on historical data.
The primary goal is to develop profitable quantitive strategies that not only outperform the underlying asset in terms of returns but also minimize drawdown.
For instance, consider Bitcoin (BTC), which has experienced significant volatility, averaging an estimated 200% annual return over the past decade, with maximum drawdowns exceeding -80%. By employing this strategy with diverse entry and exit techniques, users can potentially seek to enhance their Compound Annual Growth Rate (CAGR) while managing risk to maintain a lower maximum drawdown.
While this strategy employs quantitative techniques, including mathematical methods such as probabilities and positive expected values, it demonstrates exceptional efficacy across all markets. It particularly excels in futures, indices, stocks, cryptocurrencies, and commodities, leveraging their inherent trending behaviors for optimized performance.
In both trending and consolidating market conditions, QuantBuilder employs a combination of multi-timeframe probabilities, expected values, directional biases, moving averages and diverse entry models to identify and capitalize on bullish market movements.
How does the strategy perform for both investors and traders?
The strategy has two main modes, tailored for different market participants: Traders and Investors.
1. Trading:
- Designed for traders looking to capitalize on bullish markets.
- Utilizes a percentage risk per trade to manage risk and optimize returns.
- Suitable for both swing and intraday trading with a focus on probabilities and risk per trade approach.
2. Investing:
- Geared towards investors who aim to capitalize on bullish trending markets without using leverage while mitigating the asset's maximum drawdown.
- Utilizes pre-define percentage of the equity to buy, hold, and manage the asset.
- Focuses on long-term growth and capital appreciation by fully/partially investing in the asset during bullish conditions.
How does the strategy identify market structure? What are the underlying calculations?
The strategy utilizes an efficient logic with for loops to pinpoint the first swing candle featuring a pivot of 2, establishing the point at which the break of structure begins.
What entry criteria are used in this script? What are the underlying calculations?
The script utilizes two entry models: BreakOut and fractal.
Underlying Calculations:
Breakout: The script assigns the most recent swing high to a variable. When the price closes above this level and all other conditions are met, the script executes a breakout entry (conservative approach).
Fractal: The script identifies a swing low with a period of 2. Once this condition is met, the script executes the trade (aggressive approach).
How does the script calculate probabilities? What are the underlying calculations?
The script calculates probabilities by monitoring price interactions with liquidity levels. Here’s how the underlying calculations work:
Tracking Price Hits: The script counts the number of times the price taps into each liquidity side after the EQM level is activated. This data is stored in an array for further analysis.
Sample Size Consideration: The total number of price interactions serves as the sample size for calculating probabilities.
Probability Calculation: For each liquidity side, the script calculates the probability by taking the average of the recorded hits. This allows for a dynamic assessment of the likelihood that a particular side will be hit next, based on historical performance.
Dynamic Adjustment: As new price data comes in, the probabilities are recalculated, providing real-time aduptive insights into market behavior.
Note: The calculations are performed independently for each directional range. A range is considered bearish if the previous breakout was through a sellside liquidity. Conversely, a range is considered bullish if the most recent breakout was through a buyside liquidity.
How does the script calculate expected values? What are the underlying calculations?
The script calculates expected values by leveraging the probabilities of winning and losing trades, along with their respective returns. The process involves the following steps:
This quantitative methodology provides a robust framework for assessing the expected performance of trading strategies based on historical data and backtesting results.
How is the contextual bias calculated? What are the underlying calculations?
The contextual bias in the QuantBuilder script is calculated through a structured approach that assesses market structure based on swing highs and lows. Here’s how it works:
Identification of Swing Points: The script identifies significant swing points using a defined pivot logic, focusing on the first swing high and swing low. This helps establish critical levels for determining market structure.
Break of Structure (BOS) Assessment:
Bullish BOS: The script recognizes a bullish break of structure when a candle closes above the first swing high, followed by at least one swing low.
Bearish BOS: Conversely, a bearish break of structure is identified when a candle closes below the first swing low, followed by at least one swing high.
Bias Assignment: Based on the identified break of structure, the script assigns directional biases:
A bullish bias is assigned if a bullish BOS is confirmed.
A bearish bias is assigned if a bearish BOS is confirmed.
Quantitative Evaluation: Each identified bias is quantitatively evaluated, allowing the script to assign numerical values representing the strength of each bias. This quantification aids in assessing the reliability of market sentiment across multiple timeframes.
What's the purpose of using moving averages in this strategy? What are the underlying calculations?
Using moving averages is a widely-used technique to trade with the trend.
The main purpose of using moving averages in this strategy is to filter out bearish price action and to only take trades when the price is trading ABOVE specified moving averages.
The script uses different types of moving averages with user-adjustable timeframes and periods/lengths, allowing traders to try out different variations to maximize strategy performance and minimize drawdowns.
By applying these calculations, the strategy effectively identifies bullish trends and avoids market conditions that are not conducive to profitable trades.
The MA filter allows traders to choose whether they want a specific moving average above or below another one as their entry condition.
What type of stop-loss identification method are used in this strategy? What are the underlying calculations?
- Initial Stop-loss:
1. ATR Based:
The Average True Range (ATR) is a method used in technical analysis to measure volatility. It is not used to indicate the direction of price but to measure volatility, especially volatility caused by price gaps or limit moves.
Calculation:
- To calculate the ATR, the True Range (TR) first needs to be identified. The TR takes into account the most current period high/low range as well as the previous period close.
The True Range is the largest of the following:
- Current Period High minus Current Period Low
- Absolute Value of Current Period High minus Previous Period Close
- Absolute Value of Current Period Low minus Previous Period Close
- The ATR is then calculated as the moving average of the TR over a specified period. (The default period is 14)
2. ADR Based:
The Average Day Range (ADR) is an indicator that measures the volatility of an asset by showing the average movement of the price between the high and the low over the last several days.
Calculation:
- To calculate the ADR for a particular day:
- Calculate the average of the high prices over a specified number of days.
- Calculate the average of the low prices over the same number of days.
- Find the difference between these average values.
- The default period for calculating the ADR is 14 days. A shorter period may introduce more noise, while a longer period may be slower to react to new market movements.
3. PL Based:
This method places the stop-loss at the low of the previous candle.
If the current entry is based on the hunt entry strategy, the stop-loss will be placed at the low of the candle that wicks through the lower FRMA band.
Example:
If the previous candle's low is 100, then the stop-loss will be set at 100.
This method ensures the stop-loss is placed just below the most recent significant low, providing a logical and immediate level for risk management.
- Trailing Stop-Loss:
One of the key elements of this strategy is its ability to detect structural liquidity and structural invalidation levels across multiple timeframes to trail the stop-loss once the trade is in running profits.
By utilizing this approach, the strategy allows enough room for price to run.
By using these methods, the strategy dynamically adjusts the initial stop-loss based on market volatility, helping to protect against adverse price movements while allowing for enough room for trades to develop.
Each market behaves differently across various timeframes, and it is essential to test different parameters and optimizations to find out which trailing stop-loss method gives you the desired results and performance.
What type of break-even and take profit identification methods are used in this strategy? What are the underlying calculations?
For Break-Even:
Percentage (%) Based:
Moves the initial stop-loss to the entry price when the price reaches a certain percentage above the entry.
Calculation:
Break-even level = Entry Price * (1 + Percentage / 100)
Example:
If the entry price is $100 and the break-even percentage is 5%, the break-even level is $100 * 1.05 = $105.
Risk-to-Reward (RR) Based:
Moves the initial stop-loss to the entry price when the price reaches a certain RR ratio.
Calculation:
Break-even level = Entry Price + (Initial Risk * RR Ratio)
For TP1 (Take Profit 1):
- You can choose to set a take profit level at which your position gets fully closed or 50% if the TP2 boolean is enabled.
- Similar to break-even, you can select either a percentage (%) or risk-to-reward (RR) based take profit level, allowing you to set your TP1 level as a percentage amount above the entry price or based on RR.
For TP2 (Take Profit 2):
- You can choose to set a take profit level at which your position gets fully closed.
- As with break-even and TP1, you can select either a percentage (%) or risk-to-reward (RR) based take profit level, allowing you to set your TP2 level as a percentage amount above the entry price or based on RR.
What's the day filter Filter, what does it do?
The day filter allows users to customize the session time and choose the specific days they want to include in the strategy session. This helps traders tailor their strategies to particular trading sessions or days of the week when they believe the market conditions are more favorable for their trading style.
Customize Session Time:
Users can define the start and end times for the trading session.
This allows the strategy to only consider trades within the specified time window, focusing on periods of higher market activity or preferred trading hours.
Select Days:
Users can select which days of the week to include in the strategy.
This feature is useful for excluding days with historically lower volatility or unfavorable trading conditions (e.g., Mondays or Fridays).
Benefits:
Focus on Optimal Trading Periods:
By customizing session times and days, traders can focus on periods when the market is more likely to present profitable opportunities.
Avoid Unfavorable Conditions:
Excluding specific days or times can help avoid trading during periods of low liquidity or high unpredictability, such as major news events or holidays.
What tables are available in this script?
- Summary: Provides a general overview, displaying key performance parameters such as Net Profit, Profit Factor, Max Drawdown, Average Trade, Closed Trades and more.
Total Commission: Displays the cumulative commissions incurred from all trades executed within the selected backtesting window. This value is derived by summing the commission fees for each trade on your chart.
Average Commission: Represents the average commission per trade, calculated by dividing the Total Commission by the total number of closed trades. This metric is crucial for assessing the impact of trading costs on overall profitability.
Avg Trade: The sum of money gained or lost by the average trade generated by a strategy. Calculated by dividing the Net Profit by the overall number of closed trades. An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.
MaxDD: Displays the largest drawdown of losses, i.e., the maximum possible loss that the strategy could have incurred among all of the trades it has made. This value is calculated separately for every bar that the strategy spends with an open position.
Profit Factor: The amount of money a trading strategy made for every unit of money it lost (in the selected currency). This value is calculated by dividing gross profits by gross losses.
Avg RR: This is calculated by dividing the average winning trade by the average losing trade. This field is not a very meaningful value by itself because it does not take into account the ratio of the number of winning vs losing trades, and strategies can have different approaches to profitability. A strategy may trade at every possibility in order to capture many small profits, yet have an average losing trade greater than the average winning trade. The higher this value is, the better, but it should be considered together with the percentage of winning trades and the net profit.
Winrate: The percentage of winning trades generated by a strategy. Calculated by dividing the number of winning trades by the total number of closed trades generated by a strategy. Percent profitable is not a very reliable measure by itself. A strategy could have many small winning trades, making the percent profitable high with a small average winning trade, or a few big winning trades accounting for a low percent profitable and a big average winning trade. Most mean-reversion successful strategies have a percent profitability of 40-80% but are profitable due to risk management control.
BE Trades: Number of break-even trades, excluding commission/slippage.
Losing Trades: The total number of losing trades generated by the strategy.
Winning Trades: The total number of winning trades generated by the strategy.
Total Trades: Total number of taken traders visible your charts.
Net Profit: The overall profit or loss (in the selected currency) achieved by the trading strategy in the test period. The value is the sum of all values from the Profit column (on the List of Trades tab), taking into account the sign.
- Monthly: Displays performance data on a month-by-month basis, allowing users to analyze performance trends over each month and year.
- Weekly: Displays performance data on a week-by-week basis, helping users to understand weekly performance variations.
- UI Table: A user-friendly table that allows users to view and save the selected strategy parameters from user inputs. This table enables easy access to key settings and configurations, providing a straightforward solution for saving strategy parameters by simply taking a screenshot with Alt + S or ⌥ + S.
User-input styles and customizations:
To facilitate studying historical data, all conditions and filters can be applied to your charts. By plotting background colors on your charts, you'll be able to identify what worked and what didn't in certain market conditions.
Please note that all background colors in the style are disabled by default to enhance visualization.
How to Use This Quantitive Strategy Builder to Create a Profitable Edge and System?
Choose Your Strategy mode:
- Decide whether you are creating an investing strategy or a trading strategy.
Select a Market:
- Choose a one-sided market such as stocks, indices, or cryptocurrencies.
Historical Data:
- Ensure the historical data covers at least 10 years of price action for robust backtesting.
Timeframe Selection:
- Choose the timeframe you are comfortable trading with. It is strongly recommended to use a timeframe above 15 minutes to minimize the impact of commissions/slippage on your profits.
Set Commission and Slippage:
- Properly set the commission and slippage in the strategy properties according to your broker/prop firm specifications.
Parameter Optimization:
- Use trial and error to test different parameters until you find the performance results you are looking for in the summary table or, preferably, through deep backtesting using the strategy tester.
Trade Count:
- Ensure the number of trades is 200 or more; the higher, the better for statistical significance.
Positive Average Trade:
- Make sure the average trade is above zero.
(An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.)
Performance Metrics:
- Look for a high profit factor, and net profit with minimum drawdown.
- Ideally, aim for a drawdown under 20-30%, depending on your risk tolerance.
Refinement and Optimization:
- Try out different markets and timeframes.
- Continue working on refining your edge using the available filters and components to further optimize your strategy.
What makes this strategy original?
QuantBuilder stands out due to its unique combination of quantitative techniques and innovative algorithms that leverage historical data for real-time trading decisions. Unlike most algorithmic strategies that work based on predefined rules, this strategy adapts to real-time market probabilities and expected values, enhancing its reliability. Key features include:
Mathematical Framework: The strategy integrates advanced mathematical concepts, such as probabilities and expected values, to assess trade viability and optimize decision-making.
Multi-Timeframe Analysis: By utilizing multi-timeframe probabilities, QuantBuilder provides a comprehensive view of market conditions, enhancing the accuracy of entry and exit points.
Dynamic Market Structure Identification: The script employs a systematic approach to identify market structure changes, utilizing a blend of swing highs and lows to detect contextual/direction bias of the market.
Built-in Trailing Stop Loss: The strategy features a dynamic trailing stop loss based on multi-timeframe analysis of market structure. This allows traders to lock in profits while adapting to changing market conditions, ensuring that exits are executed at optimal levels without prematurely closing positions.
Robust Performance Metrics: With detailed performance tables and visualizations, users can easily evaluate strategy effectiveness and adjust parameters based on historical performance.
Adaptability: The strategy is designed to work across various markets and timeframes, making it versatile for different trading styles and objectives.
Suitability for Investors and Traders: QuantBuilder is ideal for both investors and traders looking to rely on mathematically proven data to create profitable strategies, ensuring that decisions are grounded in quantitative analysis.
These original elements combine to create a powerful tool that can help both traders and investors to build and refine profitable strategies based on algorithmic quantitative analysis.
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst Unauthorized use, reproduction, or distribution of these proprietary elements is prohibited.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Systematictrading
OrderFlow [Adjustable] | FractalystWhat's the indicator's purpose and functionality?
This indicator is designed to assist traders in identifying real-time probabilities of buyside and sellside liquidity .
It allows for an adjustable pivot level , enabling traders to customize the level they want to use for their entries.
By doing so, traders can evaluate whether their chosen entry point would yield a positive expected value over a large sample size, optimizing their strategy for long-term profitability.
For advanced traders looking to enhance their analysis, the indicator supports the incorporation of up to 7 higher timeframe biases .
Additionally, the higher timeframe pivot level can be adjusted according to the trader's preferences,
Offering maximum adaptability to different strategies and needs, further helping to maximize positive EV.
EV=(P(Win)×R(Win))−(P(Loss)×R(Loss))
-----
What's the purpose of these levels? What are the underlying calculations?
1. Understanding Swing highs and Swing Lows
Swing High: A Swing High is formed when there is a high with 2 lower highs to the left and right.
Swing Low: A Swing Low is formed when there is a low with 2 higher lows to the left and right.
2. Understanding the purpose and the underlying calculations behind Buyside, Sellside and Pivot levels.
3. Identifying Discount and Premium Zones.
4. Importance of Risk-Reward in Premium and Discount Ranges
----
How does the script calculate probabilities?
The script calculates the probability of each liquidity level individually. Here's the breakdown:
1. Upon the formation of a new range, the script waits for the price to reach and tap into pivot level level. Status: "⏸" - Inactive
2. Once pivot level is tapped into, the pivot status becomes activated and it waits for either liquidity side to be hit. Status: "▶" - Active
3. If the buyside liquidity is hit, the script adds to the count of successful buyside liquidity occurrences. Similarly, if the sellside is tapped, it records successful sellside liquidity occurrences.
4. Finally, the number of successful occurrences for each side is divided by the overall count individually to calculate the range probabilities.
Note: The calculations are performed independently for each directional range. A range is considered bearish if the previous breakout was through a sellside liquidity. Conversely, a range is considered bullish if the most recent breakout was through a buyside liquidity.
----
What does the multi-timeframe functionality offer?
In the adjustable version of the orderflow indicator, you can incorporate up to 7 higher timeframe probabilities directly into the table.
This feature allows you to analyze the probabilities of buyside and sellside liquidity across multiple timeframes, without the need to manually switch between them.
By viewing these higher timeframe probabilities in one place, traders can spot larger market trends and refine their entries and exits with a better understanding of the overall market context.
This multi-timeframe functionality helps traders:
1. Simplify decision-making by offering a comprehensive view of multiple timeframes at once.
2. Identify confluence between timeframes, enhancing the confidence in trade setups.
3. Adapt strategies more effectively, as the higher timeframe pivot levels can be customized to meet individual preferences and goals.
----
What are the multi-timeframe underlying calculations?
The script uses the same calculations (mentioned above) and uses security function to request the data such as price levels, bar time, probabilities and booleans from the user-input timeframe.
----
How does the Indicator Identifies Positive Expected Values?
OrderFlow indicator instantly calculates whether a trade setup has the potential for positive expected value (EV) in the long run.
To determine a positive EV setup, the indicator uses the formula:
EV=(P(Win)×R(Win))−(P(Loss)×R(Loss))
where:
P(Win) is the probability of a winning trade.
R(Win) is the reward or return for a winning trade, determined by the current risk-to-reward ratio (RR).
P(Loss) is the probability of a losing trade.
R(Loss) is the loss incurred per losing trade, typically assumed to be -1.
By calculating these values based on historical data and the current trading setup, the indicator helps you understand whether your trade has a positive expected value over a large sample size.
----
How can I know that the setup I'm going to trade with has a postive EV?
If the indicator detects that the adjusted pivot and buy/sell side probabilities have generated positive expected value (EV) in historical data, the risk-to-reward (RR) label within the range box will be colored blue and red .
If the setup does not produce positive EV, the RR label will appear gray.
This indicates that even the risk-to-reward ratio is greater than 1:1, the setup is not likely to yield a positive EV because, according to historical data, the number of losses outweighs the number of wins relative to the RR gain per winning trade.
----
What is the confidence level in the indicator, and how is it determined?
The confidence level in the indicator reflects the reliability of the probabilities calculated based on historical data. It is determined by the sample size of the probabilities used in the calculations. A larger sample size generally increases the confidence level, indicating that the probabilities are more reliable and consistent with past performance.
----
How does the confidence level affect the risk-to-reward (RR) label?
The confidence level (★) is visually represented alongside the probability label. A higher confidence level indicates that the probabilities used to determine the RR label are based on a larger and more reliable sample size.
----
How can traders use the confidence level to make better trading decisions?
Traders can use the confidence level to gauge the reliability of the probabilities and expected value (EV) calculations provided by the indicator. A confidence level above 95% is considered statistically significant and indicates that the historical data supporting the probabilities is robust. This high confidence level suggests that the probabilities are reliable and that the indicator’s recommendations are more likely to be accurate.
In data science and statistics, a confidence level above 95% generally means that there is less than a 5% chance that the observed results are due to random variation. This threshold is widely accepted in research and industry as a marker of statistical significance. Studies such as those published in the Journal of Statistical Software and the American Statistical Association support this threshold, emphasizing that a confidence level above 95% provides a strong assurance of data reliability and validity.
Conversely, a confidence level below 95% indicates that the sample size may be insufficient and that the data might be less reliable . In such cases, traders should approach the indicator’s recommendations with caution and consider additional factors or further analysis before making trading decisions.
----
How does the sample size affect the confidence level, and how does it relate to my TradingView plan?
The sample size for calculating the confidence level is directly influenced by the amount of historical data available on your charts. A larger sample size typically leads to more reliable probabilities and higher confidence levels.
Here’s how the TradingView plans affect your data access:
Essential Plan
The Essential Plan provides basic data access with a limited amount of historical data. This can lead to smaller sample sizes and lower confidence levels, which may weaken the robustness of your probability calculations. Suitable for casual traders who do not require extensive historical analysis.
Plus Plan
The Plus Plan offers more historical data than the Essential Plan, allowing for larger sample sizes and more accurate confidence levels. This enhancement improves the reliability of indicator calculations. This plan is ideal for more active traders looking to refine their strategies with better data.
Premium Plan
The Premium Plan grants access to extensive historical data, enabling the largest sample sizes and the highest confidence levels. This plan provides the most reliable data for accurate calculations, with up to 20,000 historical bars available for analysis. It is designed for serious traders who need comprehensive data for in-depth market analysis.
PRO+ Plans
The PRO+ Plans offer the most extensive historical data, allowing for the largest sample sizes and the highest confidence levels. These plans are tailored for professional traders who require advanced features and significant historical data to support their trading strategies effectively.
For many traders, the Premium Plan offers a good balance of affordability and sufficient sample size for accurate confidence levels.
----
What is the HTF probability table and how does it work?
The HTF (Higher Time Frame) probability table is a feature that allows you to view buy and sellside probabilities and their status from timeframes higher than your current chart timeframe.
Here’s how it works:
Data Request : The table requests and retrieves data from user-defined higher timeframes (HTFs) that you select.
Probability Display: It displays the buy and sellside probabilities for each of these HTFs, providing insights into the likelihood of price movements based on higher timeframe data.
Detailed Tooltips: The table includes detailed tooltips for each timeframe, offering additional context and explanations to help you understand the data better.
----
What do the different colors in the HTF probability table indicate?
The colors in the HTF probability table provide visual cues about the expected value (EV) of trading setups based on higher timeframe probabilities:
Blue: Suggests that entering a long position from the HTF user-defined pivot point, targeting buyside liquidity, is likely to result in a positive expected value (EV) based on historical data and sample size.
Red: Indicates that entering a short position from the HTF user-defined pivot point, targeting sellside liquidity, is likely to result in a positive expected value (EV) based on historical data and sample size.
Gray: Shows that neither long nor short trades from the HTF user-defined pivot point are expected to generate positive EV, suggesting that trading these setups may not be favorable.
----
How to use the indicator effectively?
For Amateur Traders:
Start Simple: Begin by focusing on one timeframe at a time with the pivot level set to the default (50%). This helps you understand the basic functionality of the indicator.
Entry and Exit Strategy: Focus on entering trades at the pivot level while targeting the higher probability side for take profit and the lower probability side for stop loss.
Use simulation or paper trading to practice this strategy.
Adjustments: Once you have a solid understanding of how the indicator works, you can start adjusting the pivot level to other values that suit your strategy.
Ensure that the RR labels are colored (blue or red) to indicate positive EV setups before executing trades.
For Advanced Traders:
1. Select Higher Timeframe Bias: Choose a higher timeframe (HTF) as your main bias. Start with the default pivot level and ensure the confidence level is above 95% to validate the probabilities.
2. Align Lower Timeframes: Switch between lower timeframes to identify which ones align with your predefined HTF bias. This helps in synchronizing your trading decisions across different timeframes.
3. Set Entries with Current Pivot Level: Use the current pivot level for trade entries. Ensure the HTF status label is active, indicating that the probabilities are valid and in play.
4. Target HTF Liquidity Level: Aim for liquidity levels that correspond to the higher timeframe, as these levels are likely to offer better trading opportunities.
5. Adjust Pivot Levels: As you gain experience, adjust the pivot levels to further optimize your strategy for high EV. Fine-tune these levels based on the aggregated data from multiple timeframes.
6. Practice on Paper Trading: Test your strategies through paper trading to eliminate discretion and refine your approach without financial risk.
7. Focus on Trade Management: Ultimately, effective trade management is crucial. Concentrate on managing your trades well to ensure long-term success. By aiming for setups that produce positive EV, you can position yourself similarly to how a casino operates.
----
🎲 Becoming the House (Gaining Edge Over the Market):
In American roulette, the house has a 5.26% edge due to the 0 and 00. This means that while players have a 47.37% chance of winning on even-money bets, the true odds are 50%. The discrepancy between the true odds and the payout ensures that, statistically, the casino will win over time.
From the Trader's Perspective: In trading, you gain an edge by focusing on setups with positive expected value (EV). If you have a 55.48% chance of winning with a 1:1 risk-to-reward ratio, your setup has a higher probability of profitability than the losing side. By consistently targeting such setups and managing your trades effectively, you create a statistical advantage, similar to the casino’s edge.
----
🎰 Applying the Concept to Trading:
Just as casinos rely on their mathematical edge, you can achieve long-term success in trading by focusing on setups with positive EV. By ensuring that your probabilities and risk-to-reward (RR) ratios are in your favor, you create an edge similar to that of the house.
And by systematically targeting trades with favorable probabilities and managing your trades effectively, you improve your chances of profitability over the long run. Which is going to help you “become the house” in your trading, leveraging statistical advantages to enhance your overall performance.
----
What makes this indicator original?
Real-Time Probability Calculations: The indicator provides real-time calculations of buy and sell probabilities based on historical data, allowing traders to assess the likelihood of positive expected value (EV) setups instantly.
Adjustable Pivot Levels: It features an adjustable pivot level that traders can modify according to their preferences, enhancing the flexibility to align with different trading strategies.
Multi-Timeframe Integration: The indicator supports up to 7 higher timeframes, displaying their probabilities and biases in a single view, which helps traders make informed decisions without switching timeframes.
Confidence Levels: It includes confidence levels based on sample sizes, offering insights into the reliability of the probabilities. Traders can gauge the strength of the data before making trades.
Dynamic EV Labels: The indicator provides color-coded EV labels that change based on the validity of the setup. Blue indicates positive EV in a long bias, red indicates positive EV in a short bias and gray signals caution, making it easier for traders to identify high-quality setups.
HTF Probability Table: The HTF probability table displays buy and sell probabilities from user-defined higher timeframes, helping traders integrate broader market context into their decision-making process.
----
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst use, reproduction, or distribution of these proprietary elements is prohibited.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Screener | FractalystWhat’s the purpose of this indicator?
This indicator is part of the Optirange suite , which analyzes all timeframes using a mechanical top-down approach to determine the overall market bias. It helps you identify the specific timeframes and exact levels for positioning in longs, shorts, or guiding you on whether to stay away from trading a particular market condition.
The purpose of the Screener indicator is to track the contextual bias of multiple markets simultaneously on the charts without the need to switch between pairs. This allows traders to monitor various assets in real-time, enhancing decision-making efficiency and identifying potential trading opportunities more effectively.
-----
How does this indicator identify the overall market bias?
This indicator employs a systematic top-down approach, analyzing market structure, fractal blocks, and their mitigations from the 12M timeframe down to the 1D timeframe to uncover the story behind the market. This method helps identify the overall market bias, whether it’s bullish, bearish, or in consolidating conditions.
Below is a flowchart that illustrates the calculation behind the market context identification, demonstrating the systematic approach:
-----
According to the above trade plan, why do we only look for mitigations within Fractal Blocks of X1/X2?
In this context, "X" stands for a break in the market's structure, and the numbers (1 and 2) indicate the sequence of these breaks within the same trend direction, either up or down.
We focus on mitigations within Fractal Blocks during the X1/X2 stages because these points mark the early phase (X1) and the continuation (X2) of a trend. By doing so, we align our trades with the market's main direction and avoid getting stopped out in the middle of trends.
-----
How does this indicator identify ranges in a mechanical way?
Since the indicator is part of the Optirange suite , it follows the exact rules that Optirange utilizes to identify breaks of market structures in a mechanical manner.
Let’s take a closer look at how the ranges are calculated:
1- First, we need to understand the importance of following a set of mechanical rules in identifying market structure:
The image above illustrates the difference between a subjective and a mechanical approach to analyzing market structure. The subjective method often leads to uncertainty, where traders might struggle to pinpoint exact breaks in structure, resulting in inconsistent decision-making. Questions like “Is this a break?” or “Maybe this one...?” reflect the ambiguity of manual interpretation, which can cause confusion and errors in trading.
On the other hand, the mechanical approach depicted on the right side of the image follows a clear, rule-based method to define breaks in market structure. This systematic approach eliminates guesswork by providing precise criteria for identifying structural changes, such as marking structural invalidation levels where market bias shifts from bullish to bearish or vice versa. The mechanical method not only offers consistency but also integrates statistical probabilities , enhancing the trader's ability to make data-driven decisions.
By adhering to these mechanical rules, the Screener indicator ensures that ranges are identified consistently, allowing traders to rely on objective analysis rather than subjective interpretation . This approach is crucial for accurately defining market structures and making informed trading decisions.
2- Now let's take a look at a practical example of how the indicator utilizes Pivot points with a period of 2 to identify ranges:
In this image, we see a Bearish Scenario on the left and a Bullish Scenario on the right. The indicator starts by identifying the first significant swing on the chart. It then validates this swing by checking if there is a preceding swing high (for a bearish scenario) or swing low (for a bullish scenario). Once validated, the indicator confirms a break of structure when price closes below or above these points, respectively.
For instance, in the Bearish Scenario:
The first significant swing is identified.
The script checks for a preceding swing high before confirming any structural break.
A candle closure below the swing low confirms the first bearish break of structure.
This results in a confirmed market bias towards bearishness, with structural liquidity levels indicated for potential price targets.
In the Bullish Scenario:
The process is mirrored, identifying the first swing low and validating it with a preceding swing low.
A closure above this swing confirms the bullish break of structure.
This leads to a market bias towards bullishness, with invalidation levels to watch if the trend shifts.
This practical example demonstrates how the indicator systematically identifies market ranges, ensuring that traders can make informed decisions based on clear, rule-based criteria.
-----
How does this indicator identify ranges in a mechanical way, What are the underlying calculations?
Fractal blocks refer to the most extreme swing candle within the latest break. They can serve as significant levels for price rejection and may guide movements toward the next break, often in confluence with topdown analysis for added confirmation.
-----
What are mitigations, What are the underlying calculations?
Mitigations refer to specific price action occurrences identified by the script:
1- When the price reaches the most recent fractal block and confirms a swing candle, the script automatically draws a line from the swing to the fractal block bar and labels it with a checkmark.
2- If the price wicks through the invalidation level and then retraces back to the fractal block while forming a swing candle, the script labels this as a double mitigation on the chart.
This level will serve as the next potential invalidation level if a break occurs in the same direction.
-----
What does the right table display?
The table located at the right of your chart displays five colored symbols that represent the contextual market bias:
Green: The market is in a bullish condition.
Red: The market is in a bearish condition.
White: The market condition is uncertain, and it is advisable to stay away from trading.
-----
What does the bottom table display?
The bottom table can be turned on in the Optirange indicator and serves multiple purposes:
Range Counts and Mitigations: It shows the range counts and their mitigations across multiple timeframes, providing a comprehensive view of market dynamics.
Hourly Timeframe Probabilities: The bottom row of the bias table displays the probabilities for various hourly timeframes, helping to identify potential entry levels based on the multi-timeframe bias determined by the Screener.
In a bullish market context, you should look for long positions by focusing on hourly timeframes where buy-side probability exceeds 50%.
In a bearish market context, you should look for short positions by focusing on hourly timeframes where the sell-side probability exceeds 50%.
When the symbol is white within the Screener table, it signals that the market bias is unclear, and it's recommended to stay away from trading in such conditions.
-----
How the range probabilities are calculated?
Each break of market structure, denoted as X, is assigned a unique ID, starting from X1 for the first break, X2 for the second, and so on.
The probabilities are calculated based on breaks holding, meaning price closing through the liquidity level, rather than invalidation. This probability is then divided by the total count of similar numeric breaks.
For example, if 75 out of 100 bullish X1s become X2, then the probability of X1 becoming X2 on your charts will be displayed as 75% in the following format: ⬆ 75%
-----
What does the top table display?
The top table on the charts displays the current market context, offering insights into the underlying bias. It highlights the high-timeframe (HTF) bias and guides you on which timeframes you should use to enter long or short positions, based on the probability of success.
Additionally, when the market bias is unclear, the table clearly signals that it's best to avoid trading that specific market until the context or market story becomes clearer. This helps traders make informed decisions and avoid uncertain market conditions.
-----
How does the Screener indicator identify the market bias/context/story ?
- Market Structure: The Optirange indicator analyzes market structure across multiple timeframes, from a top-down perspective, including 12M, 6M, 3M, 1M, 2W, 1W, 3D, and 1D.
- Fractal Blocks: Once the market structure or current range is identified, the indicator automatically identifies the last push before the break and draws it as a box. These zones acts as a key area where the price often rejects from.
- Mitigations: After identifying the Fractal Block, the indicator checks for price mitigation or rejection within this zone. If mitigation occurs, meaning the price has reacted or rejected from the Fractal Block, the indicator draws a checkmark from the deepest candle within the Fractal Block to the initial candle that has created the zone.
- Bias Table: After identifying the three key elements—market structure, Fractal Blocks, and price mitigations—the indicator compiles this information into a multi-timeframe table. This table provides a comprehensive top-down perspective, showing what is happening from a structural standpoint across all timeframes. The Bias Table presents raw data, including identified Fractal Blocks and mitigations, to help traders understand the overall market trend. This data is crucial for the screener, which uses it to determine the current market bias based on a top-down analysis.
- Screener: Once all higher timeframes (HTF) and lower timeframes (LTF) are calculated using the indicator, it follows the exact rules outlined in the flowchart to determine the market bias. This systematic approach not only helps identify the current market trend but also suggests the exact timeframes to use for finding entry, particularly on hourly timeframes.
Example:
12M Timeframe:
OANDA:EURUSD
6M Timeframe :
OANDA:EURUSD
3M Timeframe :
OANDA:EURUSD
1M Timeframe :
OANDA:EURUSD
2W Timeframe :
OANDA:EURUSD
1W Timeframe :
OANDA:EURUSD
-----
User-input settings and customizations
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data. By utilizing our charting tools, the buyer acknowledges that neither the seller nor the creator assumes responsibility for decisions made using the information provided. The buyer assumes full responsibility and liability for any actions taken and their consequences, including potential financial losses. Therefore, by purchasing these charting tools, the customer acknowledges that neither the seller nor the creator is liable for any unfavorable outcomes resulting from the development, sale, or use of the products.
The buyer is responsible for canceling their subscription if they no longer wish to continue at the full retail price. Our policy does not include reimbursement, refunds, or chargebacks once the Terms and Conditions are accepted before purchase.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer.
OptiRange | FractalystWhat’s the purpose of this indicator?
This indicator is designed to integrate probabilities with liquidity levels, while also providing a mechanical method for identifying market structure by using Fractals by Williams.
----
How does this indicator identify market structure?
This script identifies breaks of market structure by analyzing candle closures above or below swing levels.
As soon as a candle has closed above or below the initial swing on your charts, the script validates that there is at least one swing preceding the break before confirming it as a structural break.
Once a break is occured then it assigns a numeric ID to the break starting from 1 and draws two extremities: one as liquidity and the other as invalidation (LIQ/INV).
----
What do the extremities show us on the charts?
you'll see two clear extremities on your charts:
1. The first extremity represents the structural liquidity level. (LIQ)
2. The other extremity indicates the level that, if price breaks through it, results in a structural shift to the opposite side. (INV)
----
How does it calculate probabilities?
Each break of market structure, denoted as X, is assigned a unique ID, starting from X1 for the first break, X2 for the second, and so on.
The probabilities are calculated based on breaks holding, meaning price closing through the liquidity level, rather than invalidation. This probability is then divided by the total count of similar numeric breaks.
For example, if 75 out of 100 bullish X1s become X2, then the probability of X1 becoming X2 on your charts will be displayed as 80% in the following format: ⬆ 75%
----
What are the Fractal blocks?
Fractal blocks refer to the most extreme swing candle within the latest break. They can serve as significant levels for price rejection and may guide movements toward the next break, often in confluence with probability analysis for added confirmation.
If the price retraces back to a bullish fractal block, we aim to look for buy/long positions. Conversely, if the price retraces back to a bearish fractal block, we aim to look for sell/short positions.
----
What are mitigations?
Mitigations refer to specific price action occurrences identified by the script:
1- When the price reaches the most recent fractal block and confirms a swing candle, the script automatically draws a line from the swing to the fractal block bar and labels it with a checkmark.
1- If the price wicks through the invalidation level and then retraces back to the fractal block while forming a swing candle, the script labels this as a double mitigation on the chart.
This level will serve as the next potential invalidation level if a break occurs in the same direction.
----
What does the bottom table display?
The bottom table presents numeric breaks across multiple timeframes, with the text color indicating the trend direction. Enabling traders to assess the higher timeframes market trend without needing to switch between timeframes manually.
----
How to use the indicator?
1. Add "OptiRange | Fractalyst" to your TradingView chart.
2. Choose the pair you want to analyze or trade.
3. Start with the 12-month timeframe.
4. Use the table bias with the maximal settings to find the lowest timeframe that’s showing you the mitigation (✓)
5. Confirm that the probability of the current liquidity is higher than 50%.
6. Place your limit order at the Fibonacci level of 0.618 of the mitigation candle.
7. Set your stop-loss at the mitigation level.
8. Determine your take profit based on the liquidity of the current timeframe, or if possible, the liquidity of a higher timeframe in the same direction; otherwise, use the liquidity of the current timeframe.
9. Risk adjustment and Trade management based on your personal preferences.
Example:
----
User-input settings and customizations
----
What makes this indicator original?
- This script leverages Fractals, a fundamental concept in many trading methodologies.
- For a break to be considered valid, price must have at least two swings:
a swing high followed by a swing low for bullish breaks and a swing low follow by a swing high for bearish breaks.
- This means that each swing point is confirmed by the formation of two candles on its left and two candles on its right, totaling 5 candles for each swing high and swing low, thus requiring 10 candles overall. (This strict rule ensures a thorough assessment of market structure before confirming a break.)
- The script assigns a unique numerical ID to each break of structure, starting from 1.
This numbering system enables the script to calculate the probability of the most recent break becoming the next break, while also factoring in the trend direction.
- Additionally, this script provides insights into higher timeframes' break IDs in the bottom/top centre table, keeping traders informed about the overall higher timeframe picture.
- By integrating these methodologies, the script introduces a unique and systematic method for identifying market structure, thereby enhancing its originality in guiding trading decisions.
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data. By utilizing our charting tools, the buyer acknowledges that neither the seller nor the creator assumes responsibility for decisions made using the information provided. The buyer assumes full responsibility and liability for any actions taken and their consequences, including potential financial losses. Therefore, by purchasing these charting tools, the customer acknowledges that neither the seller nor the creator is liable for any unfavorable outcomes resulting from the development, sale, or use of the products.
The buyer is responsible for canceling their subscription if they no longer wish to continue at the full retail price. Our policy does not include reimbursement, refunds, or chargebacks once the Terms and Conditions are accepted before purchase.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer.