Trailing Stop with RSI - Momentum-Based StrategyTrailing Stop with RSI - Momentum-Based Strategy
Description:
The Trailing Stop with RSI strategy combines momentum analysis and trailing stop functionality to help traders identify potential entry and exit points in their trading decisions. This strategy is suitable for various markets and timeframes.
Key Features:
Momentum Analysis: The strategy incorporates momentum indicators to identify potential buying and selling opportunities based on momentum shifts in the price.
Trailing Stop Functionality: The strategy utilizes a trailing stop to protect profits and dynamically adjust the stop loss level as the trade moves in the desired direction.
RSI Confirmation: The Relative Strength Index (RSI) is included to provide additional confirmation for trade entries by considering overbought and oversold conditions.
How to Use:
Entry Conditions: Long positions are triggered when positive momentum is detected, and the RSI confirms an oversold condition. Short positions are triggered when negative momentum is detected, and the RSI confirms an overbought condition.
Trailing Stop Activation: Once a position is opened, the trailing stop is activated when the specified profit level (as a percentage) is reached.
Trailing Stop Level: The trailing stop maintains a stop loss level at a specified distance (as a percentage) from the highest profit achieved since opening the position.
Exit Conditions: The trailing stop will trigger an exit and close all positions when the trailing stop level is breached.
Markets and Conditions:
This strategy can be applied to various markets, including stocks, forex, cryptocurrencies, and commodities. It can be used in trending and ranging market conditions, making it versatile for different market environments.
Important Considerations:
Adjust Parameters: Traders can modify the length of the momentum and RSI indicators to suit their preferred timeframe and trading style.
Risk Management: It is recommended to consider appropriate position sizing, risk-to-reward ratios, and overall risk management practices when using this strategy.
Backtesting and Optimization: Traders are encouraged to backtest the strategy on historical data and optimize the parameters to find the best settings for their chosen market and timeframe.
By incorporating momentum analysis, trailing stop functionality, and RSI confirmation, this strategy aims to provide traders with a systematic approach to capturing profitable trades while managing risk effectively.
Oscillators
D-BoT Alpha 'Short' SMA and RSI StrategyDostlar selamlar,
İşte son derece basit ama etkili ve hızlı, HTF de çok iyi sonuçlar veren bir strateji daha, hepinize bol kazançlar dilerim ...
Nedir, Nasıl Çalışır:
Strateji, iki ana girdiye dayanır: SMA ve RSI. SMA hesaplama aralığı 200 olarak, RSI ise 14 olarak ayarlanmıştır. Bu değerler, kullanıcı tercihlerine veya geriye dönük test sonuçlarına göre ayarlanabilir.
Strateji, iki koşul karşılandığında bir short sinyali oluşturur: RSI değeri, belirlenen bir giriş seviyesini (burada 51 olarak belirlenmiş) aşar ve kapanış fiyatı SMA değerinin altındadır.
Strateji, kısa pozisyonu üç durumda kapatır: Kapanış fiyatı, takip eden durdurma seviyesinden (pozisyon açıldığından beri en düşük kapanış olarak belirlenmiştir) büyükse, RSI değeri belirlenen bir durdurma seviyesini (bu durumda 54) aşarsa veya RSI değeri belirli bir kar al seviyesinin (bu durumda 32) altına düşerse.
Güçlü Yönleri:
İki farklı gösterge (SMA ve RSI) kullanımı, yalnızca birini kullanmaktan daha sağlam bir sinyal sağlayabilir.
Strateji, karları korumaya ve fiyat dalgalanmalarında kayıpları sınırlamaya yardımcı olabilecek bir iz süren durdurma seviyesi içerir.
Script oldukça anlaşılır ve değiştirmesi nispeten kolaydır.
Zayıf Yönleri:
Strateji, hacim, oynaklık veya daha geniş piyasa eğilimleri gibi diğer potansiyel önemli faktörleri göz önünde bulundurmaz.
RSI seviyeleri ve SMA süresi için belirli parametreler sabittir ve tüm piyasa koşulları veya zaman aralıkları için optimal olmayabilir.
Strateji oldukça basittir. Trade maliyetini (kayma veya komisyonlar gibi) hesaba katmaz, bu da trade performansını önemli ölçüde etkileyebilir.
Bu Stratejiyle Nasıl İşlem Yapılır:
Strateji, short işlemler için tasarlanmıştır. RSI, 51'in üzerine çıktığında ve kapanış fiyatı 200 periyotluk SMA'nın altında olduğunda işleme girer. RSI, 54'ün üzerine çıktığında veya 32'nin altına düştüğünde veya fiyat, pozisyon açıldığından beri en düşük kapanış fiyatının üzerine çıktığında işlemi kapatır.
Lütfen Dikkat, bu strateji veya herhangi bir strateji izole bir şekilde kullanılmamalıdır. Tüm bu çalışmalar eğitsel amaçlıdır. Yatırım tavsiyesi içermez.
This script defines a trading strategy based on Simple Moving Average (SMA) and the Relative Strength Index (RSI) indicators. Here's an overview of how it works, along with its strengths and weaknesses, and how to trade using this strategy:
How it works:
The strategy involves two key inputs: SMA and RSI. The SMA length is set to 200, and the RSI length is set to 14. These values can be adjusted based on user preferences or back-testing results.
The strategy generates a short signal when two conditions are met: The RSI value crosses over a defined entry level (set at 51 here), and the closing price is below the SMA value.
When a short signal is generated, the strategy opens a short position.
The strategy closes the short position under three conditions: If the close price is greater than the trailing stop (which is set as the lowest close since the position opened), if the RSI value exceeds a defined stop level (54 in this case), or if the RSI value drops below a certain take-profit level (32 in this case).
Strengths:
The use of two different indicators (SMA and RSI) can provide a more robust signal than using just one.
The strategy includes a trailing stop, which can help to protect profits and limit losses as the price fluctuates.
The script is straightforward and relatively easy to understand and modify.
Weaknesses:
The strategy doesn't consider other potentially important factors, such as volume, volatility, or broader market trends.
The specific parameters for the RSI levels and SMA length are hard-coded, and may not be optimal for all market conditions or timeframes.
The strategy is very simplistic. It doesn't take into account the cost of trading (like slippage or commissions), which can significantly impact trading performance.
How to trade with this strategy:
The strategy is designed for short trades. It enters a trade when the RSI crosses above 51 and the closing price is below the 200-period SMA. It will exit the trade when the RSI goes above 54 or falls below 32, or when the price rises above the lowest closing price since the position was opened.
Please note, this strategy or any strategy should not be used in isolation. It's important to consider other aspects of trading such as risk management, capital allocation, and combining different strategies to diversify. Back-testing the strategy on historical data and demo trading before going live is also a recommended practice.
D-Bot Alpha RSI Breakout StrategyHello dear Traders,
Here is a simple yet effective strategy to use, for best profit higher time frame, such as daily.
Structure of the code
The code defines inputs for SMA (simple moving average) length, RSI (relative strength index) length, RSI entry level, RSI stop loss level, and RSI take profit level. The default values of these variables can be customized as per the user's preferences.
The script calculates SMA and RSI based on the input parameters and the closing price of the asset.
Trading logic
This strategy allows the placement of a long position when:
The RSI crosses above the RSI entry level and
The close price is above the SMA value.
After entering a long position, it applies a trailing stop mechanism. The stop price is updated to the close price if the close price is lower than the last close price.
The script closes the long position when:
RSI falls below the stop loss level.
RSI reaches or exceeds the take profit level.
If the trailing stop is activated (once RSI reaches or exceeds the take profit level), the closing price falls below the trailing stop level.
Strengths
The strategy includes mechanisms for entering a position, taking profit, and stopping losses, which are fundamental aspects of a trading strategy.
It applies a trailing stop mechanism that allows to capture further gains if the price keeps increasing while protecting from losses if the price starts to decrease.
Weaknesses
This strategy only contemplates long positions. Depending on the market situation, the strategy may miss opportunities for short selling when the market is on a downward trend.
The choice of the fixed RSI entry, stop loss, and take profit levels may not be ideal for all market conditions or assets. It might benefit from a more adaptive mechanism that adjusts these levels according to market volatility or trend.
The strategy doesn't factor in trading costs (such as spread or commission), which could have a significant impact on the net profit, especially if the user is trading with a high frequency or in a low liquidity market.
How to trade with this strategy
Given these parameters and the strategy outlined by the code, the trader would enter a long position when the RSI crosses above the RSI entry level (default 34) and the closing price is above the SMA value (SMA calculated with default period of 200). The trader would exit the position when either the RSI falls below the RSI stop loss level (default 30), or RSI rises above the RSI take profit level (default 50), or when the trailing stop is hit.
Remember "The strategies I have prepared are entirely for educational purposes and should not be considered as investment advice. Support your trades using other tools. Wishing everyone profitable trades..."
RSI-CCI Fusion StrategyRSI-CCI Fusion Strategy: Harnessing the Power of RSI and CCI
The "RSI-CCI Fusion Strategy" is a powerful trading approach that combines the strengths of the Relative Strength Index (RSI) and the Commodity Channel Index (CCI) to provide enhanced trading insights. This strategy is based on the popular "RSI & CCI Fusion + Alerts" indicator, which utilizes the RSI and CCI indicators from TradingView .
1. Overview of RSI and CCI:
The Relative Strength Index (RSI) is a widely used momentum oscillator that measures the speed and change of price movements. It helps traders identify overbought and oversold conditions in the market. On the other hand, the Commodity Channel Index (CCI) is a versatile indicator that identifies cyclical trends and provides insights into overbought and oversold levels.
2. The RSI-CCI Fusion Strategy:
The RSI-CCI Fusion Strategy harnesses the combined power of the RSI and CCI indicators to generate robust trading signals. By blending the RSI and CCI, this strategy captures both momentum and cyclical trend dynamics, offering a more comprehensive view of the market.
3. Utilizing the RSI-CCI Fusion Indicator + Alerts:
The "RSI & CCI Fusion + Alerts" indicator serves as the backbone of the RSI-CCI Fusion Strategy. It integrates the RSI and CCI indicators from TradingView, providing traders with a clear and actionable trading signal.
4. How it Works:
- The indicator calculates the RSI and CCI values, standardizes them using z-score, and combines them with a weighted fusion approach.
- The resulting RSI-CCI Fusion indicator is plotted on the chart, accompanied by dynamic upper and lower bands, which help identify potential overbought and oversold conditions.
- Traders can customize alerts based on their preferred thresholds and timeframes, enabling them to receive timely notifications for potential buy and sell signals.
5. Implementing the RSI-CCI Fusion Strategy:
Traders following the RSI-CCI Fusion Strategy can utilize the buy and sell signals generated by the RSI-CCI Fusion indicator. When the indicator crosses below the upper band, it may signal a potential selling opportunity. Conversely, when it crosses above the lower band, it may indicate a potential buying opportunity. Traders can also consider additional factors and technical analysis tools to validate the signals before making trading decisions.
Conclusion: The RSI-CCI Fusion Strategy provides traders with a robust approach to analyze the market and make well-informed trading decisions. By incorporating the RSI and CCI indicators through the "RSI & CCI Fusion + Alerts" indicator, traders can take advantage of the combined strengths of these indicators. However, it is important to remember that no strategy guarantees success, and traders should always practice risk management and conduct thorough analysis before executing trades using this strategy.
Disclaimer: Trading involves risks, and it is important to conduct your own research and consult with a financial advisor before making any investment decisions.
Note: The RSI-CCI Fusion Strategy serves as a general guide, and individual traders may have different preferences and trading styles.
Ultimate Balance StrategyThe Ultimate Balance Oscillator Strategy harnesses the power of the Ultimate Balance Oscillator to deliver a comprehensive and disciplined approach to trading. By combining the insights of the Rate of Change (ROC), Relative Strength Index (RSI), Commodity Channel Index (CCI), Williams Percent Range, and Average Directional Index (ADX) from TradingView, this strategy offers traders a systematic way to navigate the markets with precision.
The core principle of this strategy lies in its ability to identify optimal entry and exit points based on the movement of the Ultimate Balance Oscillator. When the oscillator line crosses below the 0.75 level, a buy signal is generated, indicating a potential opportunity for a bullish trend reversal. Conversely, when the oscillator line crosses above the 0.25 level, it triggers an exit signal, suggesting a possible end to a bullish trend.
Key Features:
1. Objective Market Analysis: The Ultimate Balance Oscillator Strategy provides a disciplined and objective approach to market analysis. By relying on the quantified insights of multiple indicators, it helps traders cut through market noise and focus on key signals, improving decision-making and reducing emotional biases.
2. Enhanced Timing and Precision: This strategy's entry and exit signals are based on the specific thresholds of the Ultimate Balance Oscillator. By waiting for confirmation through the crossing of these levels, traders can potentially enter trades at opportune moments and exit with greater precision, maximizing profit potential and minimizing risk exposure.
3. Customizability and Adaptability: The strategy offers flexibility, allowing traders to customize the parameters to fit their preferred trading style and timeframes. Whether you're a short-term trader or a long-term investor, the Ultimate Balance Oscillator Strategy can be adjusted to suit your specific needs, making it adaptable to various market conditions.
4. Real-time Alerts: Stay informed and never miss a potential trade opportunity with the strategy's built-in alert system. Set personalized alerts for buy and exit signals to receive timely notifications, ensuring you're always aware of the latest developments in the market.
5. Backtesting and Optimization: Before applying the strategy to live trading, it's recommended to conduct thorough backtesting and optimization. By testing the strategy's performance over historical data and fine-tuning the parameters, you can gain insights into its strengths and weaknesses, enabling you to make informed adjustments and increase its effectiveness.
Trading involves risk. Use the Ultimate Balance Oscillator Strategy at your own discretion. Past performance is not indicative of future results.
Williams %R Strategy
The Williams %R Strategy is a trading approach that is based on the Williams Percent Range indicator, available on the TradingView platform.
This strategy aims to identify potential overbought and oversold conditions in the market, providing clear buy and sell signals for entry and exit.
The strategy utilizes the Williams %R indicator, which measures the momentum of the market by comparing the current close price with the highest high and lowest low over a specified period. When the Williams %R crosses above the oversold level, a buy signal is generated, indicating a potential upward price movement. Conversely, when the indicator crosses below the overbought level, a sell signal is generated, suggesting a possible downward price movement.
Position management is straightforward with this strategy. Upon receiving a buy signal, a long position is initiated, and the position is closed when a sell signal is generated. This strategy allows traders to capture potential price reversals and take advantage of short-term market movements.
To manage risk, it is recommended to adjust the position size based on the available capital. In this strategy, the position size is set to 10% of the initial capital, ensuring proper risk allocation and capital preservation.
It is important to note that the Williams %R Strategy should be used in conjunction with other technical analysis tools and risk management techniques. Backtesting and paper trading can help evaluate the strategy's performance and fine-tune the parameters before deploying it with real funds.
Remember, trading involves risks, and past performance is not indicative of future results. It is always advised to do thorough research, seek professional advice, and carefully consider your financial goals and risk tolerance before making any investment decisions.
HK Percentile Interpolation One
This script is designed to execute a trading strategy based on Heikin Ashi candlesticks, moving averages, and percentile levels.
Please note that you should keep your original chart in normal candlestick mode and not switch it to Heikin Ashi mode. The script itself calculates Heikin Ashi values from regular candlesticks. If your chart is already in Heikin Ashi mode, the script would be calculating Heikin Ashi values based on Heikin Ashi values, which would produce incorrect results.
The strategy begins trading from a start date that you can specify by modifying the `startDate` parameter. The format of the date is "YYYY MM DD". So, for example, to start the strategy from January 1, 2022, you would set `startDate = timestamp("2022 01 01")`.
The script uses Heikin Ashi candlesticks, which are plotted in the chart. This approach can be useful for spotting trends and reversals more easily than with regular candlestick charts. This is particularly useful when backtesting in TradingView's "Rewind" mode, as you can see how the Heikin Ashi candles behaved at each step of the strategy.
Buy and sell signals are generated based on two factors:
1. The crossing over or under of the Heikin Ashi close price and the 75th percentile price level.
2. The Heikin Ashi close price being above certain moving averages.
You have the flexibility to adjust several parameters in the script, including:
1. The stop loss and trailing stop percentages (`stopLossPercentage` and `trailStopPercentage`). These parameters allow the strategy to exit trades if the price moves against you by a certain percentage.
2. The lookback period (`lookback`) used to calculate percentile levels. This determines the range of past bars used in the percentile calculation.
3. The lengths of the two moving averages (`yellowLine_length` and `purplLine_length`). These determine how sensitive the moving averages are to recent price changes.
4. The minimum holding period (`holdPeriod`). This sets the minimum number of bars that a trade must be kept open before it can be closed.
Please adjust these parameters according to your trading preferences and risk tolerance. Happy trading!
Hobbiecode - RSI + Close previous dayThis is a simple strategy that is working well on SPY but also well performing on Mini Futures SP500. The strategy is composed by the followin rules:
1. If RSI(2) is less than 15, then enter at the close.
2. Exit on close if today’s close is higher than yesterday’s high.
If you backtest it on Mini Futures SP500 you will be able to track data from 1993. It is important to select D1 as timeframe.
Please share any comment or idea below.
Have a good trading,
Ramón.
Hobbiecode - Five Day Low RSI StrategyThis is a simple strategy that is working well on SPY but also well performing on Mini Futures SP500. The strategy is composed by the followin rules:
1. If today’s close is below yesterday’s five-day low, go long at the close.
2. Sell at the close when the two-day RSI closes above 50.
3. There is a time stop of five days if the sell criterium is not triggered.
If you backtest it on Mini Futures SP500 you will be able to track data from 1993. It is important to select D1 as timeframe.
Please share any comment or idea below.
Have a good trading,
Ramón.
RSI TrueLevel StrategyThis strategy is a momentum-based strategy that uses the Relative Strength Index (RSI) indicator and a TrueLevel envelope to generate trade signals.
The strategy uses user-defined input parameters to calculate TrueLevel envelopes for 14 different lengths. The TrueLevel envelope is a volatility-based technical indicator that consists of upper and lower bands. The upper band is calculated by adding a multiple of the standard deviation to a linear regression line of the price data, while the lower band is calculated by subtracting a multiple of the standard deviation from the same regression line.
The strategy generates long signals when the RSI crosses above the oversold level or when the price crosses above the selected lower band of the TrueLevel envelope. It generates short signals when the RSI crosses below the overbought level or when the price crosses below the selected upper band of the TrueLevel envelope.
The strategy allows for long and short trades and sets the trade size as a percentage of the account equity. The colors of the bands and fills are also customizable through user-defined input parameters.
In this strategy, the 12th TrueLevel band was chosen due to its ability to capture significant price movements while still providing a reasonable level of noise reduction. The strategy utilizes a total of 14 TrueLevel bands, each with varying lengths. The 12th band, with a length of 2646, strikes a balance between sensitivity to market changes and reducing false signals, making it a suitable choice for this strategy.
RSI Parameters:
In this strategy, the RSI overbought and oversold levels are set at 65 and 40, respectively. These values were chosen to filter out more noise in the market and focus on stronger trends. Traditional RSI overbought and oversold levels are set at 70 and 30, respectively. By raising the oversold level and lowering the overbought level, the strategy aims to identify more significant trend reversals and potential trade opportunities.
Of course, the parameters can be adjusted to suit individual preferences.
Strategy Creator5 indicators. Backtesting available. Uses ADX, RSI, Stochastic, MACD, and crossing EMAs (1,2, or 3). This strategy creator allows you to turn on or off these indicators and adjust the parameters for each indicator. It allows you to make one trade at a time e.g the next trade doesn't open until the last one closes. (You are also able to enter how many trades in one direction you want for example if you want only 2 long trades in a row, then the strategy waits for the next short position without making anymore long trades. Once there are 2 short positions in a row, it waits for a long position). The code can be edited to for automated trading by editing the comment in the source code for the strategy parameters. This took many hours to finish. ENJOY.
Stochastic RSI Strategy (with SMA and VWAP Filters)The strategy is designed to trade on the Stochastic RSI indicator crossover signals.
Below are all of the trading conditions:
-When the Stochastic RSI crosses above 30, a long position is entered.
-When the Stochastic RSI crosses below 70, a short position is entered.
-The strategy also includes two additional conditions for entry:
-Long entries must have a positive spread value between the 9 period simple moving average and the 21 period simple moving average.
-Short entries must have a negative spread value between the 9 period simple moving average and the 21 period simple moving average.
-Long entries must also be below the volume-weighted average price.
-Short entries must also be above the volume-weighted average price.
-The strategy includes stop loss and take profit orders for risk management:
-A stop loss of 20 ticks is placed for both long and short trades.
-A take profit of 25 ticks is placed for both long and short trades.
JS-TechTrading: Supertrend-Strategy_Basic versionAre you looking for a reliable and profitable algorithmic trading strategy for TradingView? If so, you might be interested in our Supertrend basic strategy, which is based on three powerful indicators: Supertrend (ATR), RSI and EMA.
Supertrend is a trend-following indicator that helps you identify the direction and strength of the market. It also gives you clear signals for entry and exit points based on price movements.
RSI is a momentum indicator that measures the speed and change of price movements. It helps you filter out false signals and avoid overbought or oversold conditions.
EMA is a moving average indicator that smooths out price fluctuations and shows you the long-term trend of the market. It helps you confirm the validity of your trades and avoid trading against the trend.
Our Supertrend basic strategy combines these three indicators to give you a simple yet effective way to trade any market. Here's how it works:
- For long trades, you enter when the price is above Supertrend and pulls back below it (the low of the candle crosses Supertrend) and then rebounds above it (the high of the next candle goes above the pullback candle). You exit when the price closes below Supertrend or when you reach your target profit or stop loss.
- For short trades, you enter when the price is below Supertrend and pulls back above it (the high of the candle crosses Supertrend) and then drops below it (the low of the next candle goes below the pullback candle). You exit when the price closes above Supertrend or when you reach your target profit or stop loss.
- You can also use RSI and EMA filters to improve your results. For long trades, you only enter if RSI is above 50 and price is above 200 EMA. For short trades, you only enter if RSI is below 50 and price is below 200 EMA.
- You can set your stop loss and target profit as a percentage of your entry price or based on other criteria. You can also adjust the parameters of each indicator according to your preferences and risk tolerance.
Our Supertrend basic strategy is easy to use and has been tested on various markets and time frames. It can help you capture consistent profits while minimizing your losses.
Dynamic Stop Loss DemoWhat does this script do ?
This script is for pine script programmers and explains how to implement a dynamic stop-loss strategy. It is different from trailing stop-loss. Trailing stop-loss can only set the retracement value, but this script can take profit on part of the position at a fixed price and allows users to decide whether to take profit on all positions based on whether a certain track is breached or other conditions author want. In this demo, it use rsi crossover and crossunder to decide the strategy condition, and use close price as open price, and use lowest low / highest high as stop price, and use 1.5 risk ratio to calculate the fixed first profit price. It will take 50% position size when the first profit price was reached. Then it will close all rest positions when the inverse condition come out or the dynamic stop(calculated by ATR) breached or when the price back to the open price or the stop price.
How is this script implemented
When start strategy by strategy.entry , it gives a custom id which contains direction, openPrice, stopPrice, profitPrice, qty, etc. It can be get from the global variable strategy.posiition_entry_name .
LowFinder_PyraMider_V2This strategy is a result of an exploration to experiment with other ways to detect lows / dips in the price movement, to try out alternative ways to exit and stop positions and a dive into risk management. It uses a combination of different indicators to detect and filter the potential lows and opens multiple positions to spread the risk and opportunities for unrealized losses or profits. This script combines code developed by fellow Tradingview community_members.
LowFinder
The lows in the price movement are detected by the Low finder script by RafaelZioni . It finds the potential lows based on the difference between RSI and EMA RSI. The MTF RSI formula is part of the MTFindicators library developed by Peter_O and is integrated in the Low finder code to give the option to use the RSI of higher timeframes. The sensitivity of the LowFinder is controlled by the MA length. When potential lows are detected, a Moving Average, a MTF Stochastic (based the the MTFindiicators by Peter_O) and the average price level filter out the weak lows. In the settings the minimal percentage needed for a low to be detected below the average price can be specified.
Order Sizing and Pyramiding
Pyramiding, or spreading multiple positions, is at the heart of this strategy and what makes it so powerful. The order size is calculated based on the max number of orders and portfolio percentage specified in the input settings. There are two order size modes. The ‘base’ mode uses the same base quantity for each order it opens, the ‘multiply’ mode multiplies the quantity with each order number. For example, when Long 3 is opened, the quantity is multiplied by 3. So, the more orders the bigger the consecutive order sizes. When using ‘multiply’ mode the sizes of the first orders are considerably lower to make up for the later bigger order sizes. There is an option to manually set a fixed order size but use this with caution as it bypasses all the risk calculations.
Stop Level, Take Profit, Trailing Stop
The one indicator that controls the exits is the Stop Level. When close crosses over the Stop Level, the complete position is closed and all orders are exited. The Stop Level is calculated based on the highest high given a specified candle lookback (settings). There is an option to deviate above this level with a specified percentage to tweak for better results. You can activate a Take Profit / Trailing Stop. When activated and close crosses the specified percentage, the Stop Level logic changes to a trailing stop to gain more profits. Another option is to use the percentage as a take profit, either when the stop level crosses over the take profit or close. With this option active, you can make this strategy more conservative. It is active by default.
And finally there is an option to Take Profit per open order. If hit, the separate orders close. In the current settings this option is not used as the percentage is 10%.
Stop Loss
I published an earlier version of this script a couple of weeks ago, but it got hidden by the moderators. Looking back, it makes sense because I didn’t pay any attention to risk management and save order sizing. This resulted in unrealistic results. So, in this script update I added a Stop Loss option. There are two modes. The ‘average price’ mode calculates the stop loss level based on a given percentage below the average price of the total position. The ‘equity’ mode calculates the stop loss level based on a given percentage of your equity you want to lose. By default, the ‘equity’ mode is active. By tweaking the percentage of the portfolio size and the stop loss equity mode, you can achieve a quite low risk strategy set up.
Variables in comments
To sent alerts to my exchange I use a webhook server. This works with a sending the information in the form of a comment. To be able to send messages with different quantities, a variable is added to the comment. This makes it possible to open different positions on the exchange with increasing quantities. To test this the quantities are printed in the comment and the quantities are switched off in the style settings.
This code is a result of a study and not intended for use as a worked out and full functioning strategy. Use it at your own risk. To make the code understandable for users that are not so much introduced into pine script (like me), every step in the code is commented to explain what it does. Hopefully it helps.
Enjoy!
VWAP+15EMA with RSIVWAP+EMA+RSI Strategy for the group MelléCasH
This strategy will enter a long position when the closing price is above both the VWAP and the 15 EMA, and the RSI is above the specified overbought level. It will exit the position when the price falls by the specified stop loss percentage, rises by the specified take profit percentage, or when the trailing stop loss (which trails the highest price achieved after the position was entered by the specified percentage) is hit. The VWAP, EMA, and RSI indicators are also plotted on the chart for reference.
MTF Diagonally Layered RSI - 1 minute Bitcoin Bot [wbburgin]This is a NON-REPAINTING multi-timeframe RSI strategy (long-only) that enters a trade only when two higher timeframes are oversold. I wrote it on BTC/USD for 1min, but the logic should work on other assets as well. It is diagonally layered to be profitable for when the asset is in a downtrend.
Diagonal layering refers to entry and exit conditions spread across different timeframes. Normally, indicators can become unprofitable because in downtrends, the overbought zones of the current timeframe are not reached. Rather, the overbought zones of the faster timeframes are reached first, and then a selloff occurs. Diagonally-layered strategies mitigate this by selling diagonally, that is, selling once the faster timeframe reaches overbought and buying once the slower timeframe reaches oversold.
Thus this strategy is diagonally layered down . I may create a separate script that alternates between diagonal-up and diagonal-down based off of overall trend, as in extended trend periods up this indicator may not flash as frequently. This can be visualized in a time series x timeframe chart as an "X" shape. Something to consider...
Let me know if you like this strategy. Feel free to alter the pyramiding entries, initial capital, and entry size, as well as commission regime. My strategies are designed to maximize average profit instead of flashing super frequently, as the fees will eat you up. Additionally, at the time of publication, all of my strategy scripts are intended to have profitable Sharpe and Sortino ratios.
Timeframes, RSI period, and oversold/overbought bounds are configurable.
Kitchen [ilovealgotrading]
OVERVIEW:
Kitchen is a strategy that aims to trade in the direction of the trend by using supertrend and stochRsi data by calculating at different time values.
IMPLEMENTATION DETAILS – SETTINGS:
First of all, let's understand the supertrend and stocrsi indicators.
How do you read and use Super Trend for trading ?
The price is often going upwards when it breaks the super trend line while keeping its position above the indication level.
When the market is in a bullish trend, the indicator becomes green. The indicator level will act as trendline support in such a scenario. The color of the indicator changes to red to indicate a negative trend once the price crosses the support line. The price uses the super trend level as a trendline resistance during a bearish move.
In our strategy, if our 1-hour and 4-hour supertrend lines show the up or down train in the same direction at the same time, we can assume that a train is forming here.
Why do I use the time of 1 hour and 4 hours ?
When I did a backtest from the past to the present, I discovered that the most accurate and consistent time zones are the 1 hour and 4 hour time zones.
By the way we can change our short term timeframe(1H) and long term timeframe(4H) from settings panel.
How do you read and use the Stoch-RSI Indicator?
This indicator analyzes price dynamics automatically to detect overbought and oversold locations.
The indicator includes:
- The primary line, which typically has values between 0 and 100;
- Two dynamic levels for overbought and oversold conditions.
IF our stoch-rsi indicator value has fallen below our lower boundary line, the oversold event has been observed in the price, if our stoch-rsi value breaks up our bottom line after becoming oversold, we think that the price will start the recovery phase.(The case is also true for the opposite.)
However, this does not always apply and we need additional approvals, Therefore, our 1H and 4H supertrrend indicator provides us with additional confirmation.
Buy Condition:
Our 1H(short term) and 4H(long term) supertrrend indicator, has given the buy signal(green line and yellow line), and if our stochrsi indicator has broken our oversold line up on the past 15 bars, the buy signal is formed here.
Sell Condition:
Our 1H(short term) and 4H(long term) supertrrend indicator, has given the sell signal(red line and orange line), and if our stochrsi indicator has broken our overbuy line down on the past 15 bars, the sell signal is formed here.
Stop Loss or Take Profit Conditions:
Exit Long Senerio:
All conditions are completed, the buy signal has arrived and we have entered a LONG trade, the 1-hour supertrend line follows the price rise(yellow line), if the price breaks below the 1-hour super trend line and a sell condition occurs for 1H timeframe for supertrend indcator, LONG trade will exit here.
Exit Short Senerio:
All conditions are completed, the Sell signal has arrived and we have entered a SHORT trade, the 1-hour supertrend line follows the price down(orange line), if the price breaks up the 1-hour super trend line and a buy condition occurs for 1H timeframe for supertrend indcator, SHORT trade will exit here.
What can you change in the settings panel?
1-We can set Start and End date for backtest and future alarms
2-We can set ATR length and Factor for supertrend indicator
3-We can set our short term and long term timeframe value
4-We can set StochRsi Up and Low limit to confirm buy and sell conditions
5-We can set stochrsi retroactive approval length
6-We can set stochrsi values or the length
7-We can set Dollar cost for per position
8- We can choose the direction of our positions, we can set only LONG, only SHORT or both directions.
9-IF you want to place automatic buy and sell orders with this strategy, you can paste your codes into the Long open-close or Short open-close message sections.
For example
IF you write your alert window this code {{strategy.order.alert_message}}.
When trigger Long signal you will get dynamically what you pasted here for Long Open Message
ALSO:
Please do not open trades without properly managing your risk and psychology!!!
If you have any ideas what to add to my work to add more sources or make calculations cooler, suggest in DM .
Mean Reversion and TrendfollowingTitle: Mean Reversion and Trendfollowing
Introduction:
This script presents a hybrid trading strategy that combines mean reversion and trend following techniques. The strategy aims to capitalize on short-term price corrections during a downtrend (mean reversion) as well as ride the momentum of a trending market (trend following). It uses a 200-period Simple Moving Average (SMA) and a 2-period Relative Strength Index (RSI) to generate buy and sell signals.
Key Features:
Combines mean reversion and trend following techniques
Utilizes 200-period SMA and 2-period RSI
Customizable starting date
Allows for enabling/disabling mean reversion or trend following modes
Adjustable position sizing for trend following and mean reversion
Script Description:
The script implements a trading strategy that combines mean reversion and trend following techniques. Users can enable or disable either of these techniques through the input options. The strategy uses a 200-period Simple Moving Average (SMA) and a 2-period Relative Strength Index (RSI) to generate buy and sell signals.
The mean reversion mode is active when the price is below the SMA200, while the trend following mode is active when the price is above the SMA200. The script generates buy signals when the RSI is below 20 (oversold) in mean reversion mode or when the price is above the SMA200 in trend following mode. The script generates sell signals when the RSI is above 80 (overbought) in mean reversion mode or when the price falls below 95% of the SMA200 in trend following mode.
Users can adjust the position sizing for both trend following and mean reversion modes using the input options.
To use this script on TradingView, follow these steps:
Open TradingView and load your preferred chart.
Click on the 'Pine Editor' tab located at the bottom of the screen.
Paste the provided script into the Pine Editor.
Click 'Add to Chart' to apply the strategy to your chart.
Please note that the past performance of any trading system or methodology is not necessarily indicative of future results. Always use proper risk management and consult a financial advisor before making any investment decisions.
------
The following is a summary of the underlying whitepaper (onlinelibrary.wiley.com) for this strategy:
This paper proposes a theory of securities market under- and overreactions based on two psychological biases: investor overconfidence about the precision of private information and biased self-attribution, which causes asymmetric shifts in investors' confidence as a function of their investment outcomes. The authors show that overconfidence implies negative long-lag autocorrelations, excess volatility, and public-event-based return predictability. Biased self-attribution adds positive short-lag autocorrelations (momentum), short-run earnings "drift," and negative correlation between future returns and long-term past stock market and accounting performance.
The paper explains that there is empirical evidence challenging the traditional view that securities are rationally priced to reflect all publicly available information. Some of these anomalies include event-based return predictability, short-term momentum, long-term reversal, high volatility of asset prices relative to fundamentals, and short-run post-earnings announcement stock price "drift."
The authors argue that investor overconfidence can lead to stock prices overreacting to private information signals and underreacting to public signals. This overreaction-correction pattern is consistent with long-run negative autocorrelation in stock returns, excess volatility, and further implications for volatility conditional on the type of signal. The market's tendency to over- or underreact to different types of information allows the authors to address the pattern that average announcement date returns in virtually all event studies are of the same sign as the average post-event abnormal returns.
Biased self-attribution implies short-run momentum and long-term reversals in security prices. The dynamic analysis based on biased self-attribution can also lead to a lag-dependent response to corporate events. Cash flow or earnings surprises at first tend to reinforce confidence, causing a same-direction average stock price trend. Later reversal of overreaction can lead to an opposing stock price trend.
The paper concludes by summarizing the findings, relating the analysis to the literature on exogenous noise trading, and discussing issues related to the survival of overconfident traders in financial markets.
The Flash-Strategy (Momentum-RSI, EMA-crossover, ATR)The Flash-Strategy (Momentum-RSI, EMA-crossover, ATR)
Are you tired of manually analyzing charts and trying to find profitable trading opportunities? Look no further! Our algorithmic trading strategy, "Flash," is here to simplify your trading process and maximize your profits.
Flash is an advanced trading algorithm that combines three powerful indicators to generate highly selective and accurate trading signals. The Momentum-RSI, Super-Trend Analysis and EMA-Strategy indicators are used to identify the strength and direction of the underlying trend.
The Momentum-RSI signals the strength of the trend and only generates trading signals in confirmed upward or downward trends. The Super-Trend Analysis confirms the trend direction and generates signals when the price breaks through the super-trend line. The EMA-Strategy is used as a qualifier for the generation of trading signals, where buy signals are generated when the EMA crosses relevant trend lines.
Flash is highly selective, as it only generates trading signals when all three indicators align. This ensures that only the highest probability trades are taken, resulting in maximum profits.
Our trading strategy also comes with two profit management options. Option 1 uses the so-called supertrend-indicator which uses the dynamic ATR as a key input, while option 2 applies pre-defined, fixed SL and TP levels.
The settings for each indicator can be customized, allowing you to adjust the length, limit value, factor, and source value to suit your preferences. You can also set the time period in which you want to run the backtest and how many dollar trades you want to open in each position for fully automated trading.
Choose your preferred trade direction and stop-loss/take-profit settings, and let Flash do the rest. Say goodbye to manual chart analysis and hello to consistent profits with Flash. Try it now!
General Comments
This Flash Strategy has been developed in cooperation between Baby_whale_to_moon and JS-TechTrading. Cudos to Baby_whale_to_moon for doing a great job in transforming sophisticated trading ideas into pine scripts.
Detailed Description
The “Flash” script considers the following indicators for the generation of trading signals:
1. Momentum-RSI
2. ‘Super-Trend’-Analysis
3. EMA-Strategy
1. Momentum-RSI
• This indicator signals the strength of the underlying upward- or downward-trend.
• The signal range of this indicator is from 0 to 100. Values > 60 indicate a confirmed upward- or downward-trend.
• The strategy will only generate trading signals in case the stock (or any other financial security) is in a confirmed upward- (long entry signals) or downward-trend (short entry signals).
• This indicator provides information with regards to the strength of the underlying trend and it does not give any insight with regard to the direction of the trend. Therefore, this strategy also considers other indicators which provide technical confirmation with regards to the direction of the underlying trend.
Graph 1 shows this concept:
• The Momentum-RSI indicator gives lower readings during consolidation phases and no trading signals are generated during these periods.
Example (graph 2):
2. Super-Trend Analysis
• The red line in the graph below represents the so-called super-trend-line. Trading signals are only generated in case the price action breaks through this super-trend-line indicating a new confirmed upward-trend (or downward-trend, respectively).
• If that happens, the super trend-line changes its color from red to green, giving confirmation that the trend changed from bearish to bullish and long-entries can be considered.
• The vice-versa approach can be considered for short entries.
Graph 3 explains this concept:
3. Exponential Moving Average / EMA-Strategy
The functionality of this EMA-element of the strategy has been programmed as follows:
• The exponential moving average and two other trend lines are being used as qualifiers for the generation of trading-signals.
• Buy-signals for long-entries are only considered in case the EMA (yellow line in the graph below) crosses the red line.
• Sell-signals for short-entries are only considered in case the EMA (yellow line in the graph below) crosses the green line.
An example is shown in graph 4 below:
We use this indicator to determine the new trend direction that may occur by using the data of the price's past movement.
4. Bringing it all together
This section describes in detail, how this strategy combines the Momentum-RSI, the super-trend analysis and the EMA-strategy.
The strategy only generates trading-signals in case all of the following conditions and qualifiers are being met:
1. Momentum-RSI is higher than the set value of this strategy. The standard and recommended value is 60 (graph 5):
2. The super-trend analysis needs to indicate a confirmed upward-trend (for long-entry signals) or a confirmed downward-trend (for short-entry signals), respectively.
3. The EMA-strategy needs to indicate that the stock or financial security is in a confirmed upward-trend (long-entries) or downward-trend (short-entries), respectively.
The strategy will only generate trading signals if all three qualifiers are being met. This makes this strategy highly selective and is the key secret for its success.
Example for Long-Entry (graph 6):
When these conditions are met, our Long position is opened.
Example for Short-Entry (graph 7):
Trade Management Options (graph 8)
Option 1
In this dynamic version, the so-called supertrend-indicator is being used for the trade exit management. This supertrend-indicator is a sophisticated and optimized methodology which uses the dynamic ATR as one of its key input parameters.
The following settings of the supertrend-indicator can be changed and optimized (graph 9):
The dynamic SL/TP-lines of the supertrend-indicator are shown in the charts. The ATR-length and the supertrend-factor result in a multiplier value which can be used to fine-tune and optimize this strategy based on the financial security, timeframe and overall market environment.
Option 2 (graph 10):
Option 2 applies pre-defined, fixed SL and TP levels which will appear as straight horizontal lines in the chart.
Settings options (graph 11):
The following settings can be changed for the three elements of this strategy:
1. (Length Mom-Rsi): Length of our Mom-RSI indicator.
2. Mom-RSI Limit Val: the higher this number, the more momentum of the underlying trend is required before the strategy will start creating trading signals.
3. The length and factor values of the super trend indicator can be adjusted:ATR Length SuperTrend and Factor Super Trend
4. You can set the source value used by the ema trend indicator to determine the ema line: Source Ema Ind
5. You can set the EMA length and the percentage value to follow the price: Length Ema Ind and Percent Ema Ind
6. The backtesting period can be adjusted: Start and End time of BackTest
7. Dollar cost per position: this is relevant for 100% fully automated trading.
8. Trade direction can be adjusted: LONG, SHORT or BOTH
9. As we explained above, we can determine our stop-loss and take-profit levels dynamically or statically. (Version 1 or Version 2 )
Display options on the charts graph 12):
1. Show horizontal lines for the Stop-Loss and Take-profit levels on the charts.
2. Display relevant Trend Lines, including color setting options for the supertrend functionality. In the example below, green lines indicate a confirmed uptrend, red lines indicate a confirmed downtrend.
Other comments
• This indicator has been optimized to be applied for 1 hour-charts. However, the underlying principles of this strategy are supply and demand in the financial markets and the strategy can be applied to all timeframes. Daytraders can use the 1min- or 5min charts, swing-traders can use the daily charts.
• This strategy has been designed to identify the most promising, highest probability entries and trades for each stock or other financial security.
• The combination of the qualifiers results in a highly selective strategy which only considers the most promising swing-trading entries. As a result, you will normally only find a low number of trades for each stock or other financial security per year in case you apply this strategy for the daily charts. Shorter timeframes will result in a higher number of trades / year.
• Consequently, traders need to apply this strategy for a full watchlist rather than just one financial security.
Advanced VWAP_Pullback Strategy_Trend-Template QualifierGeneral Description and Unique Features of this Script
Introducing the Advanced VWAP Momentum-Pullback Strategy (long-only) that offers several unique features:
1. Our script/strategy utilizes Mark Minervini's Trend-Template as a qualifier for identifying stocks and other financial securities in confirmed uptrends. Mark Minervini, a 2x US Investment Champion, developed the Trend-Template, which covers eight different and independent characteristics that can be adjusted and optimized in this trend-following strategy to ensure the best results. The strategy will only trigger buy-signals in case the optimized qualifiers are being met.
2. Our strategy is based on the supply/demand balance in the market, making it timeless and effective across all timeframes. Whether you are day trading using 1- or 5-min charts or swing-trading using daily charts, this strategy can be applied and works very well.
3. We have also integrated technical indicators such as the RSI and the MA / VWAP crossover into this strategy to identify low-risk pullback entries in the context of confirmed uptrends. By doing so, the risk profile of this strategy and drawdowns are being reduced to an absolute minimum.
Minervini’s Trend-Template and the ‘Stage-Analysis’ of the Markets
This strategy is a so-called 'long-only' strategy. This means that we only take long positions, short positions are not considered.
The best market environment for such strategies are periods of stable upward trends in the so-called stage 2 - uptrend.
In stable upward trends, we increase our market exposure and risk.
In sideways markets and downward trends or bear markets, we reduce our exposure very quickly or go 100% to cash and wait for the markets to recover and improve. This allows us to avoid major losses and drawdowns.
This simple rule gives us a significant advantage over most undisciplined traders and amateurs!
'The Trend is your Friend'. This is a very old but true quote.
What's behind it???
• 98% of stocks made their biggest gains in a Phase 2 upward trend.
• If a stock is in a stable uptrend, this is evidence that larger institutions are buying the stock sustainably.
• By focusing on stocks that are in a stable uptrend, the chances of profit are significantly increased.
• In a stable uptrend, investors know exactly what to expect from further price developments. This makes it possible to locate low-risk entry points.
The goal is not to buy at the lowest price – the goal is to buy at the right price!
Each stock goes through the same maturity cycle – it starts at stage 1 and ends at stage 4
Stage 1 – Neglect Phase – Consolidation
Stage 2 – Progressive Phase – Accumulation
Stage 3 – Topping Phase – Distribution
Stage 4 – Downtrend – Capitulation
This strategy focuses on identifying stocks in confirmed stage 2 uptrends. This in itself gives us an advantage over long-term investors and less professional traders.
By focusing on stocks in a stage 2 uptrend, we avoid losses in downtrends (stage 4) or less profitable consolidation phases (stages 1 and 3). We are fully invested and put our money to work for us, and we are fully invested when stocks are in their stage 2 uptrends.
But how can we use technical chart analysis to find stocks that are in a stable stage 2 uptrend?
Mark Minervini has developed the so-called 'trend template' for this purpose. This is an essential part of our JS-TechTrading pullback strategy. For our watchlists, only those individual values that meet the tough requirements of Minervini's trend template are eligible.
The Trend Template
• 200d MA increasing over a period of at least 1 month, better 4-5 months or longer
• 150d MA above 200d MA
• 50d MA above 150d MA and 200d MA
• Course above 50d MA, 150d MA and 200d MA
• Ideally, the 50d MA is increasing over at least 1 month
• Price at least 25% above the 52w low
• Price within 25% of 52w high
• High relative strength according to IBD.
NOTE: In this basic version of the script, the Trend-Template has to be used as a separate indicator on TradingView (Public Trend-Template indicators are available in TradingView – community scripts). It is recommended to only execute buy signals in case the stock or financial security is in a stage 2 uptrend, which means that the criteria of the trend-template are fulfilled.
This strategy can be applied to all timeframes from 5 min to daily.
The VWAP Momentum-Pullback Strategy
For the JS-TechTrading VWAP Momentum-Pullback Strategy, only stocks and other financial instruments that meet the selected criteria of Mark Minervini's trend template are recommended for algorithmic trading with this startegy.
A further prerequisite for generating a buy signals is that the individual value is in a short-term oversold state (RSI).
When the selling pressure is over and the continuation of the uptrend can be confirmed by the MA / VWAP crossover after reaching a price low, a buy signal is issued by this strategy.
Stop-loss limits and profit targets can be set variably. You also have the option to make use of the trailing stop exit strategy.
Relative Strength Index (RSI)
The Relative Strength Index (RSI) is a technical indicator developed by Welles Wilder in 1978. The RSI is used to perform a market value analysis and identify the strength of a trend as well as overbought and oversold conditions. The indicator is calculated on a scale from 0 to 100 and shows how much an asset has risen or fallen relative to its own price in recent periods.
The RSI is calculated as the ratio of average profits to average losses over a certain period of time. A high value of the RSI indicates an overbought situation, while a low value indicates an oversold situation. Typically, a value > 70 is considered an overbought threshold and a value < 30 is considered an oversold threshold. A value above 70 signals that a single value may be overvalued and a decrease in price is likely , while a value below 30 signals that a single value may be undervalued and an increase in price is likely.
For example, let's say you're watching a stock XYZ. After a prolonged falling movement, the RSI value of this stock has fallen to 26. This means that the stock is oversold and that it is time for a potential recovery. Therefore, a trader might decide to buy this stock in the hope that it will rise again soon.
The MA / VWAP Crossover Trading Strategy
This strategy combines two popular technical indicators: the Moving Average (MA) and the Volume Weighted Average Price (VWAP). The MA VWAP crossover strategy is used to identify potential trend reversals and entry/exit points in the market.
The VWAP is calculated by taking the average price of an asset for a given period, weighted by the volume traded at each price level. The MA, on the other hand, is calculated by taking the average price of an asset over a specified number of periods. When the MA crosses above the VWAP, it suggests that buying pressure is increasing, and it may be a good time to enter a long position. When the MA crosses below the VWAP, it suggests that selling pressure is increasing, and it may be a good time to exit a long position or enter a short position.
Traders typically use the MA VWAP crossover strategy in conjunction with other technical indicators and fundamental analysis to make more informed trading decisions. As with any trading strategy, it is important to carefully consider the risks and potential rewards before making any trades.
This strategy is applicable to all timeframes and the relevant parameters for the underlying indicators (RSI and MA/VWAP) can be adjusted and optimized as needed.
Backtesting
Backtesting gives outstanding results on all timeframes and drawdowns can be reduced to a minimum level. In this example, the hourly chart for MCFT has been used.
Settings for backtesting are:
- Period from Jan 2020 until March 2023
- Starting capital 100k USD
- Position size = 25% of equity
- 0.01% commission = USD 2.50.- per Trade
- Slippage = 2 ticks
Other comments
- This strategy has been designed to identify the most promising, highest probability entries and trades for each stock or other financial security.
- The combination of the Trend-Template and the RSI qualifiers results in a highly selective strategy which only considers the most promising swing-trading entries. As a result, you will normally only find a low number of trades for each stock or other financial security per year in case you apply this strategy for the daily charts. Shorter timeframes will result in a higher number of trades / year.
- Consequently, traders need to apply this strategy for a full watchlist rather than just one financial security.
JS-TechTrading: VWAP Momentum_Pullback StrategyGeneral Description and Unique Features of this Script
Introducing the VWAP Momentum-Pullback Strategy (long-only) that offers several unique features:
1. Our script/strategy utilizes Mark Minervini's Trend-Template as a qualifier for identifying stocks and other financial securities in confirmed uptrends.
NOTE: In this basic version of the script, the Trend-Template has to be used as a separate indicator on TradingView (Public Trend-Template indicators are available on TradingView – community scripts). It is recommended to only execute buy signals in case the stock or financial security is in a stage 2 uptrend, which means that the criteria of the trend-template are fulfilled.
2. Our strategy is based on the supply/demand balance in the market, making it timeless and effective across all timeframes. Whether you are day trading using 1- or 5-min charts or swing-trading using daily charts, this strategy can be applied and works very well.
3. We have also integrated technical indicators such as the RSI and the MA / VWAP crossover into this strategy to identify low-risk pullback entries in the context of confirmed uptrends. By doing so, the risk profile of this strategy and drawdowns are being reduced to an absolute minimum.
Minervini’s Trend-Template and the ‘Stage-Analysis’ of the Markets
This strategy is a so-called 'long-only' strategy. This means that we only take long positions, short positions are not considered.
The best market environment for such strategies are periods of stable upward trends in the so-called stage 2 - uptrend.
In stable upward trends, we increase our market exposure and risk.
In sideways markets and downward trends or bear markets, we reduce our exposure very quickly or go 100% to cash and wait for the markets to recover and improve. This allows us to avoid major losses and drawdowns.
This simple rule gives us a significant advantage over most undisciplined traders and amateurs!
'The Trend is your Friend'. This is a very old but true quote.
What's behind it???
• 98% of stocks made their biggest gains in a Phase 2 upward trend.
• If a stock is in a stable uptrend, this is evidence that larger institutions are buying the stock sustainably.
• By focusing on stocks that are in a stable uptrend, the chances of profit are significantly increased.
• In a stable uptrend, investors know exactly what to expect from further price developments. This makes it possible to locate low-risk entry points.
The goal is not to buy at the lowest price – the goal is to buy at the right price!
Each stock goes through the same maturity cycle – it starts at stage 1 and ends at stage 4
Stage 1 – Neglect Phase – Consolidation
Stage 2 – Progressive Phase – Accumulation
Stage 3 – Topping Phase – Distribution
Stage 4 – Downtrend – Capitulation
This strategy focuses on identifying stocks in confirmed stage 2 uptrends. This in itself gives us an advantage over long-term investors and less professional traders.
By focusing on stocks in a stage 2 uptrend, we avoid losses in downtrends (stage 4) or less profitable consolidation phases (stages 1 and 3). We are fully invested and put our money to work for us, and we are fully invested when stocks are in their stage 2 uptrends.
But how can we use technical chart analysis to find stocks that are in a stable stage 2 uptrend?
Mark Minervini has developed the so-called 'trend template' for this purpose. This is an essential part of our JS-TechTrading pullback strategy. For our watchlists, only those individual values that meet the tough requirements of Minervini's trend template are eligible.
The Trend Template
• 200d MA increasing over a period of at least 1 month, better 4-5 months or longer
• 150d MA above 200d MA
• 50d MA above 150d MA and 200d MA
• Course above 50d MA, 150d MA and 200d MA
• Ideally, the 50d MA is increasing over at least 1 month
• Price at least 25% above the 52w low
• Price within 25% of 52w high
• High relative strength according to IBD.
NOTE: In this basic version of the script, the Trend-Template has to be used as a separate indicator on TradingView (Public Trend-Template indicators are available in TradingView – community scripts). It is recommended to only execute buy signals in case the stock or financial security is in a stage 2 uptrend, which means that the criteria of the trend-template are fulfilled.
This strategy can be applied to all timeframes from 5 min to daily.
The VWAP Momentum-Pullback Strateg y
For the JS-TechTrading VWAP Momentum-Pullback Strategy, only stocks and other financial instruments that meet the selected criteria of Mark Minervini's trend template are recommended for algorithmic trading with this startegy.
A further prerequisite for generating a buy signals is that the individual value is in a short-term oversold state (RSI).
When the selling pressure is over and the continuation of the uptrend can be confirmed by the MA / VWAP crossover after reaching a price low, a buy signal is issued by this strategy.
Stop-loss limits and profit targets can be set variably.
Relative Strength Index (RSI)
The Relative Strength Index (RSI) is a technical indicator developed by Welles Wilder in 1978. The RSI is used to perform a market value analysis and identify the strength of a trend as well as overbought and oversold conditions. The indicator is calculated on a scale from 0 to 100 and shows how much an asset has risen or fallen relative to its own price in recent periods.
The RSI is calculated as the ratio of average profits to average losses over a certain period of time. A high value of the RSI indicates an overbought situation, while a low value indicates an oversold situation. Typically, a value > 70 is considered an overbought threshold and a value < 30 is considered an oversold threshold. A value above 70 signals that a single value may be overvalued and a decrease in price is likely , while a value below 30 signals that a single value may be undervalued and an increase in price is likely.
For example, let's say you're watching a stock XYZ. After a prolonged falling movement, the RSI value of this stock has fallen to 26. This means that the stock is oversold and that it is time for a potential recovery. Therefore, a trader might decide to buy this stock in the hope that it will rise again soon.
The MA / VWAP Crossover Trading Strategy
This strategy combines two popular technical indicators: the Moving Average (MA) and the Volume Weighted Average Price (VWAP). The MA VWAP crossover strategy is used to identify potential trend reversals and entry/exit points in the market.
The VWAP is calculated by taking the average price of an asset for a given period, weighted by the volume traded at each price level. The MA, on the other hand, is calculated by taking the average price of an asset over a specified number of periods. When the MA crosses above the VWAP, it suggests that buying pressure is increasing, and it may be a good time to enter a long position. When the MA crosses below the VWAP, it suggests that selling pressure is increasing, and it may be a good time to exit a long position or enter a short position.
Traders typically use the MA VWAP crossover strategy in conjunction with other technical indicators and fundamental analysis to make more informed trading decisions. As with any trading strategy, it is important to carefully consider the risks and potential rewards before making any trades.
This strategy is applicable to all timeframes and the relevant parameters for the underlying indicators (RSI and MA/VWAP) can be adjusted and optimized as needed.
Backtesting
Backtesting gives outstanding results on all timeframes and drawdowns can be reduced to a minimum level. In this example, the hourly chart for MCFT has been used.
Settings for backtesting are:
- Period from April 2020 until April 2021 (1 yr)
- Starting capital 100k USD
- Position size = 25% of equity
- 0.01% commission = USD 2.50.- per Trade
- Slippage = 2 ticks
Other comments
• This strategy has been designed to identify the most promising, highest probability entries and trades for each stock or other financial security.
• The RSI qualifier is highly selective and filters out the most promising swing-trading entries. As a result, you will normally only find a low number of trades for each stock or other financial security per year in case you apply this strategy for the daily charts. Shorter timeframes will result in a higher number of trades / year.
• As a result, traders need to apply this strategy for a full watchlist rather than just one financial security.
Fair Value Strategy - ekmllThis is a strategy using SPX's Fair Value derived from Net Liquidity.
The main difference between this one and calebsandfort's one is net liquidity values in this one are calculated in TradingView and doesn't need author's daily library updates to function.
Net Liquidity function is simply: Fed Balance Sheet - Treasury General Account - Reverse Repo Balance
Formula for calculating the fair value of and Index using Net Liquidity looks like this: (WALCL - WTREGEN - RRPONTSYD)/1000000000/scalar - subtractor
The Index Fair Value is then subtracted from the Index value which creates an oscillating diff value.
When diff is greater than the overbought threshold, Index is considered overbought and we go short/sell.
When diff is less than the oversold signal, Index is considered oversold and we cover/buy.
Parameters:
Index: SPX, NDX, RUT
Strategy: Short Only, Long Only, Long/Short
Inverse (bool): check if using an inverse ETF to go long instead of short.
Scalar (float)
Subtractor (int)
Overbought Threshold (int)
Oversold Threshold (int)
Start After Date: When the strategy should start trading
Close Date: Day to close open trades. I just like it to get complete results rather than the strategy ending with open trades.
I've optimized the parameters for SPX.