MT Enhanced Trend Reversal StrategyThis strategy, called **"Enhanced Trend Reversal Strategy with Take Profit,"** is designed to identify trend reversal points based on several indicators: **Exponential Moving Averages (EMA), MACD**, and **RSI**. The strategy also includes **take-profit levels** to provide traders with suggested profit-taking points.
Key Components of the Strategy
1. **Exponential Moving Averages (EMA)**:
- The strategy uses **20 and 50-period EMAs** to determine trend direction. The shorter period (EMA 20) reacts more quickly to price changes, while the longer period (EMA 50) smooths out fluctuations.
- An **uptrend** (bullish market) is indicated when the EMA 20 is above the EMA 50. In this case, the main trend line is colored green.
- A **downtrend** (bearish market) is indicated when the EMA 20 is below the EMA 50, in which case the trend line is colored red.
- This visual indication simplifies analysis and allows traders to quickly assess the market condition.
2. **MACD (Moving Average Convergence Divergence)**:
- MACD is an oscillator that shows the difference between two EMAs (with periods 6 and 13) and a **signal line** with a period of 5.
- A **buy signal** is generated when the MACD line crosses above the signal line, indicating a potential bullish trend.
- A **sell signal** is generated when the MACD line crosses below the signal line, indicating a possible bearish trend.
- Shorter MACD periods make the strategy more sensitive to price changes, allowing for more frequent trading signals.
3. **RSI (Relative Strength Index)**:
- RSI measures the speed and magnitude of directional price movements to determine if an asset is overbought or oversold.
- The strategy uses a standard RSI period of 14, but with relaxed levels for more signals.
- **For buy entries**, RSI should be above 40, signaling the start of a bullish impulse without indicating overbought conditions.
- **For sell entries**, RSI should be below 60, signaling potential bearish movement without being oversold.
Entry Conditions
- **Buy Signal**:
- The MACD line crosses above the signal line.
- EMA 20 is above EMA 50 (uptrend).
- RSI is above 40, indicating a potential rise without overbought conditions.
- When these conditions are met, the strategy enters a **long position**.
- **Sell Signal**:
- The MACD line crosses below the signal line.
- EMA 20 is below EMA 50 (downtrend).
- RSI is below 60, indicating a possible decline without being oversold.
- When these conditions are met, the strategy enters a **short position**.
Take-Profit Levels
- **Take Profit** is calculated at 1.5% of the entry price:
- **For long positions**, take profit is set at a level 1.5% above the entry price.
- **For short positions**, take profit is set at a level 1.5% below the entry price.
- This take-profit level is displayed as a blue line on the chart, giving traders a clear idea of the target profit point for each trade.
Visualization and Colors
- The main trend line (EMA 20) changes to green in an uptrend and red in a downtrend. This provides a clear visual indicator of the current trend direction.
- Take-profit levels are displayed as blue lines, helping traders follow targets and lock in profits at recommended levels.
Usage Recommendations
- **Timeframe**: The strategy is optimized for a 30-minute timeframe. At this interval, signals are frequent enough without being overly sensitive to noise.
- **Applicability**: The strategy works well for assets with moderate to high volatility, such as stocks, cryptocurrencies, and currency pairs.
- **Risk Management**: In addition to take profit, a stop loss at around 1-2% is recommended to minimize losses in case of sudden trend reversals.
Conclusion
This strategy is designed for more frequent signals by using faster indicators and relaxed RSI conditions. It is suitable for traders seeking quick trade opportunities and clearly defined take-profit levels.
Forecasting
ICT Master Suite [Trading IQ]Hello Traders!
We’re excited to introduce the ICT Master Suite by TradingIQ, a new tool designed to bring together several ICT concepts and strategies in one place.
The Purpose Behind the ICT Master Suite
There are a few challenges traders often face when using ICT-related indicators:
Many available indicators focus on one or two ICT methods, which can limit traders who apply a broader range of ICT related techniques on their charts.
There aren't many indicators for ICT strategy models, and we couldn't find ICT indicators that allow for testing the strategy models and setting alerts.
Many ICT related concepts exist in the public domain as indicators, not strategies! This makes it difficult to verify that the ICT concept has some utility in the market you're trading and if it's worth trading - it's difficult to know if it's working!
Some users might not have enough chart space to apply numerous ICT related indicators, which can be restrictive for those wanting to use multiple ICT techniques simultaneously.
The ICT Master Suite is designed to offer a comprehensive option for traders who want to apply a variety of ICT methods. By combining several ICT techniques and strategy models into one indicator, it helps users maximize their chart space while accessing multiple tools in a single slot.
Additionally, the ICT Master Suite was developed as a strategy . This means users can backtest various ICT strategy models - including deep backtesting. A primary goal of this indicator is to let traders decide for themselves what markets to trade ICT concepts in and give them the capability to figure out if the strategy models are worth trading!
What Makes the ICT Master Suite Different
There are many ICT-related indicators available on TradingView, each offering valuable insights. What the ICT Master Suite aims to do is bring together a wider selection of these techniques into one tool. This includes both key ICT methods and strategy models, allowing traders to test and activate strategies all within one indicator.
Features
The ICT Master Suite offers:
Multiple ICT strategy models, including the 2022 Strategy Model and Unicorn Model, which can be built, tested, and used for live trading.
Calculation and display of key price areas like Breaker Blocks, Rejection Blocks, Order Blocks, Fair Value Gaps, Equal Levels, and more.
The ability to set alerts based on these ICT strategies and key price areas.
A comprehensive, yet practical, all-inclusive ICT indicator for traders.
Customizable Timeframe - Calculate ICT concepts on off-chart timeframes
Unicorn Strategy Model
2022 Strategy Model
Liquidity Raid Strategy Model
OTE (Optimal Trade Entry) Strategy Model
Silver Bullet Strategy Model
Order blocks
Breaker blocks
Rejection blocks
FVG
Strong highs and lows
Displacements
Liquidity sweeps
Power of 3
ICT Macros
HTF previous bar high and low
Break of Structure indications
Market Structure Shift indications
Equal highs and lows
Swings highs and swing lows
Fibonacci TPs and SLs
Swing level TPs and SLs
Previous day high and low TPs and SLs
And much more! An ongoing project!
How To Use
Many traders will already be familiar with the ICT related concepts listed above, and will find using the ICT Master Suite quite intuitive!
Despite this, let's go over the features of the tool in-depth and how to use the tool!
The image above shows the ICT Master Suite with almost all techniques activated.
ICT 2022 Strategy Model
The ICT Master suite provides the ability to test, set alerts for, and live trade the ICT 2022 Strategy Model.
The image above shows an example of a long position being entered following a complete setup for the 2022 ICT model.
A liquidity sweep occurs prior to an upside breakout. During the upside breakout the model looks for the FVG that is nearest 50% of the setup range. A limit order is placed at this FVG for entry.
The target entry percentage for the range is customizable in the settings. For instance, you can select to enter at an FVG nearest 33% of the range, 20%, 66%, etc.
The profit target for the model generally uses the highest high of the range (100%) for longs and the lowest low of the range (100%) for shorts. Stop losses are generally set at 0% of the range.
The image above shows the short model in action!
Whether you decide to follow the 2022 model diligently or not, you can still set alerts when the entry condition is met.
ICT Unicorn Model
The image above shows an example of a long position being entered following a complete setup for the ICT Unicorn model.
A lower swing low followed by a higher swing high precedes the overlap of an FVG and breaker block formed during the sequence.
During the upside breakout the model looks for an FVG and breaker block that formed during the sequence and overlap each other. A limit order is placed at the nearest overlap point to current price.
The profit target for this example trade is set at the swing high and the stop loss at the swing low. However, both the profit target and stop loss for this model are configurable in the settings.
For Longs, the selectable profit targets are:
Swing High
Fib -0.5
Fib -1
Fib -2
For Longs, the selectable stop losses are:
Swing Low
Bottom of FVG or breaker block
The image above shows the short version of the Unicorn Model in action!
For Shorts, the selectable profit targets are:
Swing Low
Fib -0.5
Fib -1
Fib -2
For Shorts, the selectable stop losses are:
Swing High
Top of FVG or breaker block
The image above shows the profit target and stop loss options in the settings for the Unicorn Model.
Optimal Trade Entry (OTE) Model
The image above shows an example of a long position being entered following a complete setup for the OTE model.
Price retraces either 0.62, 0.705, or 0.79 of an upside move and a trade is entered.
The profit target for this example trade is set at the -0.5 fib level. This is also adjustable in the settings.
For Longs, the selectable profit targets are:
Swing High
Fib -0.5
Fib -1
Fib -2
The image above shows the short version of the OTE Model in action!
For Shorts, the selectable profit targets are:
Swing Low
Fib -0.5
Fib -1
Fib -2
Liquidity Raid Model
The image above shows an example of a long position being entered following a complete setup for the Liquidity Raid Modell.
The user must define the session in the settings (for this example it is 13:30-16:00 NY time).
During the session, the indicator will calculate the session high and session low. Following a “raid” of either the session high or session low (after the session has completed) the script will look for an entry at a recently formed breaker block.
If the session high is raided the script will look for short entries at a bearish breaker block. If the session low is raided the script will look for long entries at a bullish breaker block.
For Longs, the profit target options are:
Swing high
User inputted Lib level
For Longs, the stop loss options are:
Swing low
User inputted Lib level
Breaker block bottom
The image above shows the short version of the Liquidity Raid Model in action!
For Shorts, the profit target options are:
Swing Low
User inputted Lib level
For Shorts, the stop loss options are:
Swing High
User inputted Lib level
Breaker block top
Silver Bullet Model
The image above shows an example of a long position being entered following a complete setup for the Silver Bullet Modell.
During the session, the indicator will determine the higher timeframe bias. If the higher timeframe bias is bullish the strategy will look to enter long at an FVG that forms during the session. If the higher timeframe bias is bearish the indicator will look to enter short at an FVG that forms during the session.
For Longs, the profit target options are:
Nearest Swing High Above Entry
Previous Day High
For Longs, the stop loss options are:
Nearest Swing Low
Previous Day Low
The image above shows the short version of the Silver Bullet Model in action!
For Shorts, the profit target options are:
Nearest Swing Low Below Entry
Previous Day Low
For Shorts, the stop loss options are:
Nearest Swing High
Previous Day High
Order blocks
The image above shows indicator identifying and labeling order blocks.
The color of the order blocks, and how many should be shown, are configurable in the settings!
Breaker Blocks
The image above shows indicator identifying and labeling order blocks.
The color of the breaker blocks, and how many should be shown, are configurable in the settings!
Rejection Blocks
The image above shows indicator identifying and labeling rejection blocks.
The color of the rejection blocks, and how many should be shown, are configurable in the settings!
Fair Value Gaps
The image above shows indicator identifying and labeling fair value gaps.
The color of the fair value gaps, and how many should be shown, are configurable in the settings!
Additionally, you can select to only show fair values gaps that form after a liquidity sweep. Doing so reduces "noisy" FVGs and focuses on identifying FVGs that form after a significant trading event.
The image above shows the feature enabled. A fair value gap that occurred after a liquidity sweep is shown.
Market Structure
The image above shows the ICT Master Suite calculating market structure shots and break of structures!
The color of MSS and BoS, and whether they should be displayed, are configurable in the settings.
Displacements
The images above show indicator identifying and labeling displacements.
The color of the displacements, and how many should be shown, are configurable in the settings!
Equal Price Points
The image above shows the indicator identifying and labeling equal highs and equal lows.
The color of the equal levels, and how many should be shown, are configurable in the settings!
Previous Custom TF High/Low
The image above shows the ICT Master Suite calculating the high and low price for a user-defined timeframe. In this case the previous day’s high and low are calculated.
To illustrate the customizable timeframe function, the image above shows the indicator calculating the previous 4 hour high and low.
Liquidity Sweeps
The image above shows the indicator identifying a liquidity sweep prior to an upside breakout.
The image above shows the indicator identifying a liquidity sweep prior to a downside breakout.
The color and aggressiveness of liquidity sweep identification are adjustable in the settings!
Power Of Three
The image above shows the indicator calculating Po3 for two user-defined higher timeframes!
Macros
The image above shows the ICT Master Suite identifying the ICT macros!
ICT Macros are only displayable on the 5 minute timeframe or less.
Strategy Performance Table
In addition to a full-fledged TradingView backtest for any of the ICT strategy models the indicator offers, a quick-and-easy strategy table exists for the indicator!
The image above shows the strategy performance table in action.
Keep in mind that, because the ICT Master Suite is a strategy script, you can perform fully automatic backtests, deep backtests, easily add commission and portfolio balance and look at pertinent metrics for the ICT strategies you are testing!
Lite Mode
Traders who want the cleanest chart possible can toggle on “Lite Mode”!
In Lite Mode, any neon or “glow” like effects are removed and key levels are marked as strict border boxes. You can also select to remove box borders if that’s what you prefer!
Settings Used For Backtest
For the displayed backtest, a starting balance of $1000 USD was used. A commission of 0.02%, slippage of 2 ticks, a verify price for limit orders of 2 ticks, and 5% of capital investment per order.
A commission of 0.02% was used due to the backtested asset being a perpetual future contract for a crypto currency. The highest commission (lowest-tier VIP) for maker orders on many exchanges is 0.02%. All entered positions take place as maker orders and so do profit target exits. Stop orders exist as stop-market orders.
A slippage of 2 ticks was used to simulate more realistic stop-market orders. A verify limit order settings of 2 ticks was also used. Even though BTCUSDT.P on Binance is liquid, we just want the backtest to be on the safe side. Additionally, the backtest traded 100+ trades over the period. The higher the sample size the better; however, this example test can serve as a starting point for traders interested in ICT concepts.
Community Assistance And Feedback
Given the complexity and idiosyncratic applications of ICT concepts amongst its proponents, the ICT Master Suite’s built-in strategies and level identification methods might not align with everyone's interpretation.
That said, the best we can do is precisely define ICT strategy rules and concepts to a repeatable process, test, and apply them! Whether or not an ICT strategy is trading precisely how you would trade it, seeing the model in action, taking trades, and with performance statistics is immensely helpful in assessing predictive utility.
If you think we missed something, you notice a bug, have an idea for strategy model improvement, please let us know! The ICT Master Suite is an ongoing project that will, ideally, be shaped by the community.
A big thank you to the @PineCoders for their Time Library!
Thank you!
Indicator Test with Conditions TableOverview: The "Indicator Test with Conditions Table" is a customizable trading strategy developed using Pine Script™ for the TradingView platform. It allows users to define complex entry conditions for both long and short positions based on various technical indicators and price levels.
Key Features:
Customizable Input Conditions:
Users can configure up to three input conditions for both long and short entries, each with its own logical operator (AND/OR) for combining conditions.
Input conditions can be based on:
Price Sources: Users can select any price data (e.g., close, open, high, low) for each condition.
Comparison Operators: Users can choose from a variety of operators, including:
Greater than (>)
Greater than or equal to (>=)
Less than (<)
Less than or equal to (<=)
Equal to (=)
Not equal to (!=)
Crossover (crossover)
Crossunder (crossunder)
Logical Operators:
The strategy provides options for combining conditions using logical operators (AND/OR) for greater flexibility in defining entry criteria.
Dynamic Condition Evaluation:
The strategy evaluates the defined conditions dynamically, checking whether they are enabled before proceeding with the comparison.
Users can toggle conditions on and off using boolean inputs, allowing for quick adjustments without modifying the code.
Visual Feedback:
A table is displayed on the chart, providing real-time status updates on the conditions and whether they are enabled. This enhances user experience by allowing easy monitoring of the strategy's logic.
Order Execution:
The strategy enters long or short positions based on the combined conditions' evaluations, automatically executing trades when the criteria are met.
How to Use:
Set Up Input Conditions:
Navigate to the strategy’s input settings to configure your desired price sources, operators, and logical combinations for long and short conditions.
Monitor Conditions:
Observe the condition table displayed at the bottom right of the chart to see which conditions are enabled and their current evaluations.
Adjust Strategy Parameters:
Modify the conditions, logical operators, and input sources as needed to optimize the strategy for different market scenarios or trading styles.
Execution:
Once the conditions are met, the strategy will automatically enter trades based on the defined logic.
Conclusion: The "Indicator Test with Conditions Table" strategy is a robust tool for traders looking to implement customized trading logic based on various market conditions. Its flexibility and real-time monitoring capabilities make it suitable for both novice and experienced traders.
Reflected ema Difference (RED) This script, titled "Reflected EMA Difference (RED)," is based on the logic of evaluating the percentage of convergence and divergence between two moving averages, specifically the Hull Moving Averages (HMA), to make price-related decisions. The Hull Moving Average, created by Alan Hull, is used as the foundation of this strategy, offering a faster and more accurate way to analyze market trends. In this script, the concept is employed to measure and reflect price variations.
Script Functionality Overview:
Hull Moving Averages (HMA): The script utilizes two HMAs, one short-term and one long-term. The main idea is to compute the Delta Difference between these two moving averages, which represents how much they are converging or diverging from each other. This difference is key to identifying potential market trend changes.
Reflected HMA Value: Using the Delta Difference between the HMAs, the value of the short-term HMA is reflected, creating a visual reference point that helps traders see the relationship between price and HMAs on the chart.
Percentage Change Index: The second key parameter is the percentage change index. This determines when a trend is reversing, allowing buy or sell orders to be established based on significant changes in the relationship between the HMAs and the price.
Delta Multiplier: The script comes with a default Delta multiplier of 2 for calculating the difference between HMAs, allowing traders to adjust the sensitivity of the analysis based on the time frame being analyzed.
Trend Reversal Signals: When the price crosses the thresholds defined by the percentage change index, buy or sell signals are triggered, based on the detection of a potential trend reversal.
Visual Cues with Boxes: Boxes are drawn on the chart when the HullMA crosses the reflected HMA value, providing a visual aid to identify critical moments where risk should be evaluated.
Alerts for Receiving Signals:
This script allows you to set up buy and sell alerts via TradingView's alert system. These alerts are triggered when trend changes are detected based on the conditions coded in the script. Traders can receive instant notifications, allowing them to make decisions without needing to constantly monitor the chart.
Additional Considerations:
The percentage change parameter is adjustable and should be configured based on the time frame you are trading on. For longer time frames, it's advisable to use a larger percentage change to avoid false signals.
The use of Hull Moving Averages (HMA) provides a faster and more reactive approach to trend evaluation compared to other moving averages, making it a powerful tool for traders seeking quick reversal signals.
This approach combines the power of Hull Moving Averages with an alert system to improve the trader’s response to trend changes.
Spanish
Este script, titulado "Reflected EMA Difference (RED)", está fundamentado en la lógica de evaluar el porcentaje de acercamiento y distancia entre dos medias móviles, específicamente las medias móviles de Hull (HMA), para tomar decisiones sobre el valor del precio. El creador de la media móvil de Hull, Alan Hull, diseñó este indicador para ofrecer una forma más rápida y precisa de analizar tendencias de mercado, y en este script se utiliza su concepto como base para medir y reflejar las variaciones de precio.
Descripción del funcionamiento:
Medias Móviles de Hull (HMA): Se utilizan dos HMAs, una de corto plazo y otra de largo plazo. La idea principal es calcular la diferencia Delta entre estas dos medias móviles, que representa cuánto se están alejando o acercando entre sí. Esta diferencia es clave para identificar cambios potenciales en la tendencia del mercado.
Valor Reflejado de la HMA: Con la diferencia Delta calculada entre las HMAs, se refleja el valor de la HMA corta, creando un punto de referencia visual que ayuda a los traders a observar la relación entre el precio y las HMAs en el gráfico.
Índice de Cambio de Porcentaje: El segundo parámetro clave del script es el índice de cambio porcentual. Este define el momento en que una tendencia está revirtiendo, permitiendo establecer órdenes de compra o venta en función de un cambio significativo en la relación entre las HMAs y el precio.
Multiplicador Delta: El script tiene un multiplicador predeterminado de 2 para el cálculo de la diferencia Delta, lo que permite ajustar la sensibilidad del análisis según la temporalidad del gráfico.
Señales de Reversión de Tendencia: Cuando el precio cruza los límites definidos por el índice de cambio porcentual, se emiten señales para comprar o vender, basadas en la detección de una posible reversión de tendencia.
Visualización con Cajas: Se dibujan cajas en el gráfico cuando el indicador HullMA cruza el valor reflejado de la HMA, ayudando a identificar visualmente los momentos críticos en los que se debe evaluar el riesgo de las operaciones.
Alertas para Recibir Señales:
Este script permite configurar alertas de compra y venta desde el apartado de alertas de TradingView. Estas alertas se activan cuando se detectan cambios de tendencia en función de las condiciones establecidas en el código. El trader puede recibir notificaciones instantáneas, lo que facilita la toma de decisiones sin necesidad de estar constantemente observando el gráfico.
Consideraciones adicionales:
El porcentaje de cambio es un parámetro ajustable y debe configurarse según la temporalidad que se esté operando. En temporalidades más largas, es recomendable usar un porcentaje de cambio mayor para evitar señales falsas.
La utilización de las medias móviles de Hull (HMA) proporciona un enfoque más rápido y reactivo para evaluar tendencias en comparación con otras medias móviles, lo que lo convierte en una herramienta poderosa para traders que buscan señales rápidas de reversión.
Este enfoque combina la potencia de las medias móviles de Hull con un sistema de alertas que mejora la reactividad a cambios de tendencia.
VRS (Vegas Reversal Strategy)It is based on the reversal of the price after an accentuated volatility of the previous day. It is tested only on BTC, TF Day, and has an activation value equal to a spike of minimum 2.4% amplitude, a value that I have left in the settings free to be modified if it is found valid for other assets.
In the settings you can change how many of the latest longs or shorts I want to view in the past, colors and various aesthetics.
When the system detects a spike at the end of the day from 2.4% onwards it will signal the direction of Reversal, generating the 3 TP, dotted lines.
Entry into the market must be done at the close of the candle day, unfortunately at night time if you want to enter on the tick.
Stop above/below the spike that generated the condition.
If the Day2 candle closes FULL inside the spike, immediate and early closing of the operation.
There cannot be two consecutive Day events: if you are Long or Short and have taken a stop on the next candle, even if the latter generates another entry, this must not be activated.
TP 1 and 2 are both mandatory at 33% of the position, TP3, based on the current movement, can be considered to be left to run to the bitter end or in any case to structuring confirmations of a slowdown in the price.
Upon reaching TP1 it is mandatory to move the STOP to even.
In the event of the presence of extremely strong directional movements, for example Long direction, an opposite activation, Short, must be done but with reduced capital, on the contrary an activation in the same direction as the trend movement can be done with a surcharge. Always pay attention to Money Management and Risk Management.
Always manage Risk and Money Management in an adequate, technical and sustainable manner in relation to your capital. A fair exposure per transaction is between 1% and 2% of the capital.
Proxy Financial Stress Index StrategyThis strategy is based on a Proxy Financial Stress Index constructed using several key financial indicators. The strategy goes long when the financial stress index crosses below a user-defined threshold, signaling a potential reduction in market stress. Once a position is opened, it is held for a predetermined number of bars (periods), after which it is automatically closed.
The financial stress index is composed of several normalized indicators, each representing different market aspects:
VIX - Market volatility.
US 10-Year Treasury Yield - Bond market.
Dollar Index (DXY) - Currency market.
S&P 500 Index - Stock market.
EUR/USD - Currency exchange rate.
High-Yield Corporate Bond ETF (HYG) - Corporate bond market.
Each component is normalized using a Z-score (based on the user-defined moving average and standard deviation lengths) and weighted according to user inputs. The aggregated index reflects overall market stress.
The strategy enters a long position when the stress index crosses below a specified threshold from above, indicating reduced financial stress. The position is held for a defined holding period before being closed automatically.
Scientific References:
The concept of a financial stress index is derived from research that combines multiple financial variables to measure systemic risks in the financial markets. Key research includes:
The Financial Stress Index developed by various Federal Reserve banks, including the Cleveland Financial Stress Index (CFSI)
Bank of America Merrill Lynch Option Volatility Estimate (MOVE) Index as a measure of interest rate volatility, which correlates with financial stress
These indices are widely used in economic research to gauge financial instability and help in policy decisions. They track real-time fluctuations in various markets and are often used to anticipate economic downturns or periods of high financial risk.
Fibonacci Trend Reversal StrategyIntroduction
This publication introduces the " Fibonacci Retracement Trend Reversal Strategy, " tailored for traders aiming to leverage shifts in market momentum through advanced trend analysis and risk management techniques. This strategy is designed to pinpoint potential reversal points, optimizing trading opportunities.
Overview
The strategy leverages Fibonacci retracement levels derived from @IMBA_TRADER's lance Algo to identify potential trend reversals. It's further enhanced by a method called " Trend Strength Over Time " (TSOT) (by @federalTacos5392b), which utilizes percentile rankings of price action to measure trend strength. This also has implemented Dynamic SL finder by utilizing @veryfid's ATR Stoploss Finder which works pretty well
Indicators:
Fibonacci Retracement Levels : Identifies critical reversal zones at 23.6%, 50%, and 78.6% levels.
TSOT (Trend Strength Over Time) : Employs percentile rankings across various timeframes to gauge the strength and direction of trends, aiding in the confirmation of Fibonacci-based signals.
ATR (Average True Range) : Implements dynamic stop-loss settings for both long and short positions, enhancing trade security.
Strategy Settings :
- Sensitivity: Set default at 18, adjustable for more frequent or sparse signals based on market volatility.
- ATR Stop Loss Finder: Multiplier set at 3.5, applying the ATR value to determine stop losses dynamically.
- ATR Length: Default set to 14 with RMA smoothing.
- TSOT Settings: Hard-coded to identify percentile ranks, with no user-adjustable inputs due to its intrinsic calculation method.
Trade Direction Options : Configurable to support long, short, or both directions, adaptable to the trader's market assessment.
Entry Conditions :
- Long Entry: Triggered when the price surpasses the mid Fibonacci level (50%) with a bullish TSOT signal.
- Short Entry: Activated when the price falls below the mid Fibonacci level with a bearish TSOT indication.
Exit Conditions :
- Employs ATR-based dynamic stop losses, calibrated according to current market volatility, ensuring effective risk management.
Strategy Execution :
- Risk Management: Features adjustable risk-reward settings and enables partial take profits by default to systematically secure gains.
- Position Reversal: Includes an option to reverse positions based on new TSOT signals, improving the strategy's responsiveness to evolving market conditions.
The strategy is optimized for the BYBIT:WIFUSDT.P market on a scalping (5-minute) timeframe, using the default settings outlined above.
I spent a lot of time creating the dynamic exit strategies for partially taking profits and reversing positions so please make use of those and feel free to adjust the settings, tool tips are also provided.
For Developers: this is published as open-sourced code so that developers can learn something especially on dynamic exits and partial take profits!
Good Luck!
Disclaimer
This strategy is shared for educational purposes and must be thoroughly tested under diverse market conditions. Past performance does not guarantee future results. Traders are advised to integrate this strategy with other analytical tools and tailor it to specific market scenarios. I was only sharing what I've crafted while strategizing over a Solana Meme Coin.
CVD Divergence Strategy.1.mmThis is the matching Strategy version of Indicator of the same name.
As a member of the K1m6a Lions discussion community we often use versions of the Cumulative Volume Delta indicator
as one of our primary tools along with RSI, RSI Divergences, Open interest, Volume Profile, TPO and Fibonacci levels.
We also discuss visual interpretations of CVD Divergences across multiple time frames much like RSI divergences.
RSI Divergences can be identified as possible Bullish reversal areas when the RSI is making higher low points while
the price is making lower low points.
RSI Divergences can be identified as possible Bearish reversal areas when the RSI is making lower high points while
the price is making higher high points.
CVD Divergences can also be identified the same way on any timeframe as possible reversal signals. As with RSI, these Divergences
often occur as a trend's momentum is giving way to lower volume and areas when profits are being taken signaling a possible reversal
of the current trending price movement.
Hidden Divergences are identified as calculations that may be signaling a continuation of the current trend.
Having not found any public domain versions of a CVD Divergence indicator I have combined some public code to create this
indicator and matching strategy. The calculations for the Cumulative Volume Delta keep a running total for the differences between
the positive changes in volume in relation to the negative changes in volume. A relative upward spike in CVD is created when
there is a large increase in buying vs a low amount of selling. A relative downward spike in CVD is created when
there is a large increase in selling vs a low amount of buying.
In the settings menu, the is a drop down to be used to view the results in alternate timeframes while the chart remains on current timeframe. The Lookback settings can be adjusted so that the divs show on a more local, spontaneous level if set at 1,1,60,1. For a deeper, wider view of the divs, they can be set higher like 7,7,60,7. Adjust them all to suit your view of the divs.
To create this indicator/strategy I used a portion of the code from "Cumulative Volume Delta" by @ contrerae which calculates
the CVD from aggregate volume of many top exchanges and plots the continuous changes on a non-overlay indicator.
For the identification and plotting of the Divergences, I used similar code from the Tradingview Technical "RSI Divergence Indicator"
This indicator should not be used as a stand-alone but as an additional tool to help identify Bullish and Bearish Divergences and
also Bullish and Bearish Hidden Divergences which, as opposed to regular divergences, may indicate a continuation.
Multi-TF AI SuperTrend with ADX - Strategy [PresentTrading]
## █ Introduction and How it is Different
The trading strategy in question is an enhanced version of the SuperTrend indicator, combined with AI elements and an ADX filter. It's a multi-timeframe strategy that incorporates two SuperTrends from different timeframes and utilizes a k-nearest neighbors (KNN) algorithm for trend prediction. It's different from traditional SuperTrend indicators because of its AI-based predictive capabilities and the addition of the ADX filter for trend strength.
BTC 8hr Performance
ETH 8hr Performance
## █ Strategy, How it Works: Detailed Explanation (Revised)
### Multi-Timeframe Approach
The strategy leverages the power of multiple timeframes by incorporating two SuperTrend indicators, each calculated on a different timeframe. This multi-timeframe approach provides a holistic view of the market's trend. For example, a 8-hour timeframe might capture the medium-term trend, while a daily timeframe could capture the longer-term trend. When both SuperTrends align, the strategy confirms a more robust trend.
### K-Nearest Neighbors (KNN)
The KNN algorithm is used to classify the direction of the trend based on historical SuperTrend values. It uses weighted voting of the 'k' nearest data points. For each point, it looks at its 'k' closest neighbors and takes a weighted average of their labels to predict the current label. The KNN algorithm is applied separately to each timeframe's SuperTrend data.
### SuperTrend Indicators
Two SuperTrend indicators are used, each from a different timeframe. They are calculated using different moving averages and ATR lengths as per user settings. The SuperTrend values are then smoothed to make them suitable for KNN-based prediction.
### ADX and DMI Filters
The ADX filter is used to eliminate weak trends. Only when the ADX is above 20 and the directional movement index (DMI) confirms the trend direction, does the strategy signal a buy or sell.
### Combining Elements
A trade signal is generated only when both SuperTrends and the ADX filter confirm the trend direction. This multi-timeframe, multi-indicator approach reduces false positives and increases the robustness of the strategy.
By considering multiple timeframes and using machine learning for trend classification, the strategy aims to provide more accurate and reliable trade signals.
BTC 8hr Performance (Zoom-in)
## █ Trade Direction
The strategy allows users to specify the trade direction as 'Long', 'Short', or 'Both'. This is useful for traders who have a specific market bias. For instance, in a bullish market, one might choose to only take 'Long' trades.
## █ Usage
Parameters: Adjust the number of neighbors, data points, and moving averages according to the asset and market conditions.
Trade Direction: Choose your preferred trading direction based on your market outlook.
ADX Filter: Optionally, enable the ADX filter to avoid trading in a sideways market.
Risk Management: Use the trailing stop-loss feature to manage risks.
## █ Default Settings
Neighbors (K): 3
Data points for KNN: 12
SuperTrend Length: 10 and 5 for the two different SuperTrends
ATR Multiplier: 3.0 for both
ADX Length: 21
ADX Time Frame: 240
Default trading direction: Both
By customizing these settings, traders can tailor the strategy to fit various trading styles and assets.
Machine Learning: SuperTrend Strategy TP/SL [YinYangAlgorithms]The SuperTrend is a very useful Indicator to display when trends have shifted based on the Average True Range (ATR). Its underlying ideology is to calculate the ATR using a fixed length and then multiply it by a factor to calculate the SuperTrend +/-. When the close crosses the SuperTrend it changes direction.
This Strategy features the Traditional SuperTrend Calculations with Machine Learning (ML) and Take Profit / Stop Loss applied to it. Using ML on the SuperTrend allows for the ability to sort data from previous SuperTrend calculations. We can filter the data so only previous SuperTrends that follow the same direction and are within the distance bounds of our k-Nearest Neighbour (KNN) will be added and then averaged. This average can either be achieved using a Mean or with an Exponential calculation which puts added weight on the initial source. Take Profits and Stop Losses are then added to the ML SuperTrend so it may capitalize on Momentum changes meanwhile remaining in the Trend during consolidation.
By applying Machine Learning logic and adding a Take Profit and Stop Loss to the Traditional SuperTrend, we may enhance its underlying calculations with potential to withhold the trend better. The main purpose of this Strategy is to minimize losses and false trend changes while maximizing gains. This may be achieved by quick reversals of trends where strategic small losses are taken before a large trend occurs with hopes of potentially occurring large gain. Due to this logic, the Win/Loss ratio of this Strategy may be quite poor as it may take many small marginal losses where there is consolidation. However, it may also take large gains and capitalize on strong momentum movements.
Tutorial:
In this example above, we can get an idea of what the default settings may achieve when there is momentum. It focuses on attempting to hit the Trailing Take Profit which moves in accord with the SuperTrend just with a multiplier added. When momentum occurs it helps push the SuperTrend within it, which on its own may act as a smaller Trailing Take Profit of its own accord.
We’ve highlighted some key points from the last example to better emphasize how it works. As you can see, the White Circle is where profit was taken from the ML SuperTrend simply from it attempting to switch to a Bullish (Buy) Trend. However, that was rejected almost immediately and we went back to our Bearish (Sell) Trend that ended up resulting in our Take Profit being hit (Yellow Circle). This Strategy aims to not only capitalize on the small profits from SuperTrend to SuperTrend but to also capitalize when the Momentum is so strong that the price moves X% away from the SuperTrend and is able to hit the Take Profit location. This Take Profit addition to this Strategy is crucial as momentum may change state shortly after such drastic price movements; and if we were to simply wait for it to come back to the SuperTrend, we may lose out on lots of potential profit.
If you refer to the Yellow Circle in this example, you’ll notice what was talked about in the Summary/Overview above. During periods of consolidation when there is little momentum and price movement and we don’t have any Stop Loss activated, you may see ‘Signal Flashing’. Signal Flashing is when there are Buy and Sell signals that keep switching back and forth. During this time you may be taking small losses. This is a normal part of this Strategy. When a signal has finally been confirmed by Momentum, is when this Strategy shines and may produce the profit you desire.
You may be wondering, what causes these jagged like patterns in the SuperTrend? It's due to the ML logic, and it may be a little confusing, but essentially what is happening is the Fast Moving SuperTrend and the Slow Moving SuperTrend are creating KNN Min and Max distances that are extreme due to (usually) parabolic movement. This causes fewer values to be added to and averaged within the ML and causes less smooth and more exponential drastic movements. This is completely normal, and one of the perks of using k-Nearest Neighbor for ML calculations. If you don’t know, the Min and Max Distance allowed is derived from the most recent(0 index of data array) to KNN Length. So only SuperTrend values that exhibit distances within these Min/Max will be allowed into the average.
Since the KNN ML logic can cause these exponential movements in the SuperTrend, they likewise affect its Take Profit. The Take Profit may benefit from this movement like displayed in the example above which helped it claim profit before then exhibiting upwards movement.
By default our Stop Loss Multiplier is kept quite low at 0.0000025. Keeping it low may help to reduce some Signal Flashing while not taking extra losses more so than not using it at all. However, if we increase it even more to say 0.005 like is shown in the example above. It can really help the trend keep momentum. Please note, although previous results don’t imply future results, at 0.0000025 Stop Loss we are currently exhibiting 69.27% profit while at 0.005 Stop Loss we are exhibiting 33.54% profit. This just goes to show that although there may be less Signal Flashing, it may not result in more profit.
We will conclude our Tutorial here. Hopefully this has given you some insight as to how Machine Learning, combined with Trailing Take Profit and Stop Loss may have positive effects on the SuperTrend when turned into a Strategy.
Settings:
SuperTrend:
ATR Length: ATR Length used to create the Original Supertrend.
Factor: Multiplier used to create the Original Supertrend.
Stop Loss Multiplier: 0 = Don't use Stop Loss. Stop loss can be useful for helping to prevent false signals but also may result in more loss when hit and less profit when switching trends.
Take Profit Multiplier: Take Profits can be useful within the Supertrend Strategy to stop the price reverting all the way to the Stop Loss once it's been profitable.
Machine Learning:
Only Factor Same Trend Direction: Very useful for ensuring that data used in KNN is not manipulated by different SuperTrend Directional data. Please note, it doesn't affect KNN Exponential.
Rationalized Source Type: Should we Rationalize only a specific source, All or None?
Machine Learning Type: Are we using a Simple ML Average, KNN Mean Average, KNN Exponential Average or None?
Machine Learning Smoothing Type: How should we smooth our Fast and Slow ML Datas to be used in our KNN Distance calculation? SMA, EMA or VWMA?
KNN Distance Type: We need to check if distance is within the KNN Min/Max distance, which distance checks are we using.
Machine Learning Length: How far back is our Machine Learning going to keep data for.
k-Nearest Neighbour (KNN) Length: How many k-Nearest Neighbours will we account for?
Fast ML Data Length: What is our Fast ML Length?? This is used with our Slow Length to create our KNN Distance.
Slow ML Data Length: What is our Slow ML Length?? This is used with our Fast Length to create our KNN Distance.
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
Double AI Super Trend Trading - Strategy [PresentTrading]█ Introduction and How It is Different
The Double AI Super Trend Trading Strategy is a cutting-edge approach that leverages the power of not one, but two AI algorithms, in tandem with the SuperTrend technical indicator. The strategy aims to provide traders with enhanced precision in market entry and exit points. It is designed to adapt to market conditions dynamically, offering the flexibility to trade in both bullish and bearish markets.
*The KNN part is mainly referred from @Zeiierman.
BTCUSD 8hr performance
ETHUSD 8hr performance
█ Strategy, How It Works: Detailed Explanation
1. SuperTrend Calculation
The SuperTrend is a popular indicator that captures market trends through a combination of the Volume-Weighted Moving Average (VWMA) and the Average True Range (ATR). This strategy utilizes two sets of SuperTrend calculations with varying lengths and factors to capture both short-term and long-term market trends.
2. KNN Algorithm
The strategy employs k-Nearest Neighbors (KNN) algorithms, which are supervised machine learning models. Two sets of KNN algorithms are used, each focused on different lengths of historical data and number of neighbors. The KNN algorithms classify the current SuperTrend data point as bullish or bearish based on the weighted sum of the labels of the k closest historical data points.
3. Signal Generation
Based on the KNN classifications and the SuperTrend indicator, the strategy generates signals for the start of a new trend and the continuation of an existing trend.
4. Trading Logic
The strategy uses these signals to enter long or short positions. It also incorporates dynamic trailing stops for exit conditions.
Local picture
█ Trade Direction
The strategy allows traders to specify their trading direction: long, short, or both. This enables the strategy to be versatile and adapt to various market conditions.
█ Usage
ToolTips: Comprehensive tooltips are provided for each parameter to guide the user through the customization process.
Inputs: Traders can customize numerous parameters including the number of neighbors in KNN, ATR multiplier, and types of moving averages.
Plotting: The strategy also provides visual cues on the chart to indicate bullish or bearish trends.
Order Execution: Based on the generated signals, the strategy will execute buy or sell orders automatically.
█ Default Settings
The default settings are configured to offer a balanced approach suitable for most scenarios:
Initial Capital: $10,000
Default Quantity Type: 10% of equity
Commission: 0.1%
Slippage: 1
Currency: USD
These settings can be modified to suit various trading styles and asset classes.
IU Break of any session StrategyHow this script works:
1. This script is an intraday trading strategy script which buy and sell on the bases of user-defined intraday session range breakout and gives alert(if the alert is set) message too when the new position is open.
2. It calculate the session as per the user inputs or user defined custom session.
3. The script stores the highest and lowest value of the whole session.
4. It take a long position on the first break and close above the highest value.
5. It take a short position on the break and close below the lowest value.
6. The script takes one position in one day.
7. The stop loss for this script is the previous low(if long) or high(if short).
8. Take profit is 1:2 and it's adjustable.
9. This script work on every kind of market.
How The Useful For The User :
1. User can backtest any session range breakout he wants to trade.
2. User can get alert when the new position is open.
3. User can change the Risk to Reward in order to find the best Risk to Reward.
4. User can see the highest and lowest value of the session with respect to analyzing his trading objective.
5. This strategy script highlights which session range breakout performs best and which performs worst.
AI SuperTrend - Strategy [presentTrading]
█ Introduction and How it is Different
The AI Supertrend Strategy is a unique hybrid approach that employs both traditional technical indicators and machine learning techniques. Unlike standard strategies that rely solely on traditional indicators or mathematical models, this strategy integrates the power of k-Nearest Neighbors (KNN), a machine learning algorithm, with the tried-and-true SuperTrend indicator. This blend aims to provide traders with more accurate, responsive, and context-aware trading signals.
*The KNN part is mainly referred from @Zeiierman.
BTCUSD 8hr performance
ETHUSD 8hr performance
█ Strategy, How it Works: Detailed Explanation
SuperTrend Calculation
Volume-Weighted Moving Average (VWMA): A VWMA of the close price is calculated based on the user-defined length (len). This serves as the central line around which the upper and lower bands are calculated.
Average True Range (ATR): ATR is calculated over a period defined by len. It measures the market's volatility.
Upper and Lower Bands: The upper band is calculated as VWMA + (factor * ATR) and the lower band as VWMA - (factor * ATR). The factor is a user-defined multiplier that decides how wide the bands should be.
KNN Algorithm
Data Collection: An array (data) is populated with recent n SuperTrend values. Corresponding labels (labels) are determined by whether the weighted moving average price (price) is greater than the weighted moving average of the SuperTrend (sT).
Distance Calculation: The absolute distance between each data point and the current SuperTrend value is calculated.
Sorting & Weighting: The distances are sorted in ascending order, and the closest k points are selected. Each point is weighted by the inverse of its distance to the current point.
Classification: A weighted sum of the labels of the k closest points is calculated. If the sum is closer to 1, the trend is predicted as bullish; if closer to 0, bearish.
Signal Generation
Start of Trend: A new bullish trend (Start_TrendUp) is considered to have started if the current trend color is bullish and the previous was not bullish. Similarly for bearish trends (Start_TrendDn).
Trend Continuation: A bullish trend (TrendUp) is considered to be continuing if the direction is negative and the KNN prediction is 1. Similarly for bearish trends (TrendDn).
Trading Logic
Long Condition: If Start_TrendUp or TrendUp is true, a long position is entered.
Short Condition: If Start_TrendDn or TrendDn is true, a short position is entered.
Exit Condition: Dynamic trailing stops are used for exits. If the trend does not continue as indicated by the KNN prediction and SuperTrend direction, an exit signal is generated.
The synergy between SuperTrend and KNN aims to filter out noise and produce more reliable trading signals. While SuperTrend provides a broad sense of the market direction, KNN refines this by predicting short-term price movements, leading to a more nuanced trading strategy.
Local picture
█ Trade Direction
The strategy allows traders to choose between taking only long positions, only short positions, or both. This is particularly useful for adapting to different market conditions.
█ Usage
ToolTips: Explains what each parameter does and how to adjust them.
Inputs: Customize values like the number of neighbors in KNN, ATR multiplier, and moving average type.
Plotting: Visual cues on the chart to indicate bullish or bearish trends.
Order Execution: Based on the generated signals, the strategy will execute buy/sell orders.
█ Default Settings
The default settings are selected to provide a balanced approach, but they can be modified for different trading styles and asset classes.
Initial Capital: $10,000
Default Quantity Type: 10% of equity
Commission: 0.1%
Slippage: 1
Currency: USD
By combining both machine learning and traditional technical analysis, this strategy offers a sophisticated and adaptive trading solution.
Hoffman Heiken BiasThis indicator uses a couple of different things including the Hoffman moving averages applied with heiken ashi bar data and some volatility to help determine when the bias of the market has shifted for the timeframe you are looking at.
Gaussian Detrended ReversionThis strategy, titled "Gaussian Detrended Reversion Strategy," aims to identify potential price reversals using the customized Gaussian Detrended Price Oscillator (GDPO) in combination with smoothed price cycles.
Key Elements of the Strategy:
GDPO Calculation: The strategy first calculates the Detrended Price Oscillator (DPO) by comparing the close price to an Exponential Moving Average (EMA) of a specified period. This calculation helps identify short-term price cycles by detrending the price data.
Gaussian Smoothing: The DPO values are then smoothed using the Arnaud Legoux Moving Average (ALMA), applying a Gaussian smoothing technique. This smoothed version of the DPO is intended to filter out noise and provide a clearer picture of price trends.
Entry and Exit Conditions: The strategy defines conditions for both long and short entry points as well as exit points. It looks for specific crossover events between the smoothed GDPO and its lagged version. The strategy enters a long position when the smoothed GDPO crosses above the lag and is negative, and exits the long position when the smoothed GDPO crosses below the lag or the zero line. Similarly, the strategy enters a short position when the smoothed GDPO crosses below the lag and is positive, and exits the short position when the smoothed GDPO crosses above the lag or the zero line.
Visualization: The smoothed GDPO and its lag are plotted on the chart using distinct colors. The zero line is also displayed as a reference point. Additionally, the chart background changes color when the strategy enters a long or short position. Cross markers are also plotted at the crossover points as exit cues.
Overall, this strategy aims to capture potential price reversals using the GDPO and Gaussian smoothing, with specific entry and exit conditions to guide trading decisions.
Nadaraya-Watson Envelope Strategy (Non-Repainting) Log ScaleIn the diverse world of trading strategies, the Nadaraya-Watson Envelope Strategy offers a different approach. Grounded in mathematical analysis, this strategy utilizes the Nadaraya-Watson kernel regression, a method traditionally employed for interpreting complex data patterns.
At the core of this strategy lies the concept of 'envelopes', which are essentially dynamic volatility bands formed around the price based on a custom Average True Range (ATR). These envelopes help provide guidance on potential market entry and exit points. The strategy suggests considering a buy when the price crosses the lower envelope and a sell when it crosses the upper envelope.
One distinctive characteristic of the Nadaraya-Watson Envelope Strategy is its use of a logarithmic scale, as opposed to a linear scale. The logarithmic scale can be advantageous when dealing with larger timeframes and assets with wide-ranging price movements.
The strategy is implemented using Pine Script v5, and includes several adjustable parameters such as the lookback window, relative weighting, and the regression start point, providing a level of flexibility.
However, it's important to maintain a balanced view. While the use of mathematical models like the Nadaraya-Watson kernel regression may provide insightful data analysis, no strategy can guarantee success. Thorough backtesting, understanding the mathematical principles involved, and sound risk management are always essential when applying any trading strategy.
The Nadaraya-Watson Envelope Strategy thus offers another tool for traders to consider. As with all strategies, its effectiveness will largely depend on the trader's understanding, application, and the specific market conditions.
Crunchster's Normalised Trend StrategyThis is a unique rules-based, systematic trading strategy - in the trend following category.
The strategy is designed for use on the daily timeframe. Specific features of this strategy are outlined below:
1. Uses a transformed price series (which I dub "real price") to generate signals rather than ticker price
2. Uses advanced position sizing and risk management, usually reserved for institutional portfolio management, a proven technique utilised by Commodity Trading Advisors and Managed Futures funds (Algo/Quant funds).
"Real Price" is a transformed price series derived from the sum of volatility adjusted (daily) returns, over the entire price series of an asset. The lookback period of the volatility adjustment is user defined.
A Hull moving average (HMA) is derived from the real price, and used as the main trend determinant. The lookback period of the HMA is user defined. Default lookback of 100 periods (days) ensures a responsive trend indicator, but without leading to over-trading from frequent crossovers (average holding period 14 days on BTC).
The core strategy is very simple, go long when real price crosses over HMA, go short when real price crosses under HMA. New position triggers automatically close open positions in the counter direction.
Position sizing is based on recent price volatility and the user defined annualised risk target. In essence positions are inverse volatility weighted, so larger size is opened during lower volatility and smaller size during increased volatility. Recent volatility is calculated as the standard deviation of returns with 14 period lookback, then extrapolated into an annualised volatility of expected returns. Annualised recent volatility is then referenced to the risk target set by the user to adjust the position size. The default settings are a very conservative 10% annual risk target. Initial capital should be set as the maximum risk capital per trade (ie if $10,000 total capital and 10% risk per trade, initial capital should be $1000). Maximum leverage per position can be set independently, to facilitate hitting risk targets that are greater than the natural volatility of the traded asset, and to accommodate low volatility conditions, whilst maintaining overall risk controls.
Hard stop losses are based on multiples of the average true range of recent price (14 period lookback), user configurable.
Please leave comments regarding further features or refinements. I plan to develop further adding alternative moving average selections and the ability to select/deselect long and short strategies.
3 hours ago
Release Notes:
Added option to compound profits versus using a fixed position capital. Be mindful that compounding will potentially increase profits, but also increase drawdowns and overall risk. Leverage will still cap overall exposure with compounding and therefore provides an additional layer of risk control.
2 hours ago
Release Notes:
Added function to toggle long/short strategy legs on and off.
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.
Lorentzian Classification Strategy Based in the model of Machine learning: Lorentzian Classification by @jdehorty, you will be able to get into trending moves and get interesting entries in the market with this strategy. I also put some new features for better backtesting results!
Backtesting context: 2022-07-19 to 2023-04-14 of US500 1H by PEPPERSTONE. Commissions: 0.03% for each entry, 0.03% for each exit. Risk per trade: 2.5% of the total account
For this strategy, 3 indicators are used:
Machine learning: Lorentzian Classification by @jdehorty
One Ema of 200 periods for identifying the trend
Supertrend indicator as a filter for some exits
Atr stop loss from Gatherio
Trade conditions:
For longs:
Close price is above 200 Ema
Lorentzian Classification indicates a buying signal
This gives us our long signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 1:1 and take profit of 3:1 where half position will be closed. This will be showed as buy.
The other half will be closed when the model indicates a selling signal or Supertrend indicator gives a bearish signal. This will be showed as cl buy.
For shorts:
Close price is under 200 Ema
Lorentzian Classification indicates a selling signal
This gives us our short signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 1:1 and take profit of 3:1 where half position will be closed. This will be showed as sell.
The other half will be closed when the model indicates a buying signal or Supertrend indicator gives a bullish signal. This will be showed as cl sell.
Risk management
To calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss or last swing for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a buy signal at price of 4,000 usd. The stop loss price from atr stop loss or last swing is 3,900. You calculate the distance in percent between 4,000 and 3,900. In this case, that distance would be of 2.50%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(2,5%) = 1000usd. It means, you have to use 1000 usd for risking 2.5% of your account.
We will use this risk management for applying compound interest.
> In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.
> You can also choose a fixed amount, so you will have to activate fixed amount in risk management for trades and set the fixed amount for backtesting.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, a table of some stats from backtesting, etc.
You will find the settings for risk management at the end of the script if you want to change something or trying new values for other assets for backtesting.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital
I also added a function for backtesting if you had added or withdrawn money frequently:
Adding money: You can choose how often you want to add money (Monthly, yearly, daily or weekly). Then a fixed amount of money and activate or deactivate this function
Withdraw money: You can choose if you want to withdraw a fixed amount or a percentage of earnings. Then you can choose a fixed amount of money, the period of time and activate or deactivate this function. Also, the percentage of earnings if you choosed this option.
Some other assets where strategy has worked
BTCUSD 4H, 1D
ETHUSD 4H, 1D
BNBUSD 4H
SPX 1D
BANKNIFTY 4H, 15 min
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!. If you have problems loading the script reduce max bars back number in general settings
Strategies for trending markets use to have more looses than wins and it takes a long time to get profits, so do not forget to be patient and consistent !
Please, visit the post from @jdehorty called Machine Learning: Lorentzian Classification for a better understanding of his script!
Any support and boosts will be well received. If you have any question, do not doubt to ask!
8 Day Run - Momentum StrategyInspired by Linda Bradford Raschke.
Entry criteria:
This strategy is used to capture momentum effects on the daily periodicities. Once prices have had a run of 8 or more consecutive closes above or below the 5-period simple moving average the strategy is primed to trade.
It will then enter a short on the first close above the 5sma after a run of 8 or more closes below the 5sma (it will enter a long when the price closes below the 5sma after a run of 8 or more closes above the 5sma).
Exit criteria:
All trades are exited on the first close back above/ below the 5sma.
ARCHENS SHARESThis script marks the high and low of 9.45 to 10.15 price. When the price breaks high, then gives Buy signal. When the price breaks low, then it gives Sell Signal. These buy and sell signals are given with labels "ARCHENS BUY" or "ARCHENS SELL". With my observation in stock market, I have made this strategy.
This strategy works in normal candle pattern but i observed that it works well in heikenashi candle. For this strategy to work well, we have to select 5 mins heikenashi candles.
If this strategy gives "ARCHENS buy", then buy it. Target should be as per individuals mind. But Stop loss should be hitted when there are two continue opposite {red} heikenashi candle.
If this strategy gives "ARCHENS sell", then sell it. Target should be as per individuals mind. But Stop loss should be hitted when there are two continue opposite {green} heikenashi candle.
Strategy for UT Bot Alerts indicator Using the UT Bot alerts indicator by @QuantNomad, this strategy was designed for showing an example of how this indicator could be used, also, it has the goal to help some people from a group that use to use this indicator for their trading. Under any circumstance I recommend to use it without testing it before in real time.
Backtesting context: 2020-02-05 to 2023-02-25 of BTCUSD 4H by Tvc. Commissions: 0.03% for each entry, 0.03% for each exit. Risk per trade: 2.5% of the total account
For this strategy, 3 indicators are used:
UT Bot Alerts indicator by Quantnomad
One Ema of 200 periods for indicate the trend
Atr stop loss from Gatherio
Trade conditions:
For longs:
Close price is higher than Atr from UT Bot
Ema from UT Bot cross over Atr from UT Bot.
This gives us our long signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 0.75:1 and take profit of 3:1 where half position will be closed. This will be showed as buy (open long position)
The other half will be closed when close price is lower than Atr and Ema from UT Bot cross under Atr. This will be showed as cl buy (close long position)
For shorts:
Close price is lower than Atr from UT Bot
Ema from UT Bot cross over Atr from UT Bot.
This gives us our short signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 0.75:1 and take profit of 3:1 where half position will be closed. This will be showed as sell (open short position)
The other half will be closed when close price is higher than Atr and Ema from UT Bot cross over Atr. This will be showed as cl sell (close short position)
Risk management
For calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a long signal at price of 20,000 usd. The stop loss price from atr stop loss is 19,000. You calculate the distance in percent between 20,000 and 19,000. In this case, that distance would be of 5,0%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(5,0%) = 500usd. It means, you have to use 500 usd for risking 2.5% of your account.
We will use this risk management for apply compound interest.
In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, etc.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital
---> Do not forget to deactivate Trades on chart option in style settings for a cleaner look of the chart <---
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!
Strategies for trending markets use to have more looses than wins and it takes a long time to get profits, so do not forget to be patient and consistent !
---> The strategy can still be improved, you can change some parameters depending of the asset and timeframe like risk/reward for taking profits, for break even, also the main parameters of the UT Bot Alerts <----
Simple SuperTrend Strategy for BTCUSD 4HHello guys!, If you are a swing trader and you are looking for a simple trend strategy, you should check this one. Based in the supertrend indicator, this strategy will help you to catch big movements in BTCUSD 4H and avoid losses as much as possible in consolidated situations of the market
This strategy was designed for BTCUSD in 4H timeframe
Backtesting context: 2020-01-02 to 2023-01-05 (The strategy has also worked in previous years)
Trade conditions:
Rules are actually simple, the most important thing is the risk and position management of this strategy
For long:
Once Supertrend changes from a downtrend to a uptrend, you enter into a long position. The stop loss will be defined by the atr stop loss
The first profit will be of 0.75 risk/reward ratio where half position will be closed. When this happens, you move the stop loss to break even.
Now, just will be there two situations:
Once Supertrend changes from a uptrend to a downtrend, you close the other half of the initial long position.
If price goes againts the position, the position will be closed due to breakeven.
For short:
Once Supertrend changes from a uptrend to a downtrend, you enter into a short position. The stop loss will be defined by the atr stop loss
The first profit will be of 0.75 risk/reward ratio where half position will be closed. When this happens, you move the stop loss to break even.
Like in the long position, just will be there two situations:
Once Supertrend changes from a downtrend to a uptrend, you close the other half of the initial short position.
If price goes againts the position, the position will be closed due to breakeven.
Risk management
For calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a long signal at price of 20,000 usd. The stop loss price from atr stop loss is 19,000. You calculate the distance in percent between 20,000 and 19,000. In this case, that distance would be of 5,0%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(5,0%) = 500usd. It means, you have to use 500 usd for risking 2.5% of your account.
We will use this risk management for apply compound interest.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, supertrend or positions.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
Signals meanings:
L for long position. CL for close long position.
S for short position. CS for close short position.
Tp for take profit (it also appears when the position is closed due to stop loss, this due to the script uses two kind of positions)
Exit due to break even or due to stop loss
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
The amount of trades closed in the backtest are not exactly the real ones. If you want to know the real ones, go to settings and change % of trade for first take profit to 100 for getting the real ones. In the backtest, the real amount of opened trades was of 194.
Indicators used:
Supertrend
Atr stop loss by garethyeo
This is the fist strategy that I publish in tradingview, I will be glad with you for any suggestion, support or advice for future scripts. Do not doubt in make any question you have and if you liked this content, leave a boost. I plan to bring more strategies and useful content for you!