Scalp Slayer (i)📊 The Foundation: Core Parameters and Inputs
Filter Number: This parameter is the cornerstone of the script’s sensitivity control. It adjusts the threshold for market volatility that the script considers significant enough for a trade. By default, it's set to 1.5, striking a balance between aggressiveness and conservatism. Traders can tweak this number to make the script more or less sensitive to price fluctuations. A higher number captures smaller, more frequent price movements, ideal for an aggressive trading style. Conversely, a lower number filters out minor noise, focusing on more substantial movements.
EMA Trend Period: The Exponential Moving Average (EMA) is critical for identifying the market's direction. The script uses an EMA calculated over a default period of 50 bars to discern whether the market is trending up or down. This helps in making decisions that align with the overall market trend, thereby increasing the likelihood of successful trades.
Lookback Period: This parameter, set to 20 periods by default, is used to calculate recent highs and lows. These values are crucial for setting realistic take profit and stop-loss levels, as they reflect recent market behavior. The lookback period helps the script adapt to current market conditions by analyzing recent price actions to identify key support and resistance levels.
Color Settings: For enhanced visualization, the script allows customization of colors for take profit and stop-loss markers. By default, take profit levels are marked in orange, and stop-loss levels in red. This color coding helps traders quickly identify important levels on the chart.
Visibility Controls: The script includes options to toggle the display of buy and sell labels, as well as to enable or disable strategy plotting for backtesting and real-time analysis. These controls help traders tailor the script’s visual output to their preferences, making it easier to focus on key trading signals.
🛠️ The Mechanics: How "Scalp Slayer (i)" Operates
1. Calculating the Trading Range and Trend EMA
True Range Calculation: The script begins by calculating the true range, which is the difference between the high and low prices of a bar. This measure of volatility is crucial for identifying significant price movements.
EMA of True Range: The script then smooths the true range using an Exponential Moving Average (EMA). This helps filter out minor price fluctuations, ensuring that the script only reacts to meaningful changes in price. The sensitivity of this filter is adjusted by the filter number, which multiplies the EMA to fine-tune the script's responsiveness to price changes.
Trend EMA: To determine the market’s trend, the script calculates an EMA over the close prices for the specified trend period (default is 50). This trend EMA acts as a benchmark for identifying whether the market is trending up or down. The script uses this trend filter to ensure trades are made in the direction of the prevailing market trend, thereby reducing the risk of trading against the trend.
2. Identifying Recent Highs and Lows
Recent Highs and Lows: The script uses the lookback period to identify the highest and lowest prices over a set number of bars. These recent highs and lows serve as reference points for setting take profit and stop-loss levels. By analyzing recent price action, the script ensures that these levels are relevant to current market conditions, providing a dynamic and contextually accurate approach to risk management.
🔄 Strategic Entry and Exit Conditions
3. Defining Buy and Sell Conditions
Buy Condition: The script establishes a set of criteria for entering a buy trade. First, the closing price must be above the trend EMA, indicating an upward trend. Additionally, the script looks for a sequence of candles showing progressively higher closes, signifying strong upward momentum. The current trading range must exceed the EMA of the true range, confirming that the market is experiencing significant movement. This combination of trend alignment and momentum ensures that buy trades are placed in favorable market conditions.
Sell Condition: Similarly, for sell trades, the script requires the closing price to be below the trend EMA, indicating a downward trend. It also checks for a sequence of candles with progressively lower closes, indicating strong downward momentum. The trading range must again exceed the EMA of the true range, ensuring that the market is moving significantly. These conditions help ensure that sell trades are only taken when the market is likely to continue moving downwards, increasing the chances of profitable trades.
4. Executing Trades and Setting Profit Targets
Long Entry: When the buy condition is met, the script enters a long position at the closing price of the confirmation bar. It then sets a take profit level at the recent high, which serves as a realistic target based on recent price action. The stop-loss level is set at the recent low, providing a safety net against adverse price movements. This approach ensures that trades are closed at optimal points, maximizing profit while minimizing risk.
Short Entry: When the sell condition is met, the script enters a short position at the closing price of the confirmation bar. The take profit level is set at the recent low, and the stop-loss level is set at the recent high. This setup ensures that short trades are closed at favorable levels, capturing gains while protecting against potential losses.
5. Managing Take Profit and Stop Loss
Take Profit and Stop Loss Mechanism: The script continually monitors the market for conditions that meet the take profit or stop-loss criteria. For long trades, the script closes the position if the price reaches or exceeds the take profit level, ensuring profits are locked in. It also closes the position if the price drops to or below the stop-loss level, preventing further losses. For short trades, the script closes the position if the price drops to or below the take profit level, or rises to or above the stop-loss level. This dynamic management of trades helps ensure that profits are maximized while risks are minimized.
🌟 Enhanced Visuals and Debugging Features
Customizable and Informative Plots
Buy and Sell Labels: The script includes options to display labels for buy and sell signals on the chart. These labels provide clear visual cues for trading opportunities, making it easy to identify entry points at a glance. Traders can customize the visibility of these labels based on their preferences, helping them focus on the most important signals.
Take Profit and Stop Loss Markers: To aid in monitoring trades, the script displays distinctive markers for take profit and stop-loss levels. These markers are color-coded for easy differentiation and are placed on the chart to provide clear indications of where trades are likely to be closed. This visual representation helps traders quickly assess the status of their trades and make informed decisions.
Trend and Price Plots: The script plots the trend EMA and recent highs/lows on the chart for quick reference. These plots provide a visual representation of key levels and trends, helping traders make more informed decisions based on current market conditions. By displaying these critical levels, the script enhances situational awareness and aids in the decision-making process.
Debugging and Validation Tools
Bar Index Plotting: For those interested in validating the script's performance, the script includes options to plot the bar index. This feature allows traders to monitor the script's behavior in real-time, ensuring that it is functioning as expected. This can be particularly useful for debugging and optimizing the script.
Condition Printing: The script also includes options to print detailed information about take profit and stop-loss conditions. This feature provides insights into the script's decision-making process, helping traders understand why certain trades were executed or closed. By providing transparency into the script's logic, this feature aids in fine-tuning and improving the script's performance.
Chart patterns
CE_ZLSMA_5MIN_CANDLECHART-- Overview
The "CE_ZLSMA_5MIN_CANDLECHART" strategy, developed by DailyPanda, is a comprehensive trading strategy designed for analyzing trading on 5-minute candlestick charts.
It aims to use some indicators calculated from a Hekin Ashi chart, while running it on a normal candlestick chart, making sure that no price distortion affects the strategy results .
It also brings a feature to show, on the candlestick chart, where the entries would take place on the HA chart, to also be able to study the effect that the price distortion would make on your backtest.
-- Credit
The code in this script is based on open-source indicators originally written by veryfid and everget, I've made significant changes and additions to the scripts but all credit for the idea goes to them, I just built on top of it:
-- Key Features
It incorporate already built indicators (ZLSMA) and CandelierExit (CE)
-- Zero Lag Least Squares Moving Average (ZLSMA) - by veryfid
The ZLSMA is used to detect trends with minimal lag, improving the accuracy of entry and exit signals.
It incorporates a double-smoothed linear regression to minimize lag and enhance trend-following capabilities.
Buy signals are generated when the price closes above the ZLSMA together with the CE signal.
It is calculated based on the HA candlestick pattern.
-- Chandelier Exit (CE) - by everget
The Chandelier Exit indicator is used to dynamically manage stop-loss levels based on the Average True Range (ATR).
It ensures that stop-loss levels are adaptive to market volatility, protecting profits and limiting losses.
The ATR period and multiplier can be customized to fit different trading styles and risk tolerances.
It is calculated based on the HA candlestick pattern.
-- Heikin Ashi Candles
The strategy leverages Heikin Ashi candlesticks to be able identify trends more clearly and leverage this to stay on winning trades longer.
Traders can choose to display Heikin Ashi candlesticks and order fills on the chart for better visualization.
-- Risk Management
The strategy includes multiple risk management options to protect traders' capital.
Maximum intraday loss limit based on a percentage of equity.
Maximum stop-loss in points to filter out entries with excessive risk.
Daily profit target to stop trading once the goal is achieved.
Options to use fixed contract sizes or dynamically adjust based on a percentage of equity.
These features help traders manage risk and ensure sustainable trading practices.
Moving Averages
Several moving averages (EMA 9, EMA 20, EMA 50, EMA 72, EMA 200, SMA 200, and SMA 500) are plotted to provide additional context and trend confirmation.
A "Zone of Value" is highlighted between the EMA 200 and SMA 200 to identify potential support and resistance areas.
-- Customizable Inputs
The strategy includes various customizable inputs, allowing traders to tailor it to their specific needs.
Start and stop trading times.
Risk management parameters (e.g., maximum stop-loss, daily drawdown limit, and daily profit target).
Display options for Heikin Ashi candles and moving averages.
ZLSMA length and offset.
-- Usage
-- Setting Up the Strategy
Configure the start year for the strategy and the trading hours using the input fields. The first candle of each day will be filled black for easy identification, while candles that are outside the allowed time range will be filled purple.
Customize the risk management parameters to match your risk tolerance and trading style.
Enable or disable the display of Heikin Ashi candlesticks and moving averages as desired.
-- Interpreting Signals
Buy signals are indicated by a "Buy" label when the Heikin Ashi close price is above the ZLSMA and the Chandelier Exit indicates a long position.
The strategy will automatically enter a long position with a stop-loss level determined the swing low.
Positions are closed when the close price falls below the ZLSMA.
-- Risk Management
The strategy monitors the maximum intraday loss and stops trading if the loss limit is reached.
If enabled, also stops trading once the daily profit target is achieved, helping to lock in gains.
You have the option to filter operations based on a maximum accepted stop-loss level, based on your risk tolerance.
You can also operate with a fixed amount of contracts or dynamically adjust it based on your allowed risk per trade, ensuring optimal protection of capital.
-- Visual Aids
The strategy plots various moving averages to provide additional trend context.
The "Zone of Value" between the EMA 200 and SMA 200 highlights potential support and resistance areas.
Heikin Ashi candlesticks and order fills can be displayed to enhance the difference this strategy would take if you were to backtest it on a Heikin Ashi chart.
-- Table of results
This strategy also breaks down the results on a monthly basis for better understanding of your capital development along the way.
-- Conclusion
The "CE_ZLSMA_5MIN_CANDLECHART" strategy is a tool for intraday traders looking to understand and leaverage the Heikin Ashi chart while still using the normal candle chart. Traders can customize the strategy to fit their specific needs, making it a versatile addition to any trading toolkit.
Smart Money Concept Strategy - Uncle SamThis strategy combines concepts from two popular TradingView scripts:
Smart Money Concepts (SMC) : The strategy identifies key levels in the market (swing highs and lows) and draws trend lines to visualize potential breakouts. It uses volume analysis to gauge the strength of these breakouts.
Smart Money Breakouts : This part of the strategy incorporates the idea of "Smart Money" – institutional traders who often lead market movements. It looks for breakouts of established levels with significant volume, aiming to catch the beginning of new trends.
How the Strategy Works:
Identification of Key Levels: The script identifies swing highs and swing lows based on a user-defined lookback period. These levels are considered significant points where price has reversed in the past.
Drawing Trend Lines: Trend lines are drawn connecting these key levels, creating a visual representation of potential support and resistance zones.
Volume Analysis: The script analyzes the volume during the formation of these levels and during breakouts. Higher volume suggests stronger moves and increases the probability of a successful breakout.
Entry Conditions:
Long Entry: A long entry is triggered when the price breaks above a resistance line with significant volume, and the moving average trend filter (optional) is bullish.
Short Entry: A short entry is triggered when the price breaks below a support line with significant volume, and the moving average trend filter (optional) is bearish.
Exit Conditions:
Stop Loss: Customizable stop loss percentages are implemented to protect against adverse price movements.
Take Profit: Customizable take profit percentages are used to lock in profits.
Credits and Compliance:
This strategy is inspired by the concepts and code from "Smart Money Concepts (SMC) " and "Smart Money Breakouts ." I've adapted and combined elements of both scripts to create this strategy. Full credit is given to the original authors for their valuable contributions to the TradingView community.
To comply with TradingView's House Rules, I've made the following adjustments:
Clearly Stated Inspiration: The description explicitly mentions the original scripts and authors as the inspiration for this strategy.
No Direct Copying: The code has been modified and combined, not directly copied from the original scripts.
Educational Purpose: The primary purpose of this strategy is for learning and backtesting. It's not intended as financial advice.
Important Note:
This strategy is intended for educational and backtesting purposes only. It should not be used for live trading without thorough testing and understanding of the underlying concepts. Past performance is not indicative of future results.
Mateo's Time of Day Analysis LEThis strategy takes a trade every day at a specified time and then closes it at a specified time.
The purpose of this strategy is to help determine if there are better times to day to buy or sell.
I was originally inspired to write this when a YouTuber stated that SPX had been up during the last 30 minutes of the day over 80% of the time the past year. No matter who says it, test it, and in my opinion, TradingView is one of the easiest placed to do that! Unfortunately, that particular claim did not turn out to be accurate, but this tool remains for those who want to optimize timing their entries and exits at specific times of day.
Multi-Timeframe Trend Following with 200 EMA Filter - Longs OnlyOverview
This strategy is designed to trade long positions based on multiple timeframe Exponential Moving Averages (EMAs) and a 200 EMA filter. The strategy ensures that trades are only entered in strong uptrends and aims to capitalize on sustained upward movements while minimizing risk with a defined stop-loss and take-profit mechanism.
Key Components
Initial Capital and Position Sizing
Initial Capital: $1000.
Lot Size: 1 unit per trade.
Inputs
Fast EMA Length (fast_length): The period for the fast EMA.
Slow EMA Length (slow_length): The period for the slow EMA.
200 EMA Length (filter_length_200): Set to 200 periods for the primary trend filter.
Stop Loss Percentage (stop_loss_perc): Set to 1% of the entry price.
Take Profit Percentage (take_profit_perc): Set to 3% of the entry price.
Timeframes and EMAs
EMAs are calculated for the following timeframes using the request.security function:
5-minute: Short-term trend detection.
15-minute: Intermediate-term trend detection.
30-minute: Long-term trend detection.
The strategy also calculates a 200-period EMA on the 5-minute timeframe to serve as a primary trend filter.
Trend Calculation
The strategy determines the trend for each timeframe by comparing the fast and slow EMAs:
If the fast EMA is above the slow EMA, the trend is considered positive (1).
If the fast EMA is below the slow EMA, the trend is considered negative (-1).
Combined Trend Signal
The combined trend signal is derived by summing the individual trends from the 5-minute, 15-minute, and 30-minute timeframes.
A combined trend value of 3 indicates a strong uptrend across all timeframes.
Any combined trend value less than 3 indicates a weakening or negative trend.
Entry and Exit Conditions
Entry Condition:
A long position is entered if:
The combined trend signal is 3 (indicating a strong uptrend across all timeframes).
The current close price is above the 200 EMA on the 5-minute timeframe.
Exit Condition:
The long position is exited if:
The combined trend signal is less than 3 (indicating a weakening trend).
The current close price falls below the 200 EMA on the 5-minute timeframe.
Stop Loss and Take Profit
Stop Loss: Set at 1% below the entry price.
Take Profit: Set at 3% above the entry price.
These levels are automatically set when entering a trade using the strategy.entry function with stop and limit parameters.
Plotting
The strategy plots the fast and slow EMAs for the 5-minute timeframe and the 200 EMA for visual reference on the chart:
Fast EMA (5-min): Plotted in blue.
Slow EMA (5-min): Plotted in red.
200 EMA (5-min): Plotted in green.
RSI and ATR Trend Reversal SL/TPQuick History:
I was frustrated with a standard fixed percent TP/SL as they often were not receptive to quick market rallies/reversals. I developed this TP/SL and eventually made it into a full fledge strategy and found it did well enough to publish. This strategy can be used as a standalone or tacked onto another strategy as a TP/SL. It does function as both with a single line. This strategy has been tested with TSLA , AAPL, NVDA, on the 15 minutes timeframe.
HOW IT WORKS:
Inputs:
Length: Simple enough, it determines the length of the RSI and ATR used.
Multiplier: This multiplies the RSI and ATR calculation, more on this later.
Delay to prevent Idealization: TradingView will use the open of the bar the strategy triggers on when calculating the backtest. This can produce unrealistic results depending on the source. If your source is open, set to 0, if anything else, set to 1.
Minimum Difference: This is essentially a traditional SL/TP, it is borderline unnecessary, but if the other parameters are wacky this can be used to ensure the SL/TP. It multiplies the source by the percent, so if it is set to 10, the SL/TP is initialized at src +- 10%.
Source input: Self Explanatory, be sure to update the Delay if you use open.
CALCULATION:
Parameters Initialization:
The strategy uses Heikinashi values for calculations, this is not toggleable in parameters, but can be easily changed by changing hclose to equal src.
FUNCTION INITIALIZATION:
highest_custom and lowest_custom do the same thing as ta.highest and ta.lowest, however the built in ta library does not allow for var int input, so I had to create my own functions to be used here. I actually developed these years ago and have used them in almost every strategy since. Feel especially free to use these in your own scripts.
The rsilev is where the magic happens.
SL/TP min/max are initially calculated to be used later.
Then we begin by establishing variables.
BullGuy is used to determine the length since the last crossup or crossdown, until one happens, it returns na, breaking the function. BearGuy is used in all the calculations, and is the same as BullGuy, unless BullGuy is na, where BearGuy counts up from 1 on each bar from 0.
We create our rsi and have to modify the second one to suit the function. In the case of the upper band, we mirror the lower one. So if the RSI is 80, we want it to be 20 on the upper band.
the upper band and lower band are calculated the exact same way, but mirrored. For the purpose of writing, I'm going to talk about the lower band. Assume everything is mirrored for the upper one. It finds the highest source since the last crossup or crossdown. It then multiplies from 1 / the RSI, this means that a rapid RSI increase will increase the band dramatically, so it is able to capture quick rally/reversals. We add this to the atr to source ratio, as the general volatility is a massive factor to be included. We then multiply this number by our chosen amount, and subtract it from the highest source, creating the band.
We do this same process but mirrored with both bands and compared it to the source. If the source is above the lower band, it suggests an uptrend, so the lower band is outputted, and vice versa for the upper one.
PLOTTING:
We also determine the line color in the same manner as we do the trend direction.
STRATEGY:
We then use the source again, and if it crosses up or down relative to the selected band, we enter a long or short respectively.
This may not be the most superb independent strategy, but it can be very useful as a TP/SL for your chosen entry conditions, especially in volatile markets or tickers.
Thank you for taking the time to read, and please enjoy.
ORB Heikin Ashi SPY 5min Correlation StrategyOverview:
The ORB (Opening Range Breakout) strategy combined with Heikin Ashi candles and Relative Volume (RVOL) indicator aims to capitalize on significant price movements that occur shortly after the market opens. This strategy identifies breakouts above or below the opening range, using Heikin Ashi candles for smoother price visualization and RVOL to gauge the strength of the breakout.
Components:
Opening Range Breakout (ORB): The strategy starts by defining the opening range, typically the first few minutes of the trading session. It then identifies breakouts above the high or below the low of this range as potential entry points.
Heikin Ashi Candles: Heikin Ashi candles are used to provide a smoother representation of price movements compared to traditional candlesticks. By averaging open, close, high, and low prices of the previous candle, Heikin Ashi candles reduce noise and highlight trends more effectively.
Relative Volume (RVOL): RVOL compares the current volume of a stock to its average volume over a specified period. It helps traders identify abnormal trading activity, which can signal potential price movements.
Candle for correlation : In this case we are using SPY candles. It can also use different asset
Strategy Execution:
Initialization: The strategy initializes by setting up variables and parameters, including the ORB period, session timings, and Heikin Ashi candle settings.
ORB Calculation: It calculates the opening range by identifying the high and low prices during the specified session time. These values serve as the initial reference points for potential breakouts. For this we are looking for the first 30 min of the US opening session.
After that we are going to use the next 2 hours to check for breakout opportunities.
Heikin Ashi Transformation: Optionally, the strategy transforms traditional candlestick data into Heikin Ashi format for smoother visualization and trend identification.
Breakout Identification: It continuously monitors price movements within the session and checks if the current high breaches the ORB high or if the current low breaches the ORB low. These events trigger potential long or short entry signals, respectively.
RVOL Analysis: Simultaneously, the strategy evaluates the relative volume of the asset to gauge the strength of the breakout. A surge in volume accompanying the breakout confirms the validity of the signal. In this case we are looking for at least a 1 value of the division between currentVolume and pastVolume
Entry and Exit Conditions: When a breakout occurs and is confirmed by RVOL and is within our session time, the strategy enters a long or short position accordingly. It does not have a stop loss or a takie profit level, instead it will always exit at the end of the trading session, 5 minutes before
Position Sizing and Commissions: For the purpose of this backtest, the strategy allocated 10% of the capital for each trade and assumes a trading commission of 0.01$ per share ( twice the IBKR broker values)
Session End: At the end of the trading session, the strategy closes all open positions to avoid overnight exposure.
Conclusion:
The combination of ORB breakout strategy, Heikin Ashi candles, and RVOL provides traders with a robust framework for identifying and capitalizing on early trends in the market. By leveraging these technical indicators together, traders can make more informed decisions and improve the overall performance of their trading strategies. However, like any trading strategy, it's essential to backtest thoroughly and adapt the strategy to different market conditions to ensure its effectiveness over time.
Big RunnerPresenting the "Big Runner" technique, dubbed "Sprinter," which is intended to help traders looking for momentum chances recognise important market swings. This approach maximises profit potential while controlling risk by using trend ribbons and moving averages to identify entry and exit locations.
Important characteristics:
Moving Averages: To determine the direction of the underlying trend, moving averages, both rapid and slow, are used. Depending on their preferred trading strategy, traders can alter the duration of these averages.
Trend Ribbon: Shows phases of bullish and bearish momentum by using a ribbon indicator to visualise the strength of the trend. Trend transitions are simple to spot for traders so they can make wise decisions.
Buy and Sell Signals: This tool generates buy and sell signals that indicate possible entry and exit opportunities based on the crossing and crossunder of moving averages.
Stop Loss/Take Profit Management: This feature enables traders to successfully apply risk management methods by giving them the ability to set stop loss and take profit levels as a percentage of the entry price.
Dynamic Position Sizing: Optimises capital allocation for every trade by dynamically calculating position size depending on leverage and portfolio proportion.
Implementation:
Long Entry: Started when a bullish trend is indicated by a price cross above the fast and slow moving averages. To control risk and lock in earnings, stop loss and take profit thresholds are established appropriately.
Short Entry: Indicates a bearish trend when the price crosses below both moving averages. The concepts of risk management are similar, with dynamic calculations used to determine take-profit and stop-loss levels.
Extra Personalisation:
Take Profit/Stop Loss Management: Provides the ability to select a take profit and stop loss
API Integration: This feature improves execution flexibility and efficiency by enabling traders to include custom parameters for automated trading.
Notice:
Trading entails risk, and performances in the past do not guarantee future outcomes. Before making any trades with this approach, careful analysis and risk management are necessary.
In summary:
By integrating risk management procedures with technical indicators, the "Big Runner" strategy provides a thorough method for identifying noteworthy market changes and achieving the best possible trading results. Traders can adjust parameters to suit their interests and style of trading, giving them the confidence to traverse volatile market situations.
The Flash-Strategy with Minervini Stage Analysis QualifierThe Flash-Strategy (Momentum-RSI, EMA-crossover, ATR) with Minervini Stage Analysis Qualifier
Introduction
Welcome to a comprehensive guide on a cutting-edge trading strategy I've developed, designed for the modern trader seeking an edge in today's dynamic markets. This strategy, which I've honed through my years of experience in the trading arena, stands out for its unique blend of technical analysis and market intuition, tailored specifically for use on the TradingView platform.
As a trader with a deep passion for the financial markets, my journey began several years ago, driven by a relentless pursuit of a trading methodology that is both effective and adaptable. My background in trading spans various market conditions and asset classes, providing me with a rich tapestry of experiences from which to draw. This strategy is the culmination of that journey, embodying the lessons learned and insights gained along the way.
The cornerstone of this strategy lies in its ability to generate precise long signals in a Stage 2 uptrend and equally accurate short signals in a Stage 4 downtrend. This approach is rooted in the principles of trend following and momentum trading, harnessing the power of key indicators such as the Momentum-RSI, EMA Crossover, and Average True Range (ATR). What sets this strategy apart is its meticulous design, which allows it to adapt to the ever-changing market conditions, providing traders with a robust tool for navigating both bullish and bearish scenarios.
This strategy was born out of a desire to create a trading system that is not only highly effective in identifying potential trade setups but also straightforward enough to be implemented by traders of varying skill levels. It's a reflection of my belief that successful trading hinges on clarity, precision, and disciplined execution. Whether you are a seasoned trader or just beginning your journey, this guide aims to provide you with a comprehensive understanding of how to harness the full potential of this strategy in your trading endeavors.
In the following sections, we will delve deeper into the mechanics of the strategy, its implementation, and how to make the most out of its features. Join me as we explore the nuances of a strategy that is designed to elevate your trading to the next level.
Stage-Specific Signal Generation
A distinctive feature of this trading strategy is its focus on generating long signals exclusively during Stage 2 uptrends and short signals during Stage 4 downtrends. This approach is based on the widely recognized market cycle theory, which divides the market into four stages: Stage 1 (accumulation), Stage 2 (uptrend), Stage 3 (distribution), and Stage 4 (downtrend). By aligning the signal generation with these specific stages, the strategy aims to capitalize on the most dynamic and clear-cut market movements, thereby enhancing the potential for profitable trades.
1. Long Signals in Stage 2 Uptrends
• Characteristics of Stage 2: Stage 2 is characterized by a strong uptrend, where prices are consistently rising. This stage typically follows a period of accumulation (Stage 1) and is marked by increased investor interest and bullish sentiment in the market.
• Criteria for Long Signal Generation: Long signals are generated during this stage when the technical indicators align with the characteristics of a Stage 2 uptrend.
• Rationale for Stage-Specific Signals: By focusing on Stage 2 for long trades, the strategy seeks to enter positions during the phase of strong upward momentum, thus riding the wave of rising prices and investor optimism. This stage-specific approach minimizes exposure to less predictable market phases, like the consolidation in Stage 1 or the indecision in Stage 3.
2. Short Signals in Stage 4 Downtrends
• Characteristics of Stage 4: Stage 4 is identified by a pronounced downtrend, with declining prices indicating prevailing bearish sentiment. This stage typically follows the distribution phase (Stage 3) and is characterized by increasing selling pressure.
• Criteria for Short Signal Generation: Short signals are generated in this stage when the indicators reflect a strong bearish trend.
• Rationale for Stage-Specific Signals: Targeting Stage 4 for shorting capitalizes on the market's downward momentum. This tactic aligns with the natural market cycle, allowing traders to exploit the downward price movements effectively. By doing so, the strategy avoids the potential pitfalls of shorting during the early or late stages of the market cycle, where trends are less defined and more susceptible to reversals.
In conclusion, the strategy’s emphasis on stage-specific signal generation is a testament to its sophisticated understanding of market dynamics. By tailoring the long and short signals to Stages 2 and 4, respectively, it leverages the most compelling phases of the market cycle, offering traders a clear and structured approach to aligning their trades with dominant market trends.
Strategy Overview
At the heart of this trading strategy is a philosophy centered around capturing market momentum and trend efficiency. The core objective is to identify and capitalize on clear uptrends and downtrends, thereby allowing traders to position themselves in sync with the market's prevailing direction. This approach is grounded in the belief that aligning trades with these dominant market forces can lead to more consistent and profitable outcomes.
The strategy is built on three foundational components, each playing a critical role in the decision-making process:
1. Momentum-RSI (Relative Strength Index): The Momentum-RSI is a pivotal element of this strategy. It's an enhanced version of the traditional RSI, fine-tuned to better capture the strength and velocity of market trends. By measuring the speed and change of price movements, the Momentum-RSI provides invaluable insights into whether a market is potentially overbought or oversold, suggesting possible entry and exit points. This indicator is especially effective in filtering out noise and focusing on substantial market moves.
2. EMA (Exponential Moving Average) Crossover: The EMA Crossover is a crucial component for trend identification. This strategy employs two EMAs with different timeframes to determine the market trend. When the shorter-term EMA crosses above the longer-term EMA, it signals an emerging uptrend, suggesting a potential long entry. Conversely, a crossover below indicates a possible downtrend, hinting at a short entry opportunity. This simple yet powerful tool is key in confirming trend directions and timing market entries.
3. ATR (Average True Range): The ATR is instrumental in assessing market volatility. This indicator helps in understanding the average range of price movements over a given period, thus providing a sense of how much a market might move on a typical day. In this strategy, the ATR is used to adjust stop-loss levels and to gauge the potential risk and reward of trades. It allows for more informed decisions by aligning trade management techniques with the current volatility conditions.
The synergy of these three components – the Momentum-RSI, EMA Crossover, and ATR – creates a robust framework for this trading strategy. By combining momentum analysis, trend identification, and volatility assessment, the strategy offers a comprehensive approach to navigating the markets. Whether it's capturing a strong trend in its early stages or identifying a potential reversal, this strategy aims to provide traders with the tools and insights needed to make well-informed, strategically sound trading decisions.
Detailed Component Analysis
The efficacy of this trading strategy hinges on the synergistic functioning of its three key components: the Momentum-RSI, EMA Crossover, and Average True Range (ATR). Each component brings a unique perspective to the strategy, contributing to a well-rounded approach to market analysis.
1. Momentum-RSI (Relative Strength Index)
• Definition and Function: The Momentum-RSI is a modified version of the classic Relative Strength Index. While the traditional RSI measures the velocity and magnitude of directional price movements, the Momentum-RSI amplifies aspects that reflect trend strength and momentum.
• Significance in Identifying Trend Strength: This indicator excels in identifying the strength behind a market's move. A high Momentum-RSI value typically indicates strong bullish momentum, suggesting the potential continuation of an uptrend. Conversely, a low Momentum-RSI value signals strong bearish momentum, possibly indicative of an ongoing downtrend.
• Application in Strategy: In this strategy, the Momentum-RSI is used to gauge the underlying strength of market trends. It helps in filtering out minor fluctuations and focusing on significant movements, providing a clearer picture of the market's true momentum.
2. EMA (Exponential Moving Average) Crossover
• Definition and Function: The EMA Crossover component utilizes two exponential moving averages of different timeframes. Unlike simple moving averages, EMAs give more weight to recent prices, making them more responsive to new information.
• Contribution to Market Direction: The interaction between the short-term and long-term EMAs is key to determining market direction. A crossover of the shorter EMA above the longer EMA is an indicator of an emerging uptrend, while a crossover below signals a developing downtrend.
• Application in Strategy: The EMA Crossover serves as a trend confirmation tool. It provides a clear, visual representation of the market's direction, aiding in the decision-making process for entering long or short positions. This component ensures that trades are aligned with the prevailing market trend, a crucial factor for the success of the strategy.
3. ATR (Average True Range)
• Definition and Function: The ATR is an indicator that measures market volatility by calculating the average range between the high and low prices over a specified period.
• Role in Assessing Market Volatility: The ATR provides insights into the typical market movement within a given timeframe, offering a measure of the market's volatility. Higher ATR values indicate increased volatility, while lower values suggest a calmer market environment.
• Application in Strategy: Within this strategy, the ATR is instrumental in tailoring risk management techniques, particularly in setting stop-loss levels. By accounting for the market's volatility, the ATR ensures that stop-loss orders are placed at levels that are neither too tight (risking premature exits) nor too loose (exposing to excessive risk).
In summary, the combination of Momentum-RSI, EMA Crossover, and ATR in this trading strategy provides a comprehensive toolkit for market analysis. The Momentum-RSI identifies the strength of market trends, the EMA Crossover confirms the market direction, and the ATR guides in risk management by assessing volatility. Together, these components form the backbone of a strategy designed to navigate the complexities of the financial markets effectively.
1. Signal Generation Process
• Combining Indicators: The strategy operates by synthesizing signals from the Momentum-RSI, EMA Crossover, and ATR indicators. Each indicator serves a specific purpose: the Momentum-RSI gauges trend momentum, the EMA Crossover identifies the trend direction, and the ATR assesses the market’s volatility.
• Criteria for Signal Validation: For a signal to be considered valid, it must meet specific criteria set by each of the three indicators. This multi-layered approach ensures that signals are not only based on one aspect of market behavior but are a result of a comprehensive analysis.
2. Conditions for Long Positions
• Uptrend Confirmation: A long position signal is generated when the shorter-term EMA crosses above the longer-term EMA, indicating an uptrend.
• Momentum-RSI Alignment: Alongside the EMA crossover, the Momentum-RSI should indicate strong bullish momentum. This is typically represented by the Momentum-RSI being at a high level, confirming the strength of the uptrend.
• ATR Consideration: The ATR is used to fine-tune the entry point and set an appropriate stop-loss level. In a low volatility scenario, as indicated by the ATR, the stop-loss can be set tighter, closer to the entry point.
3. Conditions for Short Positions
• Downtrend Confirmation: Conversely, a short position signal is indicated when the shorter-term EMA crosses below the longer-term EMA, signaling a downtrend.
• Momentum-RSI Confirmation: The Momentum-RSI should reflect strong bearish momentum, usually seen when the Momentum-RSI is at a low level. This confirms the bearish strength of the market.
• ATR Application: The ATR again plays a role in determining the stop-loss level for the short position. Higher volatility, as indicated by a higher ATR, would warrant a wider stop-loss to accommodate larger market swings.
By adhering to these mechanics, the strategy aims to ensure that each trade is entered with a high probability of success, aligning with the market’s current momentum and trend. The integration of these indicators allows for a holistic market analysis, providing traders with clear and actionable signals for both entering and exiting trades.
Customizable Parameters in the Strategy
Flexibility and adaptability are key features of this trading strategy, achieved through a range of customizable parameters. These parameters allow traders to tailor the strategy to their individual trading style, risk tolerance, and specific market conditions. By adjusting these parameters, users can fine-tune the strategy to optimize its performance and align it with their unique trading objectives. Below are the primary parameters that can be customized within the strategy:
1. Momentum-RSI Settings
• Period: The lookback period for the Momentum-RSI can be adjusted. A shorter period makes the indicator more sensitive to recent price changes, while a longer period smoothens the RSI line, offering a broader view of the momentum.
• Overbought/Oversold Thresholds: Users can set their own overbought and oversold levels, which can help in identifying extreme market conditions more precisely according to their trading approach.
2. EMA Crossover Settings
• Timeframes for EMAs: The strategy uses two EMAs with different timeframes. Traders can modify these timeframes, choosing shorter periods for a more responsive approach or longer periods for a more conservative one.
• Source Data: The choice of price data (close, open, high, low) used in calculating the EMAs can be varied depending on the trader’s preference.
3. ATR Settings
• Lookback Period: Adjusting the lookback period for the ATR impacts how the indicator measures volatility. A longer period may provide a more stable but less responsive measure, while a shorter period offers quicker but potentially more erratic readings.
• Multiplier for Stop-Loss Calculation: This parameter allows traders to set how aggressively or conservatively they want their stop-loss to be in relation to the ATR value.
Here are the standard settings:
Captain Backtest Model [TFO]Created by @imjesstwoone and @mickey1984, this trade model attempts to capture the expansion from the 10:00-14:00 EST 4h candle using just 3 simple steps. All of the information presented in this description has been outlined by its creators, all I did was translate it to Pine Script. All core settings of the trade model may be edited so that users can test several variations, however this description will cover its default, intended behavior using NQ 5m as an example.
Step 1 is to identify our Price Range. In this case, we are concerned with the highest high and the lowest low created from 6:00-10:00 EST.
Step 2 is to wait for either the high or low of said range to be taken out. Whichever side gets taken first determines the long/short bias for the remainder of the Trade Window (i.e. if price takes the range high, bias is long, and vice versa). Bias must be determined by 11:15 EST, otherwise no trades will be taken. This filter is intended to weed out "choppy" trading days.
Step 3 is to wait for a retracement and enter with a close through the previous candle's high (if long biased) or low (if short biased). There are a couple toggleable criteria that we use to define a retracement; one is checking for opposite close candles that indicate a pullback; another is checking if price took the previous candle's low (if long biased) or high (if short biased).
This trade model was initially tested for index futures, particularly ES and NQ, using a 5m chart, however this indicator allows us to backtest any symbol on any timeframe. Creators @imjesstwoone and @mickey1984 specified a 5 point stop loss on ES and a 25 point stop loss on NQ with their testing.
I've personally found some success in backtesting NQ 5m using a 25 point stop loss and 75 point profit target (3:1 R). Enabling the Use Fixed R:R parameter will ensure that these stops and targets are utilized, otherwise it will enter and hold the position until the close of the Trade Window.
MACD Strategy_baskerMACD Strategy_basker, which will see the macd cross over and update buy sell. then do trailing sl
Engulfing with TrendThe script above is a trading strategy with rules based on the Engulfing candlestick pattern within the context of the trend. Some key elements of this script include:
1. ATR (Average True Range) settings to measure market volatility.
2. Supertrend settings to identify the market trend.
3. Conditions for determining uptrend and downtrend.
4. Determination of Bullish (Engulfing pattern during uptrend) and Bearish (Engulfing pattern during downtrend).
5. Calculation of Stop Loss (SL) and Take Profit (TP) levels based on the Engulfing pattern.
6. Entry conditions based on the Engulfing pattern and the corresponding trend.
7. Exit conditions based on price crossovers with SL and TP levels.
8. Plotting of the Engulfing patterns on the chart.
This strategy is used to identify trading opportunities based on Engulfing candlestick patterns that align with the direction of the market trend. Additionally, stop loss and take profit levels are calculated based on the Engulfing pattern, and trading signals are displayed on the chart.
It's important to note that this script can be customized according to your trading preferences and strategy.
Improved EMA & CDC Trailing Stop StrategyImproved EMA & CDC Trailing Stop Strategy
Objective: This strategy seeks to exploit potential trend reversals or continuations using Exponential Moving Averages (EMAs) and a trailing stop based on the Chande Dynamic Convergence Divergence (CDC) ATR method.
Components:
Exponential Moving Averages (EMAs):
60-period EMA (Blue Line): Faster-moving average that reacts more quickly to price changes.
90-period EMA (Red Line): Slower-moving average that provides a smoother indication of long-term price direction.
MACD Indicator:
Utilized to confirm the trend direction. When the MACD line is above its signal line, it may indicate a bullish trend. Conversely, when the MACD line is below its signal line, it may indicate a bearish trend.
CDC Trailing Stop ATR:
Used to set dynamic stop-loss levels that adjust with market volatility. This stop is based on the Average True Range (ATR) with a user-defined multiplier, providing the strategy with a flexible way to protect against adverse price movements.
Profit Targets:
Based on a multiple of the ATR, this sets an objective level at which to take profits, ensuring gains are captured while potentially still leaving room for further profitable movement.
Trading Rules:
Entry:
Long (Buy) Entry Conditions:
Price is above the 60-period EMA.
The 60-period EMA is above the 90-period EMA.
The MACD line is above its signal line.
Price is above the calculated CDC Trailing Stop ATR level.
Short (Sell) Entry Conditions:
Price is below the 60-period EMA.
The 60-period EMA is below the 90-period EMA.
The MACD line is below its signal line.
Price is below the calculated CDC Trailing Stop ATR level.
Exit:
Long (Buy) Exit Conditions:
Price reaches the predetermined profit target based on the ATR.
Price drops below the CDC Trailing Stop ATR level.
Short (Sell) Exit Conditions:
Price reaches the predetermined profit target based on the ATR.
Price rises above the CDC Trailing Stop ATR level.
Visualization:
The strategy displays the 60-period and 90-period EMAs on the chart.
The CDC Trailing Stop ATR levels for both long and short trades are also plotted for clarity.
The MACD Histogram is shown to visualize the difference between the MACD line and its signal line.
Recommendations: Before deploying this strategy, traders should backtest it across various historical data sets and market conditions. Regularly reviewing and potentially adjusting the strategy is recommended as market dynamics evolve.
Bollinger Bands & Fibonacci StrategyThe Bollinger Bands & Fibonacci Strategy is a powerful technical analysis trading strategy designed to identify potential entry and exit points in financial markets. This strategy combines two widely used indicators, Bollinger Bands and Fibonacci retracement levels, to assist traders in making informed trading decisions.
Key Features:
Bollinger Bands: This strategy utilizes Bollinger Bands, a volatility-based indicator that consists of an upper band, a lower band, and a middle (basis) line. Bollinger Bands help traders visualize price volatility and potential reversal points.
Fibonacci Retracement Levels: Fibonacci retracement levels are essential tools for identifying potential support and resistance levels in price charts. This strategy incorporates Fibonacci retracement levels, including the 0% and 100% levels, to aid in pinpointing key price levels.
Long and Short Signals: The strategy generates long (buy) and short (sell) signals based on specific conditions derived from Bollinger Bands and Fibonacci levels. Long signals are generated when price crosses above the upper Bollinger Band and when the price is above the Fibonacci low level. Short signals are generated when price crosses below the lower Bollinger Band and when the price is below the Fibonacci high level.
Position Management: To prevent multiple concurrent positions of the same type (long or short), the strategy employs position management logic. It tracks open positions and ensures that only one position type is active at a time.
Exit Conditions: The strategy includes customizable exit conditions to manage and close open positions. Traders can fine-tune exit criteria to align with their risk management and profit-taking strategies.
User-Friendly: This strategy script is user-friendly and can be easily integrated into the TradingView platform, allowing traders to apply it to various financial instruments and timeframes.
Usage:
Traders and investors can apply the Bollinger Bands & Fibonacci Strategy to a wide range of financial markets, including stocks, forex, commodities, and cryptocurrencies. It can be adapted to different timeframes to suit various trading styles, from day trading to swing trading.
Disclaimer:
Trading carries inherent risks, and this strategy is no exception. It is essential to use proper risk management techniques, including stop-loss orders, and thoroughly backtest the strategy on historical data before implementing it in live trading.
The Bollinger Bands & Fibonacci Strategy is a valuable tool for technical traders seeking well-defined entry and exit points based on robust indicators. It can serve as a foundation for traders to build and customize their trading strategies according to their individual preferences and risk tolerance.
Feel free to customize this description to add any additional details or specifications unique to your strategy. When publishing your strategy on a trading platform like TradingView, a clear and informative description can help potential users understand and use your strategy effectively.
Trend Confirmation StrategyThe profitability and uniqueness of a trading strategy depend on various factors including market conditions, risk management, and the strategy's ability to capitalize on price movements. I'll describe the strategy provided and highlight its potential benefits and differences compared to other strategies:
Strategy Overview:
The provided strategy combines three technical indicators: Supertrend, MACD, and VWAP. It aims to identify potential entry and exit points by confirming trend direction and considering the proximity to the VWAP level. The strategy also incorporates stop-loss and take-profit mechanisms, as well as a trailing stop.
Unique Aspects and Potential Benefits:
Trend Confirmation: The strategy uses both Supertrend and MACD to confirm the trend direction. This dual confirmation can increase the likelihood of accurate trend identification and filter out false signals.
VWAP Confirmation: The strategy considers the proximity of the price to the VWAP level. This dynamic level can act as a support or resistance and provide additional context for entry decisions.
Adaptive Stop Loss: The strategy sets a stop-loss range, which helps provide some tolerance for minor price fluctuations. This adaptive approach considers market volatility and helps prevent premature stop-loss triggers.
Trailing Stop: The strategy incorporates a trailing stop mechanism to lock in profits as the trade moves in the desired direction. This can potentially enhance profitability during strong trends.
Partial Profit Booking: While not explicitly implemented in the provided code, you could consider booking partial profits when the MACD shows a crossover in the opposite direction. This aspect could help secure gains while still keeping exposure to potential further price movements.
Key Differences from Other Strategies:
Dual Indicator Confirmation: The combination of Supertrend and MACD for trend confirmation is a unique aspect of this strategy. It adds an extra layer of filtering to enhance the accuracy of entry signals.
Dynamic VWAP: Incorporating the VWAP level into the decision-making process adds a dynamic element to the strategy. VWAP is often used by institutional traders, and its inclusion can provide insights into the market sentiment.
Adaptive Stop Loss and Trailing: The strategy's use of an adaptive stop-loss range and a trailing stop can help manage risk and protect profits more effectively during changing market conditions.
Partial Profit Booking: The suggestion to consider partial profit booking upon MACD crossovers in the opposite direction is a practical approach to secure gains while staying in the trade.
Caution and Considerations:
Backtesting: Before deploying any strategy in real trading, it's crucial to thoroughly backtest it on historical data to understand its performance under various market conditions.
Risk Management: While the strategy has built-in risk management mechanisms, it's essential to carefully manage position sizes and overall portfolio risk.
Market Conditions: No strategy works well in all market conditions. It's important to be flexible and adjust the strategy or refrain from trading during particularly volatile or unpredictable periods.
Continuous Monitoring: Even though the strategy includes automated components, continuous monitoring of the trades and market conditions is necessary.
Adaptability: Markets can change over time. Traders need to be prepared to adapt the strategy as necessary to stay aligned with evolving market dynamics.
Elliott Wave with Supertrend Exit - Strategy [presentTrading]## Introduction and How it is Different
The Elliott Wave with Supertrend Exit provides automated detection and validation of Elliott Wave patterns for algorithmic trading. It is designed to objectively identify high-probability wave formations and signal entries based on confirmed impulsive and corrective patterns.
* The Elliott part is mostly referenced from Elliott Wave by @LuxAlgo
Key advantages compared to discretionary Elliott Wave analysis:
- Wave Labeling and Counting: The strategy programmatically identifies swing pivot highs/lows with the Zigzag indicator and analyzes the waves between them. It labels the potential impulsive and corrective patterns as they form. This removes the subjectivity of manual wave counting.
- Pattern Validation: A rules-based engine confirms valid impulsive and corrective patterns by checking relative size relationships and fib ratios. Only confirmed wave counts are plotted and traded.
- Objective Entry Signals: Trades are entered systematically on the start of new impulsive waves in the direction of the trend. Pattern failures invalidate setups and stop out positions.
- Automated Trade Management: The strategy defines specific rules for profit targets at fib extensions, trailing stops at swing points, and exits on Supertrend reversals. This automates the entire trade lifecycle.
- Adaptability: The waveform recognition engine can be tuned by adjusting parameters like Zigzag depth and Supertrend settings. It adapts to evolving market conditions.
ETH 1hr chart
In summary, the strategy brings automation, objectivity and adaptability to Elliott Wave trading - removing subjective interpretation errors and emotional trading biases. It implements a rules-based, algorithmic approach for systematically trading Elliott Wave patterns across markets and timeframes.
## Trading Logic and Rules
The strategy follows specific trading rules based on the detected and validated Elliott Wave patterns.
Entry Rules
- Long entry when a new impulsive bullish (5-wave) pattern forms
- Short entry when a new impulsive bearish (5-wave) pattern forms
The key is entering on the start of a new potential trend wave rather than chasing.
Exit Rules
- Invalidation of wave pattern stops out the trade
- Close long trades on Supertrend downturn
- Close short trades on Supertrend upturn
- Use a stop loss of 10% of entry price (configurable)
Trade Management
- Scale out partial profits at Fibonacci levels
- Move stop to breakeven when price reaches 1.618 extension
- Trail stops below key swing points
- Target exits at next Fibonacci projection level
Risk Management
- Use stop losses on all trades
- Trade only highest probability setups
- Size positions according to chart timeframe
- Avoid overtrading when no clear patterns emerge
## Strategy - How it Works
The core logic follows these steps:
1. Find swing highs/lows with Zigzag indicator
2. Analyze pivot points to detect impulsive 5-wave patterns:
- Waves 1, 3, and 5 should not overlap
- Waves 3 and 5 must be longer than wave 1
- Confirm relative size relationships between waves
3. Validate corrective 3-wave patterns:
- Look for overlapping, choppy waves that retrace the prior impulsive wave
4. Plot validated waves and Fibonacci retracement levels
5. Signal entries when a new impulsive wave pattern forms
6. Manage exits based on pattern failures and Supertrend reversals
Impulsive Wave Validation
The strategy checks relative size relationships to confirm valid impulsive waves.
For uptrends, it ensures:
```
Copy code- Wave 3 is longer than wave 1
- Wave 5 is longer than wave 2
- Waves do not overlap
```
Corrective Wave Validation
The strategy identifies overlapping corrective patterns that retrace the prior impulsive wave within Fibonacci levels.
Pattern Failure Invalidation
If waves fail validation tests, the strategy invalidates the pattern and stops signaling trades.
## Trade Direction
The strategy detects impulsive and corrective patterns in both uptrends and downtrends. Entries are signaled in the direction of the validated wave pattern.
## Usage
- Use on charts showing clear Elliott Wave patterns
- Start with daily or weekly timeframes to gauge overall trend
- Optimize Zigzag and Supertrend settings as needed
- Consider combining with other indicators for confirmation
## Default Settings
- Zigzag Length: 4 bars
- Supertrend Length: 10 bars
- Supertrend Multiplier: 3
- Stop Loss: 10% of entry price
- Trading Direction: Both
TASC 2023.09 The Weekly Factor█ OVERVIEW
TASC's September 2023 edition of Traders' Tips features an article written by Andrea Unger titled “The Weekly Factor", discussing the application of price patterns as filters for trade entries. This script implements a sample trading strategy presented in the article for demonstration purposes only. It explores how the strategy's equity curve might benefit from filtering trade entries using a specific price pattern.
█ CONCEPTS
Pattern filters represent valuable tools that assess current market conditions based on price movements and determine when those conditions become more favorable for trade entries.
The filter used and tested in this article is a metric called the "weekly factor", which measures the price range over the last five trading days and compares it to the open of the session five days ago and the close of the session one day ago (i.e., the "body" of the five-day period). When the five-day body is small compared to the five-day range, this could indicate "indecision" or "compression", potentially followed by a price expansion. Thus, the weekly factor metric can help identify areas in the market where a period of compression might signal a potential breakout.
This script demonstrates the use of the weekly factor for a sample intraday trading strategy (intended for educational and exploratory purposes only). In this strategy, the entry signal is triggered when a 15-minute bar breaks out of the previous day's high-low range, and the position is closed at the end of the day.
█ CALCULATIONS
The script uses two timeframes:
• The strategy entries are processed on the 15-minute timeframe.
• The weekly factor is obtained from the daily timeframe using the request.security function and the following formula:
math.abs(open - close ) < RangeFilter * (ta.highest(5) - ta.lowest(5) )
Here, RangeFilter is an input that can be optimized to find the favorable ratio between the five-day body and the five-day range. Smaller RangeFilter values will lead to fewer trade entries. A RangeFilter value of 1 is equivalent to turning off the filtering altogether.
TrendGuard Flag Finder - Strategy [presentTrading]
Introduction and How It Is Different
In the vast world of trading strategies, the TrendGuard Flag Finder stands out as a unique blend of traditional flag pattern detection and the renowned SuperTrend indicator.
- A significant portion of the Flag Pattern detection is inspired by the "Flag Finder" code by @Amphibiantrading, which serves as one of foundational element of this strategy.
- While many strategies focus on either trend-following or pattern recognition, this strategy harmoniously combines both, offering traders a more holistic view of the market.
- The integration of the SuperTrend indicator not only provides a clear direction of the prevailing trend but also offers potential stop-loss levels, enhancing the strategy's risk management capabilities.
AAPL 1D chart
ETHBTC 6hr chart
Strategy: How It Works
The TrendGuard Flag Finder is primarily built on two pillars:
1. Flag Pattern Detection : At its core, the strategy identifies flag patterns, which are continuation patterns suggesting that the prevailing trend will resume after a brief consolidation. The strategy meticulously detects both bullish and bearish flags, ensuring traders can capitalize on opportunities in both rising and falling markets.
What is a Flag Pattern? A flag pattern consists of two main components:
1.1 The Pole : This is the initial strong price move, which can be either upwards (for bullish flags) or downwards (for bearish flags). The pole represents a strong surge in price in a particular direction, driven by significant buying or selling momentum.
1.2 The Flag : Following the pole, the price starts consolidating, moving against the initial trend. This consolidation forms a rectangular shape and is characterized by parallel trendlines. In a bullish flag, the consolidation will have a slight downward tilt, while in a bearish flag, it will have a slight upward tilt.
How the Strategy Detects Flags:
Identifying the Pole: The strategy first identifies a strong price movement over a user-defined number of bars. This movement should meet a certain percentage change to qualify as a pole.
Spotting the Flag: After the pole is identified, the strategy looks for a consolidation phase. The consolidation should be counter to the prevailing trend and should be contained within parallel lines. The depth (for bullish flags) or rally (for bearish flags) of this consolidation is calculated to ensure it meets user-defined criteria.
2. SuperTrend Integration : The SuperTrend indicator, known for its simplicity and effectiveness, is integrated into the strategy. It provides a dynamic line on the chart, signaling the prevailing trend. When prices are above the SuperTrend line, it's an indication of an uptrend, and vice versa. This not only confirms the flag pattern's direction but also offers a potential stop-loss level for trades.
When combined, these components allow traders to identify potential breakout (for bullish flags) or breakdown (for bearish flags) scenarios, backed by the momentum indicated by the SuperTrend.
Usage
To use the SuperTrend Enhanced Flag Finder:
- Inputs : Begin by setting the desired parameters. The strategy offers a range of user-controlled settings, allowing for customization based on individual trading preferences and risk tolerance.
- Visualization : Once the parameters are set, the strategy will identify and visually represent flag patterns on the chart. Bullish flags are represented in green, while bearish flags are in red.
- Trade Execution : When a breakout or breakdown is identified, the strategy provides entry signals. It also offers exit signals based on the SuperTrend, ensuring that traders can capitalize on the momentum while managing risk.
Default Settings
The strategy comes with a set of default settings optimized for general use:
- SuperTrend Parameters: Length set to 10 and Factor set to 5.0.
- Bull Flag Criteria: Max Flag Depth at 7, Max Flag Length at 10 bars, Min Flag Length at 3 bars, Prior Uptrend Minimum at 9%, and Flag Pole Length between 7 to 13 bars.
- Bear Flag Criteria: Similar settings adjusted for bearish patterns.
- Display Options: By default, both bullish and bearish flags are displayed, with breakout and breakdown points highlighted.
Anand's Strategy
First, we identify the trend, the trend will be determined by the daily candles, whenever the daily candle closes above the high of a previous candle the trend becomes positive and the trend remains positive till the time a candle closes below the lowest price of this candle, however, if the cost of any future candle closes above the high of this candle then the bottom of this candle becomes the SL/ trend change point. And vice versa for the opposing side.
Once we have identified the trend we will trade only on the side of the trend in the 15mins candles
If the trend is positive then only positive trades will be initiated when the conditions are fulfilled I.e
Whenever a 15min candle closes above the high of a previous 15min candle then we enter the trade and if any 15min candle closes below the lowest price of this candle then we SL our trade, once any candle closes above the highest price of this candle then the lowest price of that candle becomes our trailing SL
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.
X48 - Strategy | ADAPTIVE CONSECUTIVE + TP/SL | V.1Thanks For Tradingview Built-in Script :: << Original From Consecutive Strategy Built-in Script >>
================== Read This First Before Use This Strategy ==============
Please be aware that this strategy is not a guarantee of success and may lead to losses.
Trading involves risk and you should always do your own research before making any decisions.
This Strategy Just an Idea For Help Your Decision For Open Position.
You Must Be Search and Make Your Self Understand What You Doing In This Strategy.
Example :: This Strategy and Indicator Find The Consecutive Bars And You, You Are Reading Must Be Decision Up to You !!
For Backtest Show It's That For a Newbie 100$ Portfolio and 16.333$ Per Order Size
>>>> Read Me First !! <<<<<
========== Detailed and meaningful description =========
How It's Work : This Strategy are Following Green or Red Candle :: example 3 Green Candle To OpenLong Position
Can Set TP/SL if you want :: Just Fine The Best Value of Asset as you want
Fast Trend = MA FAST LINE
SLOW Trend = MA SLOW LINE
MID-TERM TREND = MA MID-TERM
LONG-TERM TREND = MA LONG-TERM
=========== Condition And Statement ===========
Long Condition Statement :: Candles Consecutive Bars Up and close > golden_line and fast_line > golden_line
Short Condition Statement :: Candles Consecutive Bars Down and close < golden_line and fast_line < golden_line
AutoCloseLong Condition :: Candles ConsecutiveBarsDownStop and close > golden_line and close < death_line and close < death_line and close < death_line or fastUpdeath
AutoCloseShort Condition :: Candles ConsecutiveBarsUpStop and close < golden_line and close > death_line and close > death_line and close > death_line or fastUpdeath
====== For ADAPTIVE you can customize your ALL MA For Your Statement
/////////For Example Hook Alert Command ////////////
Just Easy Command >> :: {{strategy.order.alert_message}}
Or Other Json You Should Edit Command Like This Example
{"ex":"'bnfuture'","side": "AutoLong", "$16.333", "symbol": "{{ticker}}", "passphrase": "1234","leverage":"10", "tp" : "5", "sl" : "2", "tl" : "2", "callback" : "1"}
{"ex":"'bnfuture'","side": "AutoShort", "$16.333", "symbol": "{{ticker}}", "passphrase": "1234","leverage":"10", "tp" : "5", "sl" : "2", "tl" : "2", "callback" : "1"}