Oscillator Price Divergence & Trend Strategy (DPS) // AlgoFyreThe Oscillator Price Divergence & Trend Strategy (DPS) strategy combines price divergence and trend indicators for trend trading. It uses divergence conditions to identify entry points and a trend source for directional bias. The strategy incorporates risk management through dynamic position sizing based on a fixed risk amount. It allows for both long and short positions with customizable stop-loss and take-profit levels. The script includes visualization options for entry, stop-loss, and take-profit levels, enhancing trade analysis.
TABLE OF CONTENTS
🔶 ORIGINALITY
🔸Divergence-Trend Combination
🔸Dynamic Position Sizing
🔸Customizable Risk Management
🔶 FUNCTIONALITY
🔸Indicators
🞘 Trend Indicator
🞘 Oscillator Source
🔸Conditions
🞘 Long Entry
🞘 Short Entry
🞘 Take Profit
🞘 Stop Loss
🔶 INSTRUCTIONS
🔸Adding the Strategy to the Chart
🔸Configuring the Strategy
🔸Backtesting and Practice
🔸Market Awareness
🔸Visual Customization
🔶 CONCLUSION
▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅
🔶 ORIGINALITY The Divergence Trend Trading with Dynamic Position Sizing strategy uniquely combines price divergence indicators with trend analysis to optimize entry and exit points. Unlike static trading strategies, it employs dynamic position sizing based on a fixed risk amount, ensuring consistent risk management. This approach allows traders to adapt to varying market conditions by adjusting position sizes according to predefined risk parameters, enhancing both flexibility and control in trading decisions. The strategy's integration of customizable stop-loss and take-profit levels further refines its risk management capabilities, making it a robust tool for both trending and volatile markets.
🔸Divergence-Trend Combination By combining trend direction with divergence conditions, the strategy enhances the accuracy of entry signals, aligning trades with prevailing market trends.
🔸Dynamic Position Sizing This strategy calculates position sizes dynamically, based on a fixed risk amount, allowing traders to maintain consistent risk exposure across trades.
🔸Customizable Risk Management Traders can set flexible risk-reward ratios and adjust stop-loss and take-profit levels, tailoring the strategy to their risk tolerance and market conditions.
🔶 FUNCTIONALITY The Divergence Trend Trading with Dynamic Position Sizing strategy leverages a combination of trend indicators and price and oscillator divergences to identify optimal trading opportunities. This strategy is designed to capitalize on medium to long-term price movements and works best on h1, h4 or D1 timeframes. It allows traders to manage risk effectively while taking advantage of both long and short positions.
🔸Indicators 🞘 Trend Indicator: A long trend is used to determine market direction, ensuring trades align with prevailing trends.
Recommendation: We recommend using the Adaptive MAs (Hurst, CVaR, Fractal) // AlgoFyre indicator with the following settings for trend detection. However, you can use any trend indicator that suits your trading style, e.g. an EMA 200.
🞘 Oscillator Source: The oscillator source is used for momentum price divergence identification. Any momentum oscillator can be used, e.g. RSI, Stochastic etc. A good oscillator is the Stochastic with the following settings:
🔸Conditions 🞘 Long Entry: A long entry condition is met if price closes above the trend AND selected divergence conditions are met, e.g. regular bullish divergence with a 10 bar lookback period with the divergence being below the 50 point mean. If the info table shows all 3 columns in the same color, the entry conditions are met and a position is opened.
🞘 Short Entry: A short entry condition is met if price closes below the trend AND selected divergence conditions are met, e.g. regular bearish divergence with a 10 bar lookback period with the divergence being above the 50 point mean.
🞘 Take Profit: Take Profit is determined by the Risk to Reward Ratio settings depending on the price distance between the entry price and the stop loss price, e.g. if stop loss is 1% away from entry and Risk Reward Ratio is 3:1 then Take Profit will be set at 3% from entry.
🞘 Stop Loss: Stop loss is a fixed level away from the trend source. For long positions, stop loss is set below the trend, and for short positions, above the trend.
🔶 INSTRUCTIONS The Divergence Trend Trading with Dynamic Position Sizing strategy can be set up by adding it to your TradingView chart and configuring parameters such as the oscillator source, trend source, and risk management settings. This strategy is designed to capitalize on short-term price movements by dynamically adjusting position sizes based on predefined risk parameters. Enhance the accuracy of signals by combining this strategy with additional indicators like trend-following or momentum-based tools. Adjust settings to better manage risk and optimize entry and exit points.
🔸Adding the Strategy to the Chart:
Go to your TradingView chart.
Click on the "Indicators" button at the top.
Search for "Divergence Trend Trading with Dynamic Position Sizing // AlgoFyre" in the indicators list.
Click on the strategy to add it to your chart.
🔸Configuring the Strategy:
Open the strategy settings by clicking on the gear icon next to its name on the chart.
Oscillator Source: Select the source for the oscillator. An oscillator like Stochastic needs to be attached to the chart already in order to be used as an oscillator source to be selectable.
Trend Source: Choose the trend source to determine market direction. A trend indicator like Adaptive MAs (Hurst, CVaR, Fractal) // AlgoFyre needs to be attached to the chart already in order to be used as a trend source to be selectable.
Stop Loss Percentage: Set the stop loss distance from the trend source as a percentage.
Risk/Reward Ratio: Define the desired risk/reward ratio for trades.
🔸Backtesting and Practice:
Backtest the strategy on historical data to understand how it performs in various market environments.
Practice using the strategy on a demo account before implementing it in live trading.
🔸Market Awareness:
Keep an eye on market news and events that might cause extreme price movements. The strategy reacts to price data and might not account for news-driven events that can cause large deviations.
🔸Visual Customization Visualization Settings: Customize the display of entry price, take profit, and stop loss levels.
Color Settings: Switch to the AlgoFyre theme or set custom colors for bullish, bearish, and neutral states.
Table Settings: Enable or disable the information table and adjust its position.
🔶 CONCLUSION
The Divergence Trend Trading with Dynamic Position Sizing strategy provides a robust framework for capitalizing on short-term market trends by combining price divergence with dynamic position sizing. This strategy leverages divergence conditions to identify entry points and utilizes a trend source for directional bias, ensuring trades align with prevailing market conditions. By incorporating dynamic position sizing based on a fixed risk amount, traders can effectively manage risk and adapt to varying market conditions. The strategy's customizable stop-loss and take-profit levels further enhance its risk management capabilities, making it a versatile tool for both trending and volatile markets. With its strategic blend of technical indicators and risk management, the Divergence Trend Trading strategy offers traders a comprehensive approach to optimizing trade execution and maximizing potential returns.
Trend
Dow Theory based Strategy (Markttechnik)What makes this script unique?
calculates two trends at the same time: a big one for the overall strong trend - and a small one to trigger a trade after a small correction within the big trend
only if both trends (the small and the big trend) are in an uptrend, a buy signal is created: this prevents a buy signal from being generated in a falling market just because an upward movement begins in a small trend
the exit strategy can be configured very flexibly and individually: use the last low as stop loss and automatically switch to a trialing stop loss as soon as the take profit is reached (instead of finishing the trade)
the take profit strategy can also be configured - e.g. use the last high, a fixed percentage or a combination of it
plots each trade in detail on the chart - e.g. inner candles or the exact progression of the stop loss over the entire duration of the trade to allow you to analyze each trade precisely
What does the script do and how?
In this strategy an intact upward trend is characterized by higher highs and lower lows only if the big trend and the small trend are in an upward trend at the same time.
The following describes how the script calculates a buy signal. Every step is drawn to the chart immediately - see example chart above:
1. the stock rises in the big trend - i.e. in a longer time frame
2. a correction takes place (the share price falls) - but does not create a new low
3. the stock rises again in the big trend and creates a new high
From now on, the big trend is in an intact upward trend (until it falls below its last low).
This is drawn to the chart as 3 bold green zigzag lines.
But we do not buy right now! Instead, we want to wait for a correction in the big trend and for the start of a small upward trend.
4. a correction takes place (not below the low from 2.)
Now, the script also starts to calculate the small trend:
5. the stock rises in the small trend - i.e. in a shorter time frame
6. a small correction takes place (not below the low from 4.)
7. the stock rises above the high from 5.: a new high in the shorter time frame
Now, both trends are in an intact upward trend.
A buy signal is created and both the minor and major trend are colored green on the chart.
Now, the trade is active and:
the stop loss is calculated and drawn for each candle
the take profit is calculated and drawn to the chart
as soon as the price reaches the take profit or the stop loss, the trade is closed
Features and functionalities
Uptrend : An intact upward trend is characterized by higher highs and lower lows. Uptrends are shown in green on the chart.
The beginning of an uptrend is numbered 1, each subsequent high is numbered 2, and each low is numbered 3.
Downtrend: An intact downtrend is characterized by lower highs and lower lows. Downtrends are displayed in red on the chart.
Note that our indicator does not show the numbering of the points of the downtrend.
Trendless phases: If there is no intact trend, we are in a trendless phase. Trendless phases are shown in blue on the chart.
This occurs after an uptrend, when a lower low or a lower high is formed. Or after a downtrend, when a higher low or a higher high is formed.
Buy signals
A buy signal is generated as soon as a new upward trend has been formed or a new high has been established in an intact upward trend.
But even before a buy signal is generated, this strategy anticipates a possible emerging trend and draws the next possible trading opportunity to the chart.
In addition to the (not yet reached) buy price, the risk-reward ratio, the StopLoss and the TakeProfit price is shown.
With this information, you can already enter a StopBuy order, which is thus triggered directly with the then created buy signal.
You can configure, if a buy signal shall be created while the big trend is an uptrend, a downtrend and/or trendless.
Exit strategy
With this strategy, you have multiple possibilities to close your position. All of them can be configured within the settings. In general, you can combine a take profit strategy with a stop loss strategy.
The take profit price will be calculated once for each trade. It will be drawn to the chart for active trade.
Depending on your configuration, this can be the last high (which is often a resistance level), a fixed percentage added to the buy price or the maximum of both.
You can also configure that a trailing stop loss is used as soon as the take profit price is reached once.
The stop loss gets recalculated with each candle and is displayed and plotted for each active and finished trade. With this, you can easily check how the stop loss changed during your trades.
The stop loss can be configured flexibly:
Use the classic "trailing stop loss" that follows the price from below.
Set the stop loss to the last low and tighten it every time the small trend marks a new local low.
Confiure that the stop loss is tightened as soon as the break even is reached. Nothing is more annoying than a trade turning from a win to a loss.
Ignore inside candles (see description below) and relax the stop loss to use the outside candle for its calculation.
Inner candles
Inner candles are created when the candle body is within the maximum values of a previous candle (the outer candle). There can be any number of consecutive inner candles. As soon as you have activated the "Check inner candles" setting, all consecutive inner candles will be highlighted in yellow on the chart.
Prices during an inner candle scenario might be irrelevant for trading and can be interpreted as fluctuations within the outside candle. For this reason, the trailing stop loss should not be aligned with inner candles. Therefore, as soon as an inner candle occurs, the stop loss is reset and the low at the time of the outside candle is used as the calculation for the trailing stop loss. This will all be plotted for you on the chart.
Display of the trades:
All active and closed trades of the last 5 years are displayed in the chart with buy signal, sell, stop loss history, inside candles and statistics.
Backtesting:
The strategy can be simulated for each stock over the period of the last 5 years. Each individual trade is recorded and can be traced and analyzed in the chart including stop loss history. Detailed evaluations and statistics are available to evaluate the performance of the strategy.
Additional Statistics
This strategy immediately displays a statistic table to the chart area giving you an overview of its performance over the last years for the given chart.
This includes:
The total win/loss in $ and %
The win/loss per year in %
The active investment time in days and % (e.g. invested 10 of 100 trading days -> 10%)
The total win/loss in %, extrapolated to 100% equity usage: Only with this value can strategies really be compared. Because you are not invested between the trades and could invest in other stocks during this time. This value indicates how much profit you would have made if you had been invested 100% of the time - or to put it another way - if you had been invested 100% of the time in stocks with exactly the same performance. Let's say you had only one trade in the last 5 years that lasted, say, only one month and made 5% profit. This would be significantly better than a strategy with which you were invested for, say, 5 years and made 10% profit.
The total profit/loss per year in %, extrapolated to 100% equity usage
Notifications (alerts):
Get alerted before a new buy signal emerges to create an order if necessary and not miss a trade. You can also be notified when the stop loss needs to be adjusted. The notification can be done in different ways, e.g. by Mail, PopUp or App-Notification. This saves them the annoying, time-consuming and error-prone "click through" all the charts.
Settings: Display Settings
With these settings, you have the possibility to:
Show the small or the big trend as a background color
Configure if the numbers (1-2-3-2-3) shall be shown at all or only for the small, the big trend or both
Settings: Trend calculation - fine tuning
Drawing trend lines on a chart is not an exact science. Some highs and lows are not very clear or significant. And so it will always happen that 2 different people would draw different trendlines for the same chart. Unfortunately, there is no exact "right" or "wrong" here.
With the options under "Trend Calculation - Fine Tuning" you have the possibility to influence the drawing in of trends and to adapt it to your personal taste.
Small Trend, Big Trend : With these settings you can influence how significant a high or low has to be to recognize them as an independent high or low. The larger the values, the more significant a high or low must be to be recognized as such.
High and low recognition : With this setting you can influence when two adjacent, almost identical highs or lows should be recognized as independent highs or lows. The higher the value, the more different "similar" highs or lows must be in order to be recognized as such.
Which default settings were selected and why
Show Trades: true - its often useful to see all recent trades in the chart
Time Frame: 1 day - most common time frame (except for day traders)
Take Profit: combined 10% - the last high is taken as take profit because the trend often changes there, but only if there is at least 10% profit to ensure we do not risk money for a tiny profit
Stop Loss: combined - the last low is used as stop loss because the trend would break there and switch to a trailing stop loss as soon as our take profit is reached to let our profits run without risking them anymore
Stop Loss distance: 3% - we are giving the price 3% air (below the last low) to avoid being stopped out due to a short price drop
Trailing Stop Loss: 2% - we have to give the stop loss some room to avoid being stopped out prematurely; this is a value that is well balanced between a certain downside distance and the profit-taking ratio
Set Stop Loss to break even: true, 2% - once we reached the break even, it is a common practice to not risk our money anymore, the value is set to the same value as the trailing stop loss
Trade Filter: Uptrend - we only start trades if the big trend is an uptrend in the expectation that it will continue after a small correction
Display settings: those will not influence the trades, feel free to change them to your needs
Trend calculation - Fine Tuning: 1/1,5/0,05; influences the internal calculation for highs and lows and how significant they need to be to be considered a new high or low; the default values will provide you nicely calculated trends in the daily time frame; if there are too many or too few lows and highs according to your taste, feel free to play around and immediately see the result drawn to the chart; read the manual for a detailed description of this values
Note that you can (and should) configure the general trading properties like your initial capital, order size, slippage and commission.
Trend Signals with TP & SL [UAlgo] StrategyThe "Trend Signals with TP & SL Strategy" is a trading strategy designed to capture trend continuation signals while incorporating sophisticated risk management techniques. This strategy is tailored for traders who wish to capitalize on trending market conditions with precise entry and exit points, automatically calculating Take Profit (TP) and Stop Loss (SL) levels based on either Average True Range (ATR) or percentage values. The strategy aims to enhance trade management by preventing multiple simultaneous positions and dynamically adapting to changing market conditions.
This strategy is highly configurable, allowing traders to adjust sensitivity, the ATR calculation method, and the cloud moving average length. Additionally, the strategy can display buy and sell signals directly on the chart, along with visual representation of entry points, stop losses, and take profits. It also features a cloud-based trend analysis using a MACD-driven color fill that indicates the strength and direction of the trend.
🔶 Key Features
Configurable Trend Continuation Signals:
Source Selection: The strategy uses the midpoint of the high-low range as the default source, but it is adjustable.
Sensitivity: The sensitivity of the trend signals can be adjusted using a multiplier, ranging from 0.5 to 5.
ATR Calculation: The strategy allows users to choose between two ATR calculation methods for better adaptability to different market conditions.
Cloud Moving Average: Traders can adjust the cloud moving average length, which is used in conjunction with MACD to provide a visual trend indication.
Take Profit & Stop Loss Management:
ATR-Based or Percent-Based: The strategy offers flexibility in setting TP and SL levels, allowing traders to choose between ATR-based multipliers or fixed percentage values.
Dynamic Adjustment: TP and SL levels are dynamically adjusted according to the selected method, ensuring trades are managed based on real-time market conditions.
Prevention of Multiple Positions:
Single Position Control: To reduce risk and enhance strategy reliability, the strategy includes an option to prevent multiple positions from being opened simultaneously.
Visual Trade Indicators:
Buy/Sell Signals: Clearly displays buy and sell signals on the chart for easy interpretation.
Entry, SL, and TP Lines: Draws lines for entry price, stop loss, and take profit directly on the chart, helping traders to monitor trades visually.
Trend Cloud: A color-filled cloud based on MACD and the cloud moving average provides a visual cue of the trend’s direction and strength.
Performance Summary Table:
In-Chart Statistics: A table in the top right of the chart displays key performance metrics, including total trades, wins, losses, and win rate percentage, offering a quick overview of the strategy’s effectiveness.
🔶 Interpreting the Indicator
Trend Signals: The strategy identifies trend continuation signals based on price action relative to an ATR-based threshold. A buy signal is generated when the price crosses above a key level, indicating an uptrend. Conversely, a sell signal occurs when the price crosses below a level, signaling a downtrend.
Cloud Visualization: The cloud, derived from MACD and moving averages, changes color to reflect the current trend. A positive cloud in aqua suggests an uptrend, while a red cloud indicates a downtrend. The transparency of the cloud offers further nuance, with more solid colors denoting stronger trends.
Entry and Exit Management: Once a trend signal is generated, the strategy automatically sets TP and SL levels based on your chosen method (ATR or percentage). The stop loss and take profit lines will appear on the chart, showing where the strategy will exit the trade. If the price reaches either the SL or TP, the trade is closed, and the respective line is deleted from the chart.
Performance Metrics: The strategy’s performance is tracked in real-time with an in-chart table. This table provides essential information about the number of trades executed, the win/loss ratio, and the overall win rate. This information helps traders assess the strategy's effectiveness and make necessary adjustments.
This strategy is designed for those who seek to engage with trending markets, offering robust tools for entry, exit, and overall trade management. By understanding and leveraging these features, traders can potentially improve their trading outcomes and risk management.
🔷 Related Script
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
Multi-Regression StrategyIntroducing the "Multi-Regression Strategy" (MRS) , an advanced technical analysis tool designed to provide flexible and robust market analysis across various financial instruments.
This strategy offers users the ability to select from multiple regression techniques and risk management measures, allowing for customized analysis tailored to specific market conditions and trading styles.
Core Components:
Regression Techniques:
Users can choose one of three regression methods:
1 - Linear Regression: Provides a straightforward trend line, suitable for steady markets.
2 - Ridge Regression: Offers a more stable trend estimation in volatile markets by introducing a regularization parameter (lambda).
3 - LOESS (Locally Estimated Scatterplot Smoothing): Adapts to non-linear trends, useful for complex market behaviors.
Each regression method calculates a trend line that serves as the basis for trading decisions.
Risk Management Measures:
The strategy includes nine different volatility and trend strength measures. Users select one to define the trading bands:
1 - ATR (Average True Range)
2 - Standard Deviation
3 - Bollinger Bands Width
4 - Keltner Channel Width
5 - Chaikin Volatility
6 - Historical Volatility
7 - Ulcer Index
8 - ATRP (ATR Percentage)
9 - KAMA Efficiency Ratio
The chosen measure determines the width of the bands around the regression line, adapting to market volatility.
How It Works:
Regression Calculation:
The selected regression method (Linear, Ridge, or LOESS) calculates the main trend line.
For Ridge Regression, users can adjust the lambda parameter for regularization.
LOESS allows customization of the point span, adaptiveness, and exponent for local weighting.
Risk Band Calculation:
The chosen risk measure is calculated and normalized.
A user-defined risk multiplier is applied to adjust the sensitivity.
Upper and lower bounds are created around the regression line based on this risk measure.
Trading Signals:
Long entries are triggered when the price crosses above the regression line.
Short entries occur when the price crosses below the regression line.
Optional stop-loss and take-profit mechanisms use the calculated risk bands.
Customization and Flexibility:
Users can switch between regression methods to adapt to different market trends (linear, regularized, or non-linear).
The choice of risk measure allows adaptation to various market volatility conditions.
Adjustable parameters (e.g., regression length, risk multiplier) enable fine-tuning of the strategy.
Unique Aspects:
Comprehensive Regression Options:
Unlike many indicators that rely on a single regression method, MRS offers three distinct techniques, each suitable for different market conditions.
Diverse Risk Measures: The strategy incorporates a wide range of volatility and trend strength measures, going beyond traditional indicators to provide a more nuanced view of market dynamics.
Unified Framework:
By combining advanced regression techniques with various risk measures, MRS offers a cohesive approach to trend identification and risk management.
Adaptability:
The strategy can be easily adjusted to suit different trading styles, timeframes, and market conditions through its various input options.
How to Use:
Select a regression method based on your analysis of the current market trend (linear, need for regularization, or non-linear).
Choose a risk measure that aligns with your trading style and the market's current volatility characteristics.
Adjust the length parameter to match your preferred timeframe for analysis.
Fine-tune the risk multiplier to set the desired sensitivity of the trading bands.
Optionally enable stop-loss and take-profit mechanisms using the calculated risk bands.
Monitor the regression line for potential trend changes and the risk bands for entry/exit signals.
By offering this level of customization within a unified framework, the Multi-Regression Strategy provides traders with a powerful tool for market analysis and trading decision support. It combines the robustness of regression analysis with the adaptability of various risk measures, allowing for a more comprehensive and flexible approach to technical trading.
RunRox - Backtesting System (ASMC)Introducing RunRox - Backtesting System (ASMC), a specially designed backtesting system built on the robust structure of our Advanced SMC indicator. This innovative tool evaluates various Smart Money Concept (SMC) trading setups and serves as an automatic optimizer, displaying which entry and exit points have historically shown the best results. With cutting-edge technology, RunRox - Backtesting System (ASMC) provides you with effective strategies, maximizing your trading potential and taking your trading to the next level
🟠 HOW OUR BACKTESTING SYSTEM WORKS
Our backtesting system for the Advanced SMC (ASMC) indicator is meticulously designed to provide traders with a thorough analysis of their Smart Money Concept (SMC) strategies. Here’s an overview of how it works:
🔸 Advanced SMC Structure
Our ASMC indicator is built upon an enhanced SMC structure that integrates the Institutional Distribution Model (IDM), precise retracements, and five types of order blocks (CHoCH OB, IDM OB, Local OB, BOS OB, Extreme OB). These components allow for a detailed understanding of market dynamics and the identification of key trading opportunities.
🔸 Data Integration and Analysis
1. Historical Data Testing:
Our system tests various entry and exit points using historical market data.
The ASMC indicator is used to simulate trades based on predefined SMC setups, evaluating their effectiveness over a specified time period.
Traders can select different parameters such as entry points, stop-loss, and take-profit levels to see how these setups would have performed historically.
2. Entry and Exit Events:
The backtester can simulate trades based on 12 different entry events, 14 target events, and 14 stop-loss events, providing a comprehensive testing framework.
It allows for testing with multiple combinations of entry and exit strategies, ensuring a robust evaluation of trading setups.
3. Order Block Sensitivity:
The system uses the sensitivity settings from the ASMC indicator to determine the most relevant order blocks and fair value gaps (FVGs) for entry and exit points.
It distinguishes between different types of order blocks, helping traders identify strong institutional zones versus local zones.
🔸 Optimization Capabilities
1. Auto-Optimizer:
The backtester includes an auto-optimizer feature that evaluates various setups to find those with the best historical performance.
It automatically adjusts parameters to identify the most effective strategies for both trend-following and counter-trend trading.
2. Stop Loss and Take Profit Optimization:
It optimizes stop-loss and take-profit levels by testing different settings and identifying those that provided the best historical results.
This helps traders refine their risk management and maximize potential returns.
3. Trailing Stop Optimization:
The system also optimizes trailing stops, ensuring that traders can maximize their profits by adjusting their stops dynamically as the market moves.
🔸 Comprehensive Reporting
1. Performance Metrics:
The backtesting system provides detailed reports, including key performance metrics such as Net Profit, Win Rate, Profit Factor, and Max Drawdown.
These metrics help traders understand the historical performance of their strategies and make data-driven decisions.
2. Flexible Settings:
Traders can adjust initial balance, commission rates, and risk per trade settings to simulate real-world trading conditions.
The system supports testing with different leverage settings, allowing for realistic assessments even with tight stop-loss levels.
🔸 Conclusion
The RunRox Backtesting System (ASMC) is a powerful tool for traders seeking to validate and optimize their SMC strategies. By leveraging historical data and sophisticated optimization algorithms, it provides insights into the most effective setups, enhancing trading performance and decision-making.
🟠 HERE ARE THE AVAILABLE FEATURES
Historical backtesting for any setup – Select any entry point, exit point, and various stop-loss options to see the results of your setup on historical data.
Auto-optimizer for finding the best setups – The indicator displays settings that have shown the best results historically, providing valuable insights.
Auto-optimizer for counter-trend setups – Discover entry and exit points for counter-trend trading based on historical performance.
Auto-optimizer for stop-loss – The indicator shows stop-loss points that have been most effective historically.
Auto-optimizer for take-profit – The indicator identifies take-profit points that have performed well in historical trading data.
Auto-optimizer for trailing stop – The indicator presents trailing stop settings that have shown the best historical results.
And much more within our indicator, all of which we will cover in this post. Next, we will showcase the possible entry points, targets, and stop-loss options available for testing your strategies
🟠 ENTRY SETTINGS
12 Event Triggers for Trade Entry
Extr. ChoCh OB
Extr. ChoCh FVG
ChoCh
ChoCh OB
ChoCh FVG
IDM OB
IDM FVG
BoS FVG
BoS OB
BoS
Extr. BoS FVG
Extr. BoS OB
3 Trade Direction Options
Long Only: Enter long positions only
Short Only: Enter short positions only
Long and Short: Enter both long and short positions based on trend
3 Levels for Order Block/FVG Entries
Beginning: Enter the trade at the first touch of the Order Block/FVG
Middle: Enter the trade when the middle of the Order Block/FVG is reached
End: Enter the trade upon full filling of the Order Block/FVG
*Three levels work only for Order Blocks and FVG. For trade entries based on BOS or CHoCH, these settings do not apply as these parameters are not available for these types of entries
You can choose any combination of trade entries imaginable.
🟠 TARGET SETTINGS
14 Target Events, Including Fixed % and Fixed RR (Risk/Reward):
Fixed - % change in price
Fixed RR - Risk Reward per trade
Extr. ChoCh OB
Extr. ChoCh FVG
ChoCh
ChoCh OB
ChoCh FVG
IDM OB
IDM FVG
BoS FVG
BoS OB
BoS
Extr. BoS FVG
Extr. BoS OB
3 Levels of Order Block/FVG for Target
Beginning: Close the trade at the first touch of your target.
Middle: Close the trade at the midpoint of your chosen target.
End: Close the trade when your target is fully filled.
Customizable Parameters
Easily set your Fixed % and Fixed RR targets with a user-friendly input field. This field works only for the Fixed and Fixed RR entry parameters. When selecting a different entry point, this field is ignored
Choose any combination of target events to suit your trading strategy.
🟠 STOPLOSS SETTINGS
14 Possible StopLoss Events Including Entry Orderblock/FVG
Fixed - Fix the loss on the trade when the price moves by N%
Entry Block
Extr. ChoCh OB
Extr. ChoCh FVG
ChoCh
ChoCh OB
ChoCh FVG
IDM OB
IDM FVG
BoS FVG
BoS OB
BoS
Extr. BoS FVG
Extr. BoS OB
3 Levels for Order Blocks/FVG Exits
Beginning: Exit the trade at the first touch of the order block/FVG.
Middle: Exit the trade at the middle of the order block/FVG.
End: Exit the trade at the full completion of the order block/FVG.
Dedicated Field for Setting Fixed % Value
Set a fixed % value in a dedicated field for the Fixed parameter. This field works only for the Fixed parameter. When selecting other exit parameters, this field is ignored.
🟠 ADDITIONAL SETTINGS
Trailing Stop, %
Set a Trailing Stop as a percentage of your trade to potentially increase profit based on historical data.
Move SL to Breakeven, bars
Move your StopLoss to breakeven after exiting the entry zone for a specified number of bars. This can enhance your potential WinRate based on historical performance.
Skip trade if RR less than
This feature allows you to skip trades where the potential Risk-to-Reward ratio is less than the number set in this field.
🟠 EXAMPLE OF MANUAL SETUP
For example, let me show you how it works on the chart. You select entry parameters, stop loss parameters, and take profit parameters for your trades, and the strategy automatically tests this setup on historical data, allowing you to see the results of this strategy.
In the screenshot above, the parameters were as follows:
Trade Entry: CHoCH OB (Beginning)
Stop Loss: Entry Block
Take Profit: Break of BOS
The indicator will automatically test all possible trades on the chart and display the results for this setup.
🟠 AUTO OPTIMIZATION SETTINGS
In the screenshot above, you can see the optimization table displaying various entry points, exits, and stop-loss settings, along with their historical performance results and other parameters. This feature allows you to identify trading setups that have shown the best historical outcomes.
This functionality will enhance your trading approach, providing you with valuable insights based on historical data. You’ll be aware of the Smart Money Concept settings that have historically worked best for any specific chart and timeframe.
Our indicator includes various optimization options designed to help you find the most effective settings based on historical data. There are 5 optimization modes, each offering unique benefits for every trader
Trend Entry - Optimization of the best settings for trend-following trades. The strategy will enter trades only in the direction of the trend. If the trend is upward, it will look for long entry points and vice versa.
Counter Trend Entry - Finding setups against the trend. If the trend is upward, the script will search for short entry points. This is the opposite of trend entry optimization.
Stop Loss - Identifying stop-loss points that showed the best historical performance for the specific setup you have configured. This helps in finding effective exit points to minimize losses.
Take Profit - Determining targets for the configured setup based on historical performance, helping to identify potentially profitable take profit levels.
Trailing Stop - Finding optimal percentages for the trailing stop function based on historical data, which can potentially increase the profit of your trades.
Ability to set parameters for auto-optimization within a specified range. For example, if you choose FixRR TP from 1 to 10, the indicator will automatically test all possible Risk Reward Take Profit variations from 1 to 10 and display the results for each parameter individually.
Ability to set initial deposit parameters, position commissions, and risk per trade as a fixed percentage or fixed amount. Additionally, you can set the maximum leverage for a trade.
There are times when the stop loss is very close to the entry point, and adhering to the risk per trade values set in the settings may not allow for such a loss in any situation. That’s why we added the ability to set the maximum possible leverage, allowing you to test your trading strategy even with very tight stop losses.
Duplicated Smart Money Structure settings from our Advanced SMC indicator that you can adjust to match your trading style flexibly. All these settings will be taken into account during the optimization process or when manually calculating settings.
Additionally, you can test your strategy based on higher timeframe order blocks. For example, you can test a strategy on a 1-minute chart while displaying order blocks from a 15-minute timeframe. The auto-optimizer will consider all these parameters, including higher timeframe order blocks, and will enter trades based on these order blocks.
Highly flexible dashboard and results optimization settings allow you to display the tables you need and sort results by six different criteria: Profit Factor, Profit, Winrate, Max Drawdown, Wins, and Trades. This enables you to find the exact setup you desire, based on these comprehensive data points.
🟠 ALERT CUSTOMIZATION
With this indicator, you can set up buy and sell alerts based on the test results, allowing you to create a comprehensive trading strategy. This feature enables you to receive real-time signals, making it a powerful tool for implementing your trading strategies.
🟠 STRATEGY PROPERTIES
For backtesting, we used realistic initial data for entering trades, such as:
Starting balance: $1000
Commission: 0.01%
Risk per trade: 1%
To ensure realistic data, we used the above settings. We offer two methods for calculating your order size, and in our case, we used a 1% risk per trade. Here’s what it means:
Risk per trade: This is the maximum loss from your deposit if the trade goes against you. The trade volume can change depending on your stop-loss distance from the entry point. Here’s the formula we use to calculate the possible volume for a single trade:
1. quantity = percentage_risk * balance / loss_per_1_contract (incl. fee)
Then, we calculate the maximum allowed volume based on the specified maximum leverage:
2. max_quantity = maxLeverage * balance / entry_price
3. If quantity < max_quantity, meaning the leverage is less than the maximum allowed, we keep quantity. If quantity > max_quantity, we use max_quantity (the maximum allowed volume according to the set leverage).
This way, depending on the stop-loss distance, the position size can vary and be up to 100% of your deposit, but the loss in each trade will not exceed the set percentage, which in our case is 1% for this backtest. This is a standard risk calculation method based on your stop-loss distance.
🔸 Statistical Significance of Trade Data
In our strategy, you may notice there weren’t enough trades to form statistically significant data. This is inherent to the Smart Money Concept (SMC) strategy, where the focus is not on the number of trades but rather on the risk-to-reward ratio per trade. In SMC strategies, it’s crucial to avoid taking numerous uncertain setups and instead perform a comprehensive analysis of the market situation.
Therefore, our strategy results show fewer than 100 trades. It’s important to understand that this small sample size isn’t statistically significant and shouldn’t be relied upon for strategy analysis. Backtesting with a small number of trades should not be used to draw conclusions about the effectiveness of a strategy.
🔸 Versatile Use Cases
The methods of using this indicator are numerous, ranging from identifying potentially the best-performing order blocks on the chart to creating a comprehensive trading strategy based on the data provided by our indicator. We believe that every trader will find a valuable application for this tool, enhancing their entry and exit points in trades.
Disclaimer
Past performance is not indicative of future results. The results shown by this indicator do not guarantee similar outcomes in the future. Use this tool as part of a comprehensive trading strategy, considering all market conditions and risks.
How to access
For access to this indicator, please read the author’s instructions below this post
Chande Kroll Trend Strategy (SPX, 1H) | PINEINDICATORSThe "Chande Kroll Stop Strategy" is designed to optimize trading on the SPX using a 1-hour timeframe. This strategy effectively combines the Chande Kroll Stop indicator with a Simple Moving Average (SMA) to create a robust method for identifying long entry and exit points. This detailed description will explain the components, rationale, and usage to ensure compliance with TradingView's guidelines and help traders understand the strategy's utility and application.
Objective
The primary goal of this strategy is to identify potential long trading opportunities in the SPX by leveraging volatility-adjusted stop levels and trend-following principles. It aims to capture upward price movements while managing risk through dynamically calculated stops.
Chande Kroll Stop Parameters:
Calculation Mode: Offers "Linear" and "Exponential" options for position size calculation. The default mode is "Exponential."
Risk Multiplier: An adjustable multiplier for risk management and position sizing, defaulting to 5.
ATR Period: Defines the period for calculating the Average True Range (ATR), with a default of 10.
ATR Multiplier: A multiplier applied to the ATR to set stop levels, defaulting to 3.
Stop Length: Period used to determine the highest high and lowest low for stop calculation, defaulting to 21.
SMA Length: Period for the Simple Moving Average, defaulting to 21.
Calculation Details:
ATR Calculation: ATR is calculated over the specified period to measure market volatility.
Chande Kroll Stop Calculation:
High Stop: The highest high over the stop length minus the ATR multiplied by the ATR multiplier.
Low Stop: The lowest low over the stop length plus the ATR multiplied by the ATR multiplier.
SMA Calculation: The 21-period SMA of the closing price is used as a trend filter.
Entry and Exit Conditions:
Long Entry: A long position is initiated when the closing price crosses over the low stop and is above the 21-period SMA. This condition ensures that the market is trending upward and that the entry is made in the direction of the prevailing trend.
Exit Long: The long position is exited when the closing price falls below the high stop, indicating potential downward movement and protecting against significant drawdowns.
Position Sizing:
The quantity of shares to trade is calculated based on the selected calculation mode (linear or exponential) and the risk multiplier. This ensures position size is adjusted dynamically based on current market conditions and user-defined risk tolerance.
Exponential Mode: Quantity is calculated using the formula: riskMultiplier / lowestClose * 1000 * strategy.equity / strategy.initial_capital.
Linear Mode: Quantity is calculated using the formula: riskMultiplier / lowestClose * 1000.
Execution:
When the long entry condition is met, the strategy triggers a buy signal, and a long position is entered with the calculated quantity. An alert is generated to notify the trader.
When the exit condition is met, the strategy closes the position and triggers a sell signal, accompanied by an alert.
Plotting:
Buy Signals: Indicated with an upward triangle below the bar.
Sell Signals: Indicated with a downward triangle above the bar.
Application
This strategy is particularly effective for trading the SPX on a 1-hour timeframe, capitalizing on price movements by adjusting stop levels dynamically based on market volatility and trend direction.
Default Setup
Initial Capital: $1,000
Risk Multiplier: 5
ATR Period: 10
ATR Multiplier: 3
Stop Length: 21
SMA Length: 21
Commission: 0.01
Slippage: 3 Ticks
Backtesting Results
Backtesting indicates that the "Chande Kroll Stop Strategy" performs optimally on the SPX when applied to the 1-hour timeframe. The strategy's dynamic adjustment of stop levels helps manage risk effectively while capturing significant upward price movements. Backtesting was conducted with a realistic initial capital of $1,000, and commissions and slippage were included to ensure the results are not misleading.
Risk Management
The strategy incorporates risk management through dynamically calculated stop levels based on the ATR and a user-defined risk multiplier. This approach ensures that position sizes are adjusted according to market volatility, helping to mitigate potential losses. Trades are sized to risk a sustainable amount of equity, adhering to the guideline of risking no more than 5-10% per trade.
Usage Notes
Customization: Users can adjust the ATR period, ATR multiplier, stop length, and SMA length to better suit their trading style and risk tolerance.
Alerts: The strategy includes alerts for buy and sell signals to keep traders informed of potential entry and exit points.
Pyramiding: Although possible, the strategy yields the best results without pyramiding.
Justification of Components
The Chande Kroll Stop indicator and the 21-period SMA are combined to provide a robust framework for identifying long trading opportunities in trending markets. Here is why they work well together:
Chande Kroll Stop Indicator: This indicator provides dynamic stop levels that adapt to market volatility, allowing traders to set logical stop-loss levels that account for current price movements. It is particularly useful in volatile markets where fixed stops can be easily hit by random price fluctuations. By using the ATR, the stop levels adjust based on recent market activity, ensuring they remain relevant in varying market conditions.
21-Period SMA: The 21-period SMA acts as a trend filter to ensure trades are taken in the direction of the prevailing market trend. By requiring the closing price to be above the SMA for long entries, the strategy aligns itself with the broader market trend, reducing the risk of entering trades against the overall market direction. This helps to avoid false signals and ensures that the trades are in line with the dominant market movement.
Combining these two components creates a balanced approach that captures trending price movements while protecting against significant drawdowns through adaptive stop levels. The Chande Kroll Stop ensures that the stops are placed at levels that reflect current volatility, while the SMA filter ensures that trades are only taken when the market is trending in the desired direction.
Concepts Underlying Calculations
ATR (Average True Range): Used to measure market volatility, which informs the stop levels.
SMA (Simple Moving Average): Used to filter trades, ensuring positions are taken in the direction of the trend.
Chande Kroll Stop: Combines high and low price levels with ATR to create dynamic stop levels that adapt to market conditions.
Risk Disclaimer
Trading involves substantial risk, and most day traders incur losses. The "Chande Kroll Stop Strategy" is provided for informational and educational purposes only. Past performance is not indicative of future results. Users are advised to adjust and personalize this trading strategy to better match their individual trading preferences and risk tolerance.
Entry Fragger - Strategy
For basic instructions please visit my other script "Entry Fragger".
The Signal Logic is explained there.
v1.4:
- Added advanced backtesting with fully customizable entries.
- Fully automated Buy Signals (profitable).
- Adjustable timeframes for signal logic. (requested)
Every setting affects the accuracy and profitability greatly now, based on settings applied.
The strategy performs best on high timeframes with larger capital and no leverage.
Useless for Forex, but absolutely smashes stocks and crypto on mid to high timeframes.
Please read through my other scripts description.
Set values as preferred and try your assets.
It does NOT work on low timeframes and forex!
Hint: BTC 4H, Custom Timeframe 1h, Moon Mode and Show Sell Signals enabled, R2R: 2.
Hurst Future Lines of Demarcation StrategyJ. M. Hurst introduced a concept in technical analysis known as the Future Line of Demarcation (FLD), which serves as a forward-looking tool by incorporating a simple yet profound line into future projections on a financial chart. Specifically, the FLD is constructed by offsetting the price half a cycle ahead into the future on the time axis, relative to the Hurst Cycle of interest. For instance, in the context of a 40 Day Cycle, the FLD would be represented by shifting the current price data 20 days forward on the chart, offering an idea of future price movement anticipations.
The utility of FLDs extends into three critical areas of insight, which form the backbone of the FLD Trading Strategy:
A price crossing the FLD signifies the confirmation of either a peak or trough formation, indicating pivotal moments in price action.
Such crossings also help determine precise price targets for the upcoming peak or trough, aligned with the cycle of examination.
Additionally, the occurrence of a peak in the FLD itself signals a probable zone where the price might experience a trough, helping to anticipate of future price movements.
These insights by Hurst in his "Cycles Trading Course" during the 1970s, are instrumental for traders aiming to determine entry and exit points, and to forecast potential price movements within the market.
To use the FLD Trading Strategy, for example when focusing on the 40 Day Cycle, a trader should primarily concentrate on the interplay between three Hurst Cycles:
The 20 Day FLD (Signal) - Half the length of the Trade Cycle
The 40 Day FLD (Trade) - The Cycle you want to trade
The 80 Day FLD (Trend) - Twice the length of the Trade Cycle
Traders can gauge trend or consolidation by watching for two critical patterns:
Cascading patterns, characterized by several FLDs running parallel with a consistent separation, typically emerge during pronounced market trends, indicating strong directional momentum.
Consolidation patterns, on the other hand, occur when multiple FLDs intersect and navigate within the same price bandwidth, often reversing direction to traverse this range multiple times. This tangled scenario results in the formation of Pause Zones, areas where price momentum is likely to temporarily stall or where the emergence of a significant trend might be delayed.
This simple FLD indicator provides 3 FLDs with optional source input and smoothing, A-through-H FLD interaction background, adjustable “Close the Trade” triggers, and a simple strategy for backtesting it all.
The A-through-H FLD interactions are a framework designed to classify the different types of price movements as they intersect with or diverge from the Future Line of Demarcation (FLD). Each interaction (designated A through H by color) represents a specific phase or characteristic within the cycle, and understanding these can help traders anticipate future price movements and make informed decisions.
The adjustable “Close the Trade” triggers are for setting the crossover/under that determines the trade exits. The options include: Price, Signal FLD, Trade FLD, or Trend FLD. For example, a trader may want to exit trades only when price finally crosses the Trade FLD line.
Shoutouts & Credits for all the raw code, helpful information, ideas & collaboration, conversations together, introductions, indicator feedback, and genuine/selfless help:
🏆 @TerryPascoe
🏅 @Hpotter
👏 @parisboy
Pivot Point SuperTrend Strategy +TrendFilterIn the dynamic world of financial markets, traders are always on the lookout for innovative strategies to identify trends and make timely trades. The "Pivot Point SuperTrend strategy +TrendFilter" has emerged as an intriguing approach, combining two popular indicators - Pivot Points and SuperTrend, while introducing an additional trend filter for added precision. This strategy draws inspiration from Lonesome TheBlue's "Pivot Point SuperTrend" script, aiming to provide traders with a reliable tool for trend following while minimizing false signals.
The Core Concept:
The strategy's foundation lies in the fusion of Pivot Points and SuperTrend indicators, and the addition of a robust trend filter. It begins by calculating Pivot Highs and Lows over a specified period, serving as crucial reference points for trend analysis. Through a weighted average calculation, these Pivot Points create a center line, refining the overall indicator.
Next, based on the center line and the Average True Range (ATR) with a user-defined Factor, upper and lower bands are generated. These bands adapt to market volatility, adding flexibility to the strategy. The heart of the "Pivot Point SuperTrend" strategy lies in accurately identifying the prevailing trend, with the indicator smoothly transitioning between bullish and bearish signals as the price interacts with the SuperTrend bands.
The additional trend filter introduced into the strategy further enhances its capabilities. This filter is based on a moving average, providing a dynamic assessment of the trend's strength and direction. By combining this trend filter with the original Pivot Point SuperTrend signals, the strategy aims to make more informed and reliable trading decisions.
Advantages of "Pivot Point SuperTrend" with Trend Filter:
1. Enhanced Precision: The incorporation of a trend filter improves the strategy's accuracy by confirming the overall trend direction before generating signals.
2. Trend Continuation: The integration of Pivot Points and SuperTrend, along with the trend filter, aims to prolong trades during strong market trends, potentially maximizing profit opportunities.
3. Reduced Whipsaws: The strategy's weighted average calculation, coupled with the trend filter, helps minimize false signals and reduces whipsaws during uncertain or sideways market conditions.
4. Support and Resistance Insights: The strategy continues to provide additional support and resistance levels based on the Pivot Points, offering valuable contextual information to traders.
Master Trend ReversalThe 'Master Trend Reversal' strategy is an innovative approach to detecting trend reversals in the market. This strategy harnesses the power of 'Pin Bars', a specific type of candlestick, to pinpoint potential trading opportunities.
Based on the properties of Pin Bars, this strategy identifies scenarios where the market is likely to reverse its trend. In particular, it seeks out Pin Bars that are significantly longer than their surrounding candles, a length determined by the 'Pin Bar Size (%)' parameter.
When a bullish Pin Bar is detected (i.e., the closing price is lower than the opening price, and the gap between the opening and low prices exceeds the specified Pin Bar size), the strategy goes long. Conversely, upon identifying a bearish Pin Bar (the closing price is higher than the opening price, and the difference between the high and opening prices is greater than the specified Pin Bar size), the strategy goes short.
Furthermore, 'Master Trend Reversal' incorporates an efficient risk management mechanism via stop-loss orders. The stop-loss level is calculated based on the average price of the position and the 'Stop Loss Percentage (%)' as specified by the user.
Hence, the 'Master Trend Reversal' strategy offers a unique approach to capitalize on market trend reversals while limiting potential losses through the use of stop-loss orders. This combination of precise trend reversal detection and robust risk management makes this strategy particularly useful for traders seeking to maximize their profits while effectively controlling their risk exposure.
Please remember that, like any trading strategy, 'Master Trend Reversal' does not guarantee success and should be used as part of a holistic risk management approach in the markets.
Blockunity Divinetrend (BDT)A formidable trend-following indicator, based on an ATR combined with a trailing stop mechanism. Divinetrend’s aim is to offer a simple and efficient alternative to Supertrend, another highly reputed indicator of the same type. It comes with a trading strategy that can be activated in its parameters. You can also change a number of design parameters.
Divinetrend is pretty straightforward in its approach. It calculates a base moving average taking into account the asset’s volatility, multiplies it with an ATR, then displays a line representing a trailing stop. When a red line is broken, the asset is considered to be moving back into an uptrend. Inversely, when a green line is broken, a bearish signal is sent. In the parameters, you can also activate a trend contestation period. If this parameter is activated, the price must have been trending for at least 5 days for the trend change to be validated.
Usage Advice
We recommend that you do not use this indicator with a time unit of less than 2 hours. Ideally in 4 hours or daily, or even 3 days. Otherwise, there’s nothing special about the use of this indicator. We still recommend that you use your logarithmic chart for a better visualization, but this is optional.
This indicator was designed in particular for the crypto market, but it also works on traditional market assets.
The Different Signals
Divinetrend gives buy and sell signals based on trailing stop line breaks and trend orientation. In particular, it can be used for trend identification and following. If the Contested Trend option is activated in the settings, the indicator will also display a contested period in blue. In this case, it is necessary to wait 5 days for the trend to be validated.
Integrated Strategy
In addition, a trading strategy is integrated into the Divinetrend indicator. This can be activated in the parameters. This is mainly there to see the results and the relevance of the indicator in the TradingView Strategy Tester. We do not recommend using it alone. As this strategy is used to study the indicator's performance, we use the following default parameters: An initial capital of 2,000 USDT with 100% of equity in order size. In other words, we'll bet the entire portfolio on each trade. To do this, we use a default stop loss of 10%, to avoid risking heavy losses. We also use a commission of 0.01% and a slippage of 3 ticks to reflect more reality.
Volatility Compression Breakout - LeafAlgo Pro StrategyThe Volatility Compression Breakout strategy is designed to identify periods of low volatility followed by potential breakout opportunities in the market. It aims to capture moments when the price consolidates within a narrow range, indicating a decrease in volatility, and anticipates a subsequent expansion in price movement. This strategy is based on our indicator of the same name (), but differs by offering many more options for the band/channel type and trend filters in addition to implementing the ability to use this strategy with algorithmic plug-ins (see details at the bottom).
This strategy features six types of bands/channels and five types of trend filters, for a total of 30 combinations. The six band/channel types are the Adaptive Gaussian MA channel (based on the Adaptive Gaussian MA that we previously published ()), standard Bollinger Bands, smoothed Bollinger Bands (basis is an EMA of the typical Bollinger Basis), Keltner Channels, a Quadratic Regression Channel (based on the channel that we previously published in the LeafAlgo Pro indicator ()), and Volatility-Based Mean Reversion Bands (). The five trend filters include an EMA, SMA, Weighted MA, McGinley Dynamic, and the Adaptive Gaussian MA itself.
Examples of the different band/channel types (all with EMA as the trend filter):
Adaptive Gaussian MA Channel:
Bollinger Bands:
Smoothed Bollinger Bands:
Keltner Channels:
Quadratic Regression Channel:
Volatility-Based Mean Reversion Bands:
Examples of the different trend filters (all with Keltner Channels):
EMA:
SMA:
WMA:
McGinley Dynamic:
Adaptive Gaussian MA:
How the Long/Short Entry Signals are Calculated:
A breakout signal upwards, accompanied by a long entry, is created when the high is greater than the secondary upper band (the upper band plus a standard deviation or with a multiplier, depending on which band/channel type is selected), the latest close is above the trend filter line, and the previous close was below the trend filter line. A break downwards, accompanied by a short entry, is created when the low is below the secondary lower band, the close is below the trend filter line, and the previous close was above the trend filter line. These conditions, along with a confirmed barstate, make up the strategy entry signals.
Coloration:
When the close price is above both the middle/basis and the trend filter, the bars are colored lime green, indicating a potential bullish market sentiment. When the close price is positioned above the basis but below the trend filter, or below the basis but above the trend filter, the bars are colored yellow, signifying a neutral or indecisive market condition. Conversely, when the close price falls below both the basis and the trend filter, the bars are colored fuchsia, suggesting a potential bearish market sentiment. Additionally, the coloration of the middle/basis line and the trend filter provides further visual cues for assessing the trend. When the close price is above the basis, the line is colored lime green, indicating a bullish trend. Conversely, when the close price is below the basis, the line is colored fuchsia, highlighting a bearish trend. Similarly, the trend line is colored lime green when the close price is above it, representing a bullish trend, and fuchsia when the close price is below it, indicating a bearish trend. The fill between the primary and secondary upper bands is colored lime and the fill between the primary and secondary lower bands is colored fuchsia. These colorations can be toggled on/off in the strategy settings menu.
How Changing Parameters Can Be Beneficial:
Modifying the parameters allows you to adapt the indicator to different market conditions and trading styles. For example, with Keltner Channels, increasing the compression period can help identify broader volatility patterns and major market shifts. On the other hand, decreasing the compression period provides more precise and timely signals for short-term traders. Adjusting the compression multiplier affects the width of the Keltner Channels. Higher multipliers increase the breakout threshold, filtering out smaller price movements and providing more reliable signals during significant market shifts. Lower multipliers make the indicator more sensitive to smaller price ranges, generating more frequent but potentially less reliable signals.
Changing the type of trend filter can drastically change your results. Test out each trend filter type and determine which one will work best for your purposes. Further, the MA periods in the trend filter settings can help you align your trades with the prevailing market direction. Increasing the period smoothes out the trend, filtering out shorter-term fluctuations and focusing on more sustained moves. Decreasing the period allows for quicker responses to changes in trend, capturing shorter-term price swings.
By adjusting the parameters and incorporating additional analysis techniques, you can customize the strategy to suit your trading style and preferences. However, it is crucial to exercise caution, conduct thorough analysis, and practice proper risk management to increase the likelihood of successful trades. Remember that no strategy can guarantee profits, and continuous learning and adaptation are key to long-term trading success.
Take Profit/Stop Loss Settings:
Take profit, stop loss, and trailing percentages are also included, found at the bottom of the Input tab under “TT and TTP” as well as “Stop Loss”. The take profit and stop loss levels will be reflected as green and red lines respectively on the chart as they occur. Make sure to understand the TP/SL ratio that you desire before use, as the desired hit rate/profitability percentage will be affected accordingly. The option for adding in a trailing stop has also been included, with options to choose between an ATR-based trail or a percentage-based trail. This strategy does NOT guarantee future returns. Apply caution in trading regardless of discretionary or algorithmic. Understand the concepts of risk/reward and the intricacies of each strategy choice before utilizing them in your personal trading.
Profitview/Pineconnector Settings:
If you wish to utilize Profitview’s automation system, find the included “Profitview Settings” under the Input tab of the strategy settings menu. If not, skip this section entirely as it can be left blank. Options will be “OPEN LONG TITLE”, “OPEN SHORT TITLE”, “CLOSE LONG TITLE”, and “CLOSE SHORT TITLE”. If you wished to trade SOL, for example, you would put “SOL LONG”, “SOL SHORT”, “SOL CLOSE LONG”, and “SOL CLOSE SHORT” in these areas. Within your Profitview extension, ensure that your Alerts all match these titles. To set an alert for use with Profitview, go to the “Alerts” tab in TradingView, then create an alert. Make sure that your desired asset and timeframe are currently displayed on your screen when creating the alert. Under the “Condition” option of the alert, select the strategy, then select the expiration time. If using TradingView Premium, this can be open-ended. Otherwise, select your desired expiration time and date. This can be updated whenever desired to ensure the strategy does not expire. Under “Alert actions”, nothing necessarily needs to be selected unless so desired. Leave the “Alert name” option empty. For the “Message”, delete the generated message and replace it with {{strategy.order.alert_message}} and nothing else. If using Pineconnector, follow the same directions for setting up an alert, but use the ",buy,,risk=" syntax as noted in the tooltips.
Additional Sample Settings (for ETHUSDT-Binance 45M):
Band/Channel Type - Keltner Channels (Compression Period of 20, Multiplier of 1.8x)
Trend Filter - WMA (50 length, no offset, close as the source)
TP/SL - 3.0% TP / 2.0% SL, 0.005 trailed TP, no trailed SL
SuperTrend Long Strategy +TrendFilterThis strategy aims to identify long (buy) opportunities in the market using the SuperTrend indicator. It utilizes the Average True Range (ATR) and a multiplier to determine the dynamic support levels for entering long positions. This presentation will provide an overview of the strategy's components, explain its usage, and highlight that it focuses on long trades.
Components of the Strategy:
1. ATR Period: This input determines the period used for calculating the Average True Range (ATR). A higher value may result in smoother trend lines but may lag behind recent price changes.
2. Source (src): This input determines the price source used for calculations, with "hl2" (the average of high and low prices) set as the default.
3. ATR Multiplier: This input specifies the multiplier applied to the ATR value to determine the distance of the support levels from the source.
4. Change ATR Calculation Method: This input allows toggling between two methods of ATR calculation: the default method using atr() or a simple moving average (SMA) of ATR values (sma(tr, Periods)).
5. Show Buy/Sell Signals: This input enables or disables the display of buy and sell signals on the chart.
6. Highlighter On/Off: This input controls whether highlighting of up and down trends is displayed on the chart.
7. Bar Coloring On/Off: This input determines whether the bars on the chart are colored based on the trend direction.
8. The "SuperTrend Long STRATEGY" has been enhanced by incorporating a trend filter. A moving average is used as the filter to confirm the prevailing trend before executing trades. This addition effectively reduces false signals and improves the strategy's reliability, all while maintaining its original name.
Strategy Logic:
1. The strategy calculates the upper (up) and lower (dn) trend lines based on the ATR value and the chosen multiplier.
2. The trend variable keeps track of the current trend, with 1 indicating an uptrend and -1 indicating a downtrend.
3. Buy and sell signals are generated based on the change in trend direction.
4. The strategy includes an optional highlighting feature that colors the chart background based on the current trend.
5. Additionally, the bar coloring feature colors the bars based on the direction of the last trend change.
Usage:
1. ATR Period and ATR Multiplier can be adjusted based on the desired sensitivity and risk tolerance.
2. Buy and sell signals can be displayed using the Show Buy/Sell Signals input, providing clear indications of entry and exit points.
3. The Highlighter On/Off input allows users to visually identify the prevailing trend by coloring the chart background.
4. The Bar Coloring On/Off input offers a quick visual reference for the most recent trend change.
Long Strategy:
The SuperTrend Long Strategy is specifically designed to identify long (buy) opportunities. It generates buy signals when the current trend changes from a downtrend to an uptrend, indicating a potential entry point for long positions. The strategy aims to capture upward price movements and maximize profits during bullish market conditions.
The SuperTrend Long Strategy provides traders with a systematic approach to identifying long trade opportunities. By leveraging the SuperTrend indicator and dynamic support levels, this strategy aims to generate buy signals in uptrending markets. Traders can customize the inputs and utilize the visual features to adapt the strategy to their specific trading preferences.
The modification adds a trend filter to the "SuperTrend Long STRATEGY" to improve its effectiveness. The trend filter uses a moving average to confirm the prevailing trend before taking trades. This addition helps filter out false signals and enhances the strategy's reliability without changing its name.
Bollinger Bands - Breakout StrategyThe Bollinger Bands - Breakout Strategy is a trend-following optimized for short-term trading in the crypto market. This strategy employs the Bollinger Bands, a widely recognized technical indicator, as its primary instrument for pinpointing potential trades. It is capable of executing both long and short positions, depending on whether the market is in a spot or futures, and is particularly effective in trending markets.
The strategy boasts a high degree of configurability, allowing users to set the Bollinger Bands period and deviation, trend filter, volatility filter, trade direction filter, rate of change filter, and date filter. Furthermore, it offers options for Take Profit, Stop Loss, and Trailing Stop for both long and short positions, ensuring a comprehensive risk management approach. The inclusion of a maximum intraday loss feature adds another layer of protection, making this strategy a valuable tool for traders seeking a professional and adaptable trading system.
Name : Bollinger Bands - Breakout Strategy
Category : Trend Follower based on Bollinger Bands
Operating mode : Long and Short on Futures or Long on Spot
Trade duration : Intraday
Timeframe : 2H, 3H, 4H, 5H
Market : Crypto
Suggested usage : Trending Markets
Entry : When the price crosses above or below the Bollinger Bands
Exit : Opposite Cross or Profit target, Trailing stop or Stop loss
Configuration :
- Bollinger Bands period and deviation
- Trend Filter
- Volatility Filter
- Trade direction filter
- Rate of Change filter
- Date Filter (for backtesting purposes)
- Take Profit, Stop Loss and Trailing Stop for long and short positions
- Risk Management: Max Intraday Loss
Backtesting :
⁃ Exchange: BINANCE
⁃ Pair: BTCUSDT.P
⁃ Timeframe: 4H
⁃ Fee: 0.025%
⁃ Slippage: 1
- Initial Capital: 10000 USDT
- Position sizing: 10% of Equity
- Start : 2019-09-19 (Out Of Sample from 2022-12-23)
- Bar magnifier: on
Credits :
- LucF of Pine Coders for f_security function to avoid repainting using security.
- QuantNomad for Monthly Table.
Disclaimer : Risk Management is crucial, so adjust stop loss to your comfort level. A tight stop loss can help minimise potential losses. Use at your own risk.
How you or we can improve? Source code is open so share your ideas!
Leave a comment and smash the boost button!
Thanks for your attention, happy to support the TradingView community.
Broadview Economic StudioThank you for taking the time to read this description. We'll be taking a look at the Broadview Economic Studio. This has been a work-in-progress for years and is a very powerful tool for planning trades with complex volume scaling strategies. We will be talking about many indicators and types of indicators used in the public domain, but it is NOT recommended to reverse engineer our scripts as there is quite a bit of logic in the code that works to make each common approach entirely unique. So although you may understand quite a bit about oscillators, the way they work with the rest of the logic within the script may change the way you know them to work from elsewhere.
In the chart snapshot above you'll see a mild configuration where I only had to tweak a few settings. Commissions are set to 0.1%, starting capital is set to $10,000, and slippage is off. In my tests orders came through less than a penny off. Generally speaking, there are really only two situations in which you should be concerned about slippage. The first is if you trade really low timeframe charts like the 1 second. This tool, while it works for any timeframe, is programmed on the 45 minute timeframe and works best there. The other situation in which you should be prepared for slippage is if you're using extremely high volume trades in the hundreds of thousands or millions depending on the market cap and liquidity of the asset you're studying. Large orders like that have to be split up among several deals and that can cause slippage.
There are 31 primary inputs for users to tweak. Each input is grouped within a module called a Suite. Each suite has a focus like filtering signals or strategically allocating volume according to your strategy. Everything starts with the Origin Suite. The Origin Suite is a group of inputs that generates Tops & Bottoms from price action. It uses math like Rate of Change, where one can specify a required rate of change before an Origin signal can be made, and users can specify how much lower in price a bar must be compared to previous bars. So with the Origin Suite, users can control how often they want to see originating signals and under what conditions they can appear.
We used to use WVF and CVI to produce top and bottom signals, but our Origin Suite works much better for systematically generating profitable configurations.
The triangles you see on the chart represent markers, potential signals, or Prop Signals as they're referred to within the script. The blue arrows represent trades where Prop Signals were allowed to pass as true long signals. There are two ways to ignore Prop Signals. You can filter the markers entirely, or you can reduce their volume scaling to the minimum which is usually $10 for most exchanges. We're first going to be talking about some of the primary DCA inputs before we talk about the technology we use to filter and overload signals.
Here are some important features found within the script:
Base Orders
Safety Orders
Take Profits
Change-Based Volume Scaling
Ignoring Low or Medium Changes
Overloading
Filtering
Alert Messages w/ Volume Scaling
Let's walk through each of these features in more depth.
The Base Order is the initial Long position within a series. It comes in first and is followed by all of its Safety Orders. The Base Order is set to $25 within the script by default. Keeping the base order low allows one to reserve more of their capital for Safety Orders that are lower within a dip, and thus, lower the user's Position Average. The primary feature of this script is to help users plan their volume scaling strategically, and this is where we start. It's this kind of due diligence and effort in protecting trades that makes this script unique.
So we start with a low Base Order. Then, we follow with a lot of Safety Orders. Typically in DCA this is done in consistent time intervals and in consistent amounts. So in regular DCA one may invest the same amount bi-weekly on pay day. They use the financial instrument as a sort of savings and average their position over their consistent investments. This is not where the bleeding edge of DCA is today though. In modern Doller Cost Averaging, I would expect to see signals and volume scaling based on logic.. as opposed to being consistent intervals.
This sets up the explanation of the primary means of volume scaling within the script. Mathematically, we start with the net balance. This is your specified starting balance plus any wins or losses. Users specify what % of their Available Balance they would like to start with when volume scaling. This percent of capital is then multiplied by a Safety Order Multiplier. The safety order multiplier is made up of a number specified by the user, multiplied by the number of the Safety Order you're on. So user's can control this equation/algorithm and scale their investments as the number of Safety Orders increases and drops in price become more opportune.
The Take Profit within the script lets users specify their desired ROI from a series. So if a user sets a 60% take profit, the script will set a price from the position average that when reached will give the user a 60% ROI for the series including its Base Order and all its Safety Orders.
Before moving on, let's talk about the amazing internal reporting found in the script. When you zoom in on the blue arrows, you can see each trade is accompanied by some extremely helpful information. This is just another feature that makes this script unique, it is the feature that gives us accurate reporting and ultimately allows us to connect with TradingView's Strategy Tester in a way that provides instant backtests with good merit. With this reporting not only can users get reports and information on trades made on different assets with different configurations, but user's can perform a deep dive on each configuration and know exactly what was going on for each trade. The first number is the number of the safety order the script is on. Remember, this is used in the primary volume scaling math. The second number is the amount the script spent on the current trade. The third number denotes the cumulative spending for the series. The final number displays the script's available balance at that time. With these numbers, the TradingView Strategy Tester, and the List of Trades feature, users can practice as much due diligence as they need during their studies.
Let's move on to talking about my favorite suite within the script, the Volume Scaling Suite. Here there are two primary means of controlling volume scaling. Although, in the near future there will be more.
In this suite you'll find Change-Based Volume Scaling and Position Average Volume Scaling. Position Average Volume Scaling is quite easy to explain. This feature only allows signals to pass if they are lower in price than your base order. In this way, users can apply most of their capital to trades that lower their position average. Simply having the money in the market can boost profits, but having a lower Position Average is the entire reason we DCA. Change-Based Volume Scaling is quite a bit more complex.
In theory, one could argue that every moment is a great moment to buy. It's just that some moments are more opportune than others. So it's not about perfect signals as much as it's about proper volume scaling.
Change-Based Volume Scaling allows us to set rules that dictate how much volume scaling is used based on the asset's current delta, or Rate of Change.
Using CBVS, one can downscale capital applied to signals with a low ROC, or simply ignore them. So if a signal comes in and the price hasn't changed very much then you can automatically use less volume for the trade. One can do the same thing for medium changes, and the user can specify what quantifies as a low or medium change. Users can give extra volume to signals with a greater rate of change, or overload signals with a high rate of change! So the CBVS feature gives users the ability to allocate volume based on logic rooted in the asset's rate of change. If a signal has dropped a lot in price, then generally, it is deserving of more capital and that's what makes this feature unique and so powerful.
There are two kinds of Overloading found in the script. There's overloading from CBVS, and then overloading from the 4 signal filtering suites. There's an important difference to note before we move on. Overloading performed by CBVS is based on ignored signals. So if you ignore low or medium change signals, and you have CBVS Overloading on, the script will allocate more capital to High Change signals. When signals are ignored, they are downscaled to $10. Whereas with the filtering suites, if a signal is filtered the Prop Signal triangle marker is removed entirely. The overloading in that scenario is simply applied to signals that aren't filtered. The reason it's done this way is because allowing ignored signals to still come in, with the lowest volume scaling possible, keeps the Safety Order count rising which works in the volume scaling math. This math is intrinsic to getting capital deep within dips and crashes.
So in future versions we may allow ignored signals to be filtered out entirely but for the time being, simply scaling them down to the lowest possible amount is what produces the best and most consistent configurations.
Let's talk about filtering signals, and the overloading provided within each filtering suite.
Here you can see our Overbought & Oversold Heatmap V3. This is a unique indicator that takes 15 common oscillators and visualizes them in a way that clearly denotes confluence. Looking at this indicator makes it easer to read cycles and trends. It is quite common for investors to base their entire scripts on one or more of the oscillators found within the OBOS Heatmap V3. So the OBOS Heatmap V3 is an awesome way to ensure your signals follow an oversold trend! The orange represents an oscillator being oversold, while the yellow represents it being overbought. Generally, when an asset is oversold it is a better time to buy. One can filter signals based on this information and use the Heatmap's unique ability to quantify confluences. In this script users can set a sensitivity and that sets the number of oscillators that must be in agreement before a signal is allowed to pass.
Here are the oscillators found within the OBOS Heatmap:
*Please keep in mind that although some of these oscillators may have big names, the code and math in the script may work differently than you're used to. This is because the code and math is changed quite a bit, and the overall intended functionality of the OBOS Heatmap has a larger scope than any one indicator. It's also important to note that the lengths for these oscillators are set low and are meant to classify the individual signal as either overbought or oversold, and not the entire period. So while the OBOS Heatmap is awesome for trends and cycles, it's ultimately meant to classify individual price bars as either overbought or oversold according to a consensus.*
Relative Strength Index
Money Flow Index
Commodity Channel Index
Aroon Oscillator
Relative Volatility Index
Fast Stochastic Detrended Price Oscillator
Fast Stochastic Elders Force Index
Fast Stochastic Relative Strength Index
Fast Stochastic Relative Vigor Index
Fast Stochastic Klinger Oscillator
Fast Stochastic Awesome Oscillator
Fast Stochastic Ultimate Oscillator
Fast Stochastic Chande Momentum Oscillator
Fast Stochastic On Balance Volume Oscillator
Fast Stochastic Moving Average Convergence/Divergence
Each band of the Overbought & Oversold Heatmap represents an oscillator. When it's orange it's said to be oversold. When it's yellow it's said to be overbought. The indicator turns purple during trends and reversals where it is neither overbought nor oversold. It can differentiate between uptrends and downtrends with differing colors of purple, but the OBOS Heatmap is not used for trends or cycles in this script. It is used to quantify oversold confluence.
Let's talk about the Dominance Suite.
First note in the top portion of the screenshot above, you will see various colors in the script. It replaces the price line with something we call Price Flow bars. So when you add the script it's best to make the stock price line invisible in TV settings. The Price Flow Bars use a preset EMA to color price action as being in either a downward momentum or upward momentum. The triangular signals represent dark teal for the initial long marker within a series, dark green for long orders and long signals that convert into safety orders, and light green for safety orders. This is more logic that makes this script really unique. The dark green initial long marker signals are rarely seen. You can find them at the beginning of a new series of signals and they work to establish when a new series of signals should begin. The dark green signals actually denote a long base order opportunity, but if a series has already started then these signals are converted into Safety Orders. The Safety Orders then come in light green, and red for Prop Shorts. Prop Shorts work with Initial Longs to establish the start of a new series. More on that math I cannot tell.
In the bottom half of the screenshot is the Dominance Suite itself. It's another one of the four filtering suites found in the script. It is made up of 7 oscillators that work to classify a price bar as being controlled by either the bears or the bulls. If a price bar is controlled by the bears it is said to be a better investment. The Dominance Suite works by applying a moving average to the balance of power. This is the way TradingView has intended the balance of power to be used, and works quite nicely in classifying individual price bars as either bearish or bullish. It's not an overall trend indicator as much as it states whether a bar is mostly controlled by the bears or the bulls.
Here are the oscillators found within the Dominance Suite:
SMA of BOP
EMA of BOP
HMA of BOP
WMA of BOP
VWMA of BOP
TEMA of BOP
LSMA of BOP
Within the script, there is an input for a negative threshold. When each of these 7 oscillators is in confluence and below this set threshold, the Prop Long will be allowed to pass as a real trade.
Keep in mind that each filtering suite also has the option to overload signals.
So not only can you filter signals based on these suites but you can also apply additional volume scaling to signals that don't get filtered.
Here we have the True Oscillator. The True Oscillator is a brand new oscillator. It's similar to things like the RSI or DPO, but technically speaking it considers many more factors into its average than other oscillators. It considers balance of power, sentiment, volume, momentum, gravity, and places special-strategic weighting on price data based on whether it's opening, closing, high, or low. If you stack the True Oscillator up with the RSI you'll notice right away they look similar, but each movement is quite different. Overall the movements are more balanced, the individual bars are more consistent with price data, and the swings are more clearly pronounced while simultaneously having a better register of strength in momentum. We use this indicator to filter and overload signals, to trade according to momentum, and to provide a 16th independent oscillator that can check the OBOS Heatmap without having to be confluent.
The final filtering suite is based on Net Volume. It classifies signals as oversold when there is a significant negative trend in net volume. If Net Volume is under 0, and trends downward for either 3, 4, or 5 bars in a row then it will mark a signal as oversold and allow it to pass. Then, if overloading for this suite is turned on it will allocate more volume to signals it does not filter out.
There is a lot that can be said about this strategy. The primary takeaway though is that it's not just one strategy. It's a tool for everyone, to help them plan their approach to different assets in different market climates. This tool can help you study current market conditions. It can allow you to plan a strategic approach to market segments, and see how your strategy would fare if new market data performed similarly. It's not just one strategy, but more of a strategy printer.
The Origin Suite allows users to plan the positioning of their signals. The Overbought & Oversold Suite allows users to filter their signals based on whether or not they are oversold. The Dominance Suite allows users to filter signals based on whether the market is being controlled by the bears or the bulls. The True Oscillator gives users the ability to filter signals based on a deep and powerful momentum oscillator. The Net Volume Suite lets users filter signals based on volume trends. When signals are filtered, signals that pass, can be overloaded with additional volume scaling. Features like Change-Based Volume Scaling and Position Average Volume Scaling give users plenty of inputs to create complex volume scaling strategies. Common-sense DCA inputs allow users to scale into markets the way pros do.
The Broadview Economic Studio is a powerful tool for planning trades with complex volume scaling strategies.
Users can plan their approach to different kinds of markets. They can link the script with their bot or broker like 3Commas, and the script will automatically send the correct volume scaling through to the bot.
Thank you for your time, and for reading the description of the Broadview Economic Studio.
Strategy Myth-Busting #5 - POKI+GTREND+ADX - [MYN]This is part of a new series we are calling "Strategy Myth-Busting" where we take open public manual trading strategies and automate them. The goal is to not only validate the authenticity of the claims but to provide an automated version for traders who wish to trade autonomously.
Our fifth one we are automating is one of the strategies from "The Best 3 Buy And Sell Indicators on Tradingview + Confirmation Indicators ( The Golden Ones ))" from "Online Trading Signals (Scalping Channel)". No formal backtesting was done by them and resuructo messaged me asking if we could validate their claims.
Originally, we mimic verbatim the settings Online Trading Signals was using however weren't getting promising results. So before we stopped there we thought we might want to see if this could be improved on. So we adjusted the Renko Assignment modifier from ATR to Traditional and adjusted the value to be higher from 30 to 47. We also decided to try adding another signal confirmation to eliminate some of the ranged market conditions so we choose our favorite, ADX . Also, given we are using this on a higher time-frame we adjusted the G-Channel Trend detection source from close to OHLC4 to get better average price action indication and more accurate trend direction.
This strategy uses a combination of 2 open-source public indicators:
poki buy and sell Take profit and stop loss by RafaelZioni
G-Channel Trend Detection by jaggedsoft
Trading Rules
15m - 4h timeframe. We saw best results at the recommended 1 hour timeframe.
Long Entry:
When POKI triggers a buy signal
When G-Channel Trend Detection is in an upward trend (Green)
ADX Is above 25
Short Entry:
When POKI triggers a sell signal
When G-Channel Trend Detection is in an downward trend (red)
ADX Is above 25
If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
Flying Dragon Trend StrategyFlying Dragon Trend Strategy can be used to indicate the trend on all timeframes by finetuning the input settings.
The Flying Dragon Trend family includes both the strategy and the indicator, where the strategy supports of selecting the optimal set of inputs for the indicator in each scenario. Highly recommended to get familiar with the strategy first to get the best out of the indicator.
Flying Dragon Trend plots the trend bands into the ribbon, where the colours indicate the trend of each band. The plotting of the bands can be turned off in the input settings. Based on the user selectable Risk Level the strategy is executed when the price crosses the certain moving average line, or at the Lowest risk level all the bands have the same colour.
The main idea is to combine two different moving averages to cross each other at the possible trend pivot point, but trying to avoid any short term bounces to affect the trend indication. The ingenuity resides in the combination of selected moving average types, lengths and especially the offsets. The trend bands give visual hint for the user while observing the price interaction with the bands, one could say that when "the Dragon swallows the candles the jaws wide open", then there is high possibility for the pivot. The leading moving average should be fast while the lagging moving average should be, well, lagging behind the leading one. There is Offset selections for each moving average, three for leading one and one for the lagging one, those are where the magic happens. After user has selected preferred moving average types and lengths, by tuning each offset the optimal sweet spot for each timeframe and equity will be found. The default values are good enough starting points for longer (4h and up) timeframes, but shorter timeframes (minutes to hours) require different combination of settings, some hints are provided in tooltips. Basically the slower the "leading" moving average (like HMA75 or HMA115) and quicker the "lagging" moving average (like SMA12 or SMA5) become, the better performance at the Lowest risk level on minute scales. This "reversed" approach at the minute scales is shown also as reversed colour for the "lagging" moving average trend band, which seems to make it work surprisingly well.
The Flying Dragon Trend does not necessarily work well on zig zag and range bounce scenarios without additional finetuning of the input settings to fit the current condition.
Strategy direction selector by DashTrader.
Trend Movement S1-TMIdea:
This script combines: Moving Average (MA), Directional Movement (DMI), MACD
When condition of long or short position from all mentioned indicator are met script opens position. Once trend changes, it closes the position.
Then add some filter conditions to avoid noise.
Concept:
(Note that we take the close to get the closing price)
-Using only cross up down with MA will give a reversal point, but the downside is that it can be noisy.
-MACD will show the current trend detected by cross point.
-Then the +DI , -DI , ADX values are taken into account to confirm the price direction and movement strength.
-This strategy solves this problem by combining 2 more moving averages called 2 trend lines 1 long and 1 short. When the short line crosses up, it will show that the price trend is increasing (at this time the background between these 2 lines will be green) and vice versa (red). To determine if the current trend is bullish or bearish . This will avoid buying when price tend to go down.
-However, there will be many points where some more complex logic is needed. It will add conditions and calculate the probabilities before triggering the signals (You can see them through the item symbols B1, B2, ... ).
How it works:
1. The thin line is stand for short term moving average, and the thick line is stand for long term moving average.
If thin lines cross the thick lines, their color and background will turn green, the price is tend to go up (Uptrend).
If thin lines cross down thick lines, their color and background will turn red, the price is tend to go down (Downtrend).
2. Ability to check the checkbox in setting to show the Golden/De*ath cross.
The yellow symbol "+" is the Golden cross.
The black symbol "+" is the De*th cross.
3. Buy and Sell are show clearly on strategy as the buy and sell point. The default source from bar is CLOSE
4. Setting "Buy only" it using for spot market.
5. When "Not buy in down trend" is checked, it will not trigger buy when in down trend (thin lines cross down thick lines like description in 1.)
6. Setting High spread will call Close buy when it match the High spread bar with the High spread % value
7. It provides setting "Back test From date/To date" for backtest feature. You can set "BacktestFrom date" as the begin of test period. If check box "Using To Date" is check: "Backtest To Date" will be the end of test period.
Suitable time frames:
4h, 1D, 1W
* Please note that this logic does not attempt to predict future prices or 100% accurate signal; Strategy Tester are available to test the profitability of this strategy.
(INVITE ONLY indicator. Please direct message or visit website to try it out)
Hope you guys enjoy!
Examples:
BTCUSD 4H
TSLA 4H
Open DriveOpen Drive is a market profile concept introduced by Jim Dalton. It occurs when the price moves directionally and persistently for the first 30 minutes from the cash market open.
It is necessary to use 30-minute bars as there needs to be enough time to measure an extreme move of the cash open. This means there will be fewer trades than other strategies using faster time periodicities.
The script finds open drives from these time points 0700/ 0800 and 1300/1430.
The entry signal also has a breakout threshold using the 5-bar high and 5-bar low to only take trades moving away from the prior 5-bar range. This weeds out most mid-range trades and small range expansion bars.
If the price has had a strong move from the open and has broken either below the prior 5-bar low or above the prior 5-bar high by an amount equal to the prior 5-bar range a trade is entered in the direction of the move.
The Exit criteria; exit after 3 bars which is 90mins when using a 30min periodicity.
Note, this script is shared to show that momentum generated on or around the cash open tends to persist. The entry and exits of this strategy are quite naive but there are plenty of ways to take more aggressive entries on faster time frames when an open drive occurs. The times chosen for this strategy will suit stock index futures mainly. The user can experiment with other futures products and their corresponding pit/ cash open hours.
Google "open drive market profile" for more information on open drives and market profile concepts.
Happy trading!
M0PB (Momentum Pullback)Long/short strategy that identifies extreme readings on the rsi as a *momentum signal*, unlike most RSI strategies the script will look to buy or sell the first pullback in the direction of the extreme RSI reading.
Enters positions on the first pullback to the 5ema(low)/ 5ema(high) and exits at rolling 12 bar high/ low. The rolling high/ low feature means that if the price enters into a prolonged consolidation the profit target will begin to reduce with each new bar. The best trades tend to work within 2-6 bars.
Built for use on 5 min intervals on FX, Indexes, and Crypto. Lower than 5 minute time frames tend to be noisier and mean more commissions and a higher risk of slippage so the suggested timeframe is 5 mins.
Hard stop is X ATR (users can experiment with this) from the position entry price. This can be adjusted in user inputs.
There is a lot of slack left in entries and exits but the overall strategy is fairly robust across timeframes and markets and has between 60%-70% win rate with larger winners.
Signals that occur from economic news volatility are best avoided.
Wunder Trend Reversal botWunder Trend Reversal bot
1. Wunder Trend Reversal Bot - this has only one goal to find a reversal of the trend.
2. The strategy determines, based on the specified value for the filter, a market reversal based on the price actions of the previous bars.
3. A short EMA is used to filter false signals after the reversal signal was received. Crossing the EMA and changing its direction confirms the trend change.
4. There are 2 ways to calculate stop loss and take profit. You can choose one of them:
- Classic stop loss and take profit in a fixed percentage
- ATR stop loss and take pro
5. ATR uses risk reward (R:R) to calculate take profit. The script calculates the risk-reward based on a certain stop loss level and uses it to calculate the take profit
6. A function for calculating risk on the portfolio (your deposit) has been added to the script. When this option is enabled, you get a calculation of the entry amount in dollars relative to your Stop Loss. In the settings, you can select the risk percentage on your portfolio. The loss will be calculated from the amount that will be displayed on the chart.
For example. Deposit - $1000, you set the risk to 1%. SL 5%. Entry volume will be $200. The loss at SL will be $10.10$ this is your 1% risk or 1% of the deposit.
Important! The risk per trade must be less than the Stop Loss value. If the risk is greater than SL, then you should use leverage.
The amount of funds entering the trade is calculated in dollars. This option was created if you want to send the dollar amount from Tradingview to the exchange. However, putting your volume in dollars you get the incorrect net profit and drawdown indication in the backtest results, as TradingView calculates the backtest volume in contracts.
To display the correct net profit and drawdown values in Tradingview Backtest results, use the ”Volume in contracts” option.
Extended Recursive Bands StrategyThe original indicator was created by alexgrover .
All credit goes to alexgrover for creating the indicator that this strategy uses.
This strategy was posted because there were multiple requests for it, and no strategy based on this indicator exists yet.
The Recursive Bands Indicator, an indicator specially created to be extremely efficient, I think you already know that calculation time is extra important in algorithmic trading, and this is the principal motivation for the creation of the proposed indicator. Originally described in Alex's paper "Pierrefeu, Alex (2019): Recursive Bands - A New Indicator For Technical Analysis", the indicator framework has been widely used in his previous uploaded indicators, however it would have been a shame to not upload it, however user experience being a major concern for me, I decided to add extra options, which explain the term "extended".
The Indicator
The indicator displays one upper and one lower band, every common usages applied to bands indicators such as support/resistance , breakout, trailing stop, etc, can also be applied to this one. Length controls how reactive the bands are, higher values will make the bands cross the price less often.
In order to provide more flexibility for the user alexgrover added the option to use various methods for the calculation of the indicator, therefore the indicator can use the average true range , standard deviation, average high-low range, and one totally exclusive method specially designed for this indicator.
Added logic:
We have implemented a logic that checks whether the bands have been following in the same direction for a set amount of bars. This logic must be true before it can enter trades. This is completely new code that was written by us entirely, and it makes a huge difference on strategy performance.
Strategy Long conditions:
1 — Price low is below the the lower band.
2 — The lower band keeps increasing in value until the 'lookback' setting amount of bars is reached.
Strategy Short conditions:
1 — Price high is above the upper band.
2 — The upper band keeps decreasing in value until the 'lookback' setting amount of bars is reached.
Strategy Properties:
We have set a default commission of 0.06% because these are Bybit's fees. The strategy uses an order size of 10% of equity, since drawdown is very low like this. We also use a 10 tick slippage to keep results realistic and account for this. All other settings were left as default apart from initial capital, just to decrease the size of the numbers.
ATR Trend Run - Signals Alerts SL and TP by Tech Store OnThe script uses several ATR formulas for entering/exiting trades, support/resistance lines to take TP1 (take profit 1) and another ATR formula for TP2 (take profit 2). Everything is fully configurable to your preference, and you can back-test it via TradingView. You can also configure the indicator for signals during US trading sessions (with or without power hour), as well as taking profits/stop-loss session time(s), as well as to close a position at the end of the trading session no matter what. Also, you can turn all of that off, so there are no trading session/end of day limits and each trade will run until it either hits SL, TP1, TP1 > back to entry, TP2. Note: indicator is set to skip consecutive/opposite signals, while you currently have a trade open > if you hit a trend – ride it to the end!
For example: If you will be day trading SPY and you wish to close your positions no matter what right before the market closes (3:45PM ET > 15min before closes): Make sure to checkbox “Intraday – Close Position Before Market Closes” in the strategy/indicator Settings, so that you are alerted soon before the market closes, if you wish to continue holding the position – leave this checkbox unchecked.
SL: SL is set to be slightly above/below the signal candle, which is best suited for this strategy.
Strategy Take Profit Approach
While the initial position open and SL hit is always based on a closed candle bar (can’t do otherwise, as otherwise you will have 10s of fake signal alerts), there are 2 ways on trading this strategy in terms of TP1 and TP1 taken > back to Entry, which is based off Alert type.
You can switch this as you like within the indicator settings, “Checked: TP1 taken > back to Entry per Price Touch | Unchecked: per Candle Close”.
Candle Close vs Price Touch: with the Default method - Candle Close for an alert for TP1 or if price comes back to Entry after TP1 is taken will only be triggered once candle bar fully closes crossing the area, while Price Touch will alert when price touches the area before candle bar closes.
For example: your trade is running well, you grab TP1 and the price reverses and hits your trade Entry area. With Price Touch – you are immediately alerted to close your trade with no loss and with TP1 profit. With Candle Close - you will receive an alert only once candle bar fully closes on top of the Entry crossing it backwards, meaning it may lower your TP1 profit or even completely reverse the trade into loss in case it will be a huge candle bar for any reason. However, it may touch the Entry area, looking like the price is reversing, but then continue per initial trade direction, sometimes becoming a trend. So, while Price Touch seem like a more conservative approach, Candle Close can give you much bigger profits if you catch a trend, but you can always change it via the Settings.
Note: TradingView back-testing engine does not have a feature to open/close orders IMMEDIATELY via Price Touch trigger, but only when the candle closes after price touches the scripted area/line/etc., so you for the most accurate results, test your strategy out via Candle Close setting. Otherwise, decide yourself. I personally like more Candle Close since I can test it out via back-testing with the most accurate results.
TP2 is set per Candle Close as often the ATR trailing stop line will be hit and bounced off, so it’s best to wait until candle actually breaks it/closes through it.
Note: If you will be observing the strategy LIVE, during LIVE candle bar movement – it will look weird, like it’s placing an order after order during any trigger – this seem like a TradingView bug, but is only observational, once the candle bar is closed and you refresh TradingView it will all look correct.
Back-Testing
If you wish to do some back-testing, just modify the strategy/indicator Settings:
-----1) STRATEGY: This is for back-testing/experimenting with the script inputs.
----------a. You can setup a start date (date, month, year) from which it will start opening back-test trades, select a position size and select TP1 size, the idea here is to close half (or whatever you choose) portion of the trade once you hit your TP1, then to either close at small profit or to catch a trend and close the second portion of the position long way ahead from Entry, otherwise it will alert you to close the position at TP2, if price comes back to Entry, at reversal signal or at the end of US trading session if the option for it is checked. If you wish to close the whole position at TP1, just enter the same amount for TP1 to match backtest position size. Otherwise you can experiment with TP1 sizing – try it out!
-----2) Feel free to experiment with ATR settings and with S&R Left/Right bars, you may be amazed how results will differ and find some really cool combinations!
-----3) Make sure you select/de-select “Intraday – Close Position Before Market Closes” setting depending on what you are back-testing and on which conditions
-----4) Note: If you wish to do some deep back-testing (1+ years), use the “Deep Backtesting” feature within Strategy Tester on the TradingView as otherwise it may show wrong results or even fail to compute the results
Add the alerts
-----Right-click anywhere on the TradingView chart
-----Click on Add alert
-----Condition: ATR Trend Run - Signals Alerts SL and TP, by Tech Store On
----------o Right underneath the condition click on the drop-down menu and select “alert() function calls only”
-----Expiration time: Whatever you wish
-----Alert actions: Whatever notifications you wish
-----Alert name: DO NOT TOUCH THIS
-----Hit “Create”
-----Note: If you change ANY Settings within the indicator – you must DELETE the current alert and create a new one per steps above, otherwise it will continue triggering alerts per old Settings!
- Note: If you add the alert while the script is currently “In Position” it will not know that. So either wait when there will be no position open at all or close your position partially if the bot opens it twice bigger or so in case per script the bot will think it is already in position.
Note: Because of the slippage and the order processing time between TradingView, AutoView and the Broker (it’s usually about a second or so), it is suggested to not use a timeframe lower than 1min. The script is working really well with 1M/3M/5M/H1/H4 timeframes per my back-testing, but feel free to explore via Strategy Back-testing what’s best for the instrument you wish to trade.
If you wish to try this out for a week or so – please reach out and I will give you access.