Gap Trend Lines by @eyemaginativeSummary:
The "Gap Trend Lines" script is designed to identify and visualize gaps between the close of one candle and the opening of the next on a TradingView chart. It draws extended trend lines to visually connect these gaps, helping traders to identify significant price movements between consecutive candles.
Functionality:
Indicator Setup:
The script is set as an overlay indicator on the main chart.
It includes settings for maximum line and label counts, ensuring efficient performance.
Parameter Customization:
Gap Threshold: Defines the minimum gap size considered significant.
Line Colors: Allows customization of colors for small and large gaps.
Line Thickness and Style: Provides options to adjust the thickness and style (solid, dotted, dashed) of the trend lines.
Drawing Extended Trend Lines:
For each bar (candlestick) on the chart, the script checks if there is a gap between the previous candle's close and the current candle's open.
If a gap is detected (i.e., close != open), it determines the size of the gap.
Depending on the size relative to the defined threshold, it selects the appropriate color (small or large gap).
It then draws an extended trend line that starts from the close of the previous candle (bar_index , close ) and extends to the open of the current candle (bar_index, open).
The trend line is drawn with the specified thickness, color, and style.
Dynamic Line Attribute Changes:
The script includes a function (changeLineAttributes()) that periodically changes the color and style of the trend lines.
By default, it changes the color every 4 hours (adjustable), alternating between green and the original color.
Enhanced Functionality:
Handles both small and large gaps with different visual cues (colors).
Supports extended trend lines that span both past and future directions (extend=extend.both), ensuring visibility across the entire chart.
Usage:
Traders can use the "Gap Trend Lines" script to:
Identify and analyze gaps between candlesticks.
Visualize significant price movements or breaks in continuity.
Customize the appearance of trend lines for better clarity and analysis.
By utilizing this script, traders can gain insights into price gap dynamics directly on TradingView charts, aiding in decision-making and strategy development.
Chart patterns
Capitulation Candle for Bitcoin and Crypto V1.0 [ADRIDEM]Overview
The Capitulation Candle for Bitcoin and Crypto script identifies potential capitulation events in the cryptocurrency market. Capitulation candles indicate a significant sell-off, often marking a potential market bottom. This script highlights such candles by analyzing volume, price action, and other technical conditions. Below is a detailed presentation of the script and its unique features.
Unique Features of the New Script
Volume-Based Analysis : Uses a volume multiplier to detect unusually high trading volumes, which are characteristic of capitulation events. The default multiplier is 5.0, but it can be adjusted to suit different market conditions.
Support Level Detection : Looks back over a customizable period (default is 150 bars) to find support levels, helping to identify significant price breaks.
ATR-Based Range Condition : Ensures that the price range of a capitulation candle is a multiple of the Average True Range (ATR), confirming significant price movement. The default ATR multiplier is 10.0.
Dynamic Dot Sizes : Plots dots of different sizes below capitulation candles based on volume thresholds, providing a visual indication of the volume's significance.
Visual Indicators : Highlights capitulation candles and plots support levels, offering clear visual cues for potential market bottoms.
Originality and Usefulness
This script uniquely combines volume analysis, support level detection, and ATR-based range conditions to identify capitulation candles. The dynamic dot sizes and clear visual indicators make it an effective tool for traders looking to spot potential reversal points in the cryptocurrency market.
Signal Description
The script includes several features that highlight potential capitulation events:
High Volume Detection : Identifies candles with unusually high trading volumes using a customizable volume multiplier.
Support Level Breaks : Detects candles breaking significant support levels over a customizable lookback period.
ATR Range Condition : Ensures the candle's range is significant compared to the ATR, confirming substantial price movement.
Dynamic Dot Sizes : Plots small, normal, and large dots below candles based on different volume thresholds.
These features assist in identifying potential capitulation events and provide visual cues for traders.
Detailed Description
Input Variables
Volume Multiplier (`volMultiplier`) : Detects high-volume candles using this multiplier. Default is 5.0.
Support Lookback Period (`supportLookback`) : The period over which support levels are calculated. Default is 150.
ATR Multiplier (`atrMultiplier`) : Ensures the candle's range is a multiple of the ATR. Default is 10.0.
Small Volume Multiplier Threshold (`smallThreshold`) : Threshold for small dots. Default is 5.
Normal Volume Multiplier Threshold (`normalThreshold`) : Threshold for normal dots. Default is 10.
Large Volume Multiplier Threshold (`largeThreshold`) : Threshold for large dots. Default is 15.
Functionality
High Volume Detection : The script calculates the simple moving average (SMA) of the volume and checks if the current volume exceeds the SMA by a specified multiplier.
```pine
smaVolume = ta.sma(volume, supportLookback)
isHighVolume = volume > smaVolume * volMultiplier
```
Support Level Detection : Determines the lowest low over the lookback period to identify significant support levels.
```pine
supportLevel = ta.lowest(low , supportLookback)
isLowestLow = low == supportLevel
```
ATR Range Condition : Calculates the ATR and ensures the candle's range is significant compared to the ATR.
```pine
atr = ta.atr(supportLookback)
highestHigh = ta.highest(high, supportLookback)
rangeCondition = (highestHigh - low ) >= (atr * atrMultiplier)
```
Combining Conditions : Combines various conditions to identify capitulation candles.
```pine
isHigherVolumeThanNext = volume > volume
isHigherVolumeThanPrevious = volume > volume
bodySize = math.abs(close - open )
candleRange = high - low
rangeBiggerThanPreviousBody = candleRange > bodySize
isCapitulationCandle = isHighVolume and isHigherVolumeThanPrevious and isHigherVolumeThanNext and isLowestLow and rangeCondition and rangeBiggerThanPreviousBody
```
Dynamic Dot Sizes : Determines dot sizes based on volume thresholds and plots them below the identified capitulation candles.
```pine
isSmall = volume > smaVolume * smallThreshold and volume <= smaVolume * normalThreshold
isNormal = volume > smaVolume * normalThreshold and volume <= smaVolume * largeThreshold
isLarge = volume > smaVolume * largeThreshold
plotshape(series=isCapitulationCandle and isSmall, location=location.belowbar, offset=-1, color=color.rgb(255, 82, 82, 40), style=shape.triangleup, size=size.small)
plotshape(series=isCapitulationCandle and isNormal, location=location.belowbar, offset=-1, color=color.rgb(255, 82, 82, 30), style=shape.triangleup, size=size.normal)
plotshape(series=isCapitulationCandle and isLarge, location=location.belowbar, offset=-1, color=color.rgb(255, 82, 82, 20), style=shape.triangleup, size=size.large)
```
Plotting : The script plots support levels and highlights capitulation candles with different sizes based on volume significance.
```pine
plot(supportLevel, title="Support Level", color=color.rgb(255, 82, 82, 50), linewidth=1, style=plot.style_line)
```
How to Use
Configuring Inputs : Adjust the volume multiplier, support lookback period, ATR multiplier, and volume thresholds as needed.
Interpreting the Indicator : Use the plotted support levels and highlighted capitulation candles to identify potential market bottoms and reversal points.
Signal Confirmation : Look for capitulation candles with high volumes breaking significant support levels and meeting the ATR range condition. The dynamic arrow sizes help to assess the volume's significance.
This script provides a detailed and visual method to identify potential capitulation events in the cryptocurrency market, aiding traders in spotting possible reversal points and making informed trading decisions.
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.
Wolfe Wave Detector [LuxAlgo]The Wolfe Wave Detector displays occurrences of Wolfe Waves, alongside a target line. A multiple swing detection approach is used to maximize the number of detected waves.
The indicator includes a dashboard with the number of detected waves, as well as the number of reached targets.
🔶 USAGE
The Wolfe Wave pattern is a chart pattern composed of five segments, with the initial segment extremities (points XABCD) forming a channel containing price variations.
After the price reaches point D , we can expect a reversal toward a target line (point E ). The target line is obtained by connecting and extending point X -> C .
The script draws the XABCD pattern and a projection of where E might potentially be located.
The projection is derived from the intersection between the target line and a line starting from D , parallel to B-C . From this line, margins are added, left and right, creating a wedge-shaped figure in most cases.
When the price passes the target line, this is highlighted by a dot. The dot and pattern are green by default when the target is above D and red when the target is below D . Colors can be edited in the settings. The dashed target line is colored in the opposite color.
As seen in the above example, the price trend can reverse after reaching the target line.
🔹 Symmetry
Ideally, the Wolfe Wave must have a degree of symmetry; every upward line should have a similar angle to the other upward lines, and the same should be true for the downward lines.
Also, the lines forming the channel should be as parallel as possible.
Users have the option to adjust the tolerance:
Margin controls the wave symmetry of the pattern
Angle controls the channel symmetry of the pattern
It's important to note that in both cases, a lower number will lead to more symmetrical patterns, but they may appear less frequently.
It is also important to note that increasing the Margin can delay validating the pattern. In the meantime, the price could surpass the channel in the opposite direction, invalidating and deleting the otherwise valid pattern.
🔹 Multiple Swings
Users can set a Minimum Swing length (for example 2) and a Maximum Swing length (for example 100) which defines the range of the swing point detection length, higher values for these settings will detect longer-term Wolfe patterns, while a larger range will allow for the detection of a larger number of patterns.
By using multiple swings, it is possible to find smaller next to larger patterns at the same time.
The dashboard shows the number of patterns found and targets reached. When, for example, bullish patterns are disabled in the settings, the dashboard only shows the results of bearish patterns.
🔹 Extend Target Line
The publication includes a setting that allows the Target Line to be extended up to 50 bars further. As seen in the above example, the Target Line can still be reached even after the pattern has been finalized. Once the Target Line is reached, it won't be updated further.
Here is another example of a Target Line being reached later on.
The Target Line acted as a support level, after which where the price changed direction.
🔹 Show Progression
An option is included to show the progression before the pattern is completed. Users can make use of the XABC pattern or visualize where point D should be positioned.
The focus lies on the bar range (between the left and right borders of the grey rectangle). The pattern is considered invalid and deleted when point D is beyond these limits. The height of the rectangle is optional. Ideally, the price should be located between the top and bottom of the rectangle, but it is not mandatory.
Show Progression has three options including:
Full: Show all lines of XABC plus line C-D and rectangle for the position of point D
Partial: Show line C-D and rectangle for the position of point D
None: Only show valid completed patterns
The 'Partial' option in the 'Show Progression' feature is designed to help users locate the desired position of point D without the visual clutter caused by the XABC lines. This can be useful for those who prefer a cleaner visual representation of the evolving pattern.
🔶 SETTINGS
🔹 Swing Length
Minimum: Minimum length used for the swing detection.
Maximum Swing Length: Maximum length used for the swing detection.
🔹 Tolerance
Margin: Influences the symmetry of the pattern; with a higher number allowing for less symmetry.
Angle: Influences the symmetry of the channel; with a higher number allowing for less symmetry.
🔹 Style
Toggle: Bullish/Bearish + colors
Extend Target Line: Extend a maximum of 50 bars or until Target Line is reached
Show Progression: Show pattern progression
Dot Size: The size of the dot when the Target Line is reached
🔹 Dashboard
Show Dashboard: Toggle dashboard which shows the number of found patterns and targets reached.
Location: Location of the dashboard on the chart.
Text Size: Text size.
🔹 Calculation
Calculated Bars: Allows the usage of fewer bars for performance/speed improvement
IsAlgo - Manual TrendLine► Overview:
Manual TrendLine is a strategy that allows traders to manually insert a trendline and opens trades when the trendline is retested or when the price hits a new highest high or lowest low. It provides flexibility in trendline configuration and trading behavior, enabling responsive and adaptable trading strategies.
► Description:
The Manual TrendLine strategy revolves around using manually defined trendlines as the primary tool for making trading decisions. Traders start by specifying two key points on the chart to establish the trendline. Each point is defined by a specific time and price, enabling precise placement according to the trader’s analysis and insights. Additionally, the strategy allows for the adjustment of the trendline’s width, which acts as a buffer zone around the trendline, providing flexibility in how closely price movements must align with the trendline to trigger trades.
Once the trendline is established, the strategy continuously monitors price movements relative to this line. One of its core functions is to execute trades when the price retests the trendline. A retest occurs when the price approaches the trendline after initially diverging from it, indicating potential continuation of the prevailing trend. This behavior is often seen as a confirmation of the trend’s strength, and the strategy takes advantage of these moments to enter trades in the direction of the trend.
Beyond retests, the strategy also tracks the formation of new highest highs and lowest lows in relation to the trendline. When the price reaches a new highest high or lowest low, it signifies strong momentum in the trend’s direction. The strategy can be configured to open trades at these critical points.
Another key feature of the strategy is its response to trendline breaks. A break occurs when the price moves through the trendline, potentially signaling a reversal or a significant shift in market sentiment. The strategy can be set to open reverse trades upon such breaks, enabling traders to quickly adapt to changing market conditions. Additionally, traders have the option to stop opening new trades after a trendline break, helping to avoid trades during periods of uncertainty or increased volatility.
↑ Up Trend Example:
↓ Down Trend Example:
► Features and Settings:
⚙︎ TrendLine: Define the time and price of the two main points of the trendline, and set the trendline width.
⚙︎ Entry Candle: Specify the minimum and maximum body size and the body-to-candle size ratio for entry candles.
⚙︎ Trading Session: Define specific trading hours during which the strategy operates, restricting trades to preferred market periods.
⚙︎ Trading Days: Specify active trading days to avoid certain days of the week.
⚙︎ Backtesting: backtesting for a selected period to evaluate strategy performance. This feature can be deactivated if not needed.
⚙︎ Trades: Configure trade direction (long, short, or both), position sizing (fixed or percentage-based), maximum number of open trades, and daily trade limits.
⚙︎ Trades Exit: Set profit/loss limits, specify trade duration, or exit based on band reversal signals.
⚙︎ Stop Loss: Choose from various stop-loss methods, including fixed pips, ATR-based, or highest/lowest price points within a specified number of candles. Trades can also be closed after a certain number of adverse candle movements.
⚙︎ Break Even: Adjust stop loss to break even once predefined profit levels are reached, protecting gains.
⚙︎ Trailing Stop: Implement a trailing stop to adjust the stop loss as the trade becomes profitable, securing gains and potentially capturing further upside.
⚙︎ Take Profit: Set up to three take-profit levels using methods such as fixed pips, ATR, or risk-to-reward ratios. Alternatively, specify a set number of candles moving in the trade’s direction.
⚙︎ Alerts: Comprehensive alert system to notify users of significant actions, including trade openings and closings. Supports dynamic placeholders for take-profit levels and stop-loss prices.
⚙︎ Dashboard: Visual display on the chart providing detailed information about ongoing and past trades, aiding users in monitoring strategy performance and making informed decisions.
► Backtesting Details:
Timeframe: 30-minute EURUSD chart
Initial Balance: $10,000
Order Size: 500 units
Commission: 0.05%
Slippage: 5 ticks
This strategy opens trades around a manually drawn trendline, which results in a smaller number of closed trades.
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.
MTF Regime Filter II [CHE]Regime Filter II - Comprehensive Guide
Introduction
The "Regime Filter II " indicator is a tool designed to help traders identify market trends by smoothing price data and applying a color scheme to visualize bullish and bearish conditions. This guide provides a detailed explanation of the script's functionality, benefits, and how to use it effectively in TradingView.
Key Benefits
1. Trend Identification: Smooths price data to highlight underlying trends, making it easier for traders to spot potential buying or selling opportunities.
2. Visual Clarity: Uses distinct color schemes to differentiate between bullish and bearish market conditions, enhancing visual analysis.
3. Customization: Offers various settings to adjust smoothing and averaging lengths, choose between different color schemes, and set visibility for different timeframes.
4. Neutral Candle Option: Provides an option to display neutral candles for clearer visual representation when market conditions are neither strongly bullish nor bearish.
5. Timeframe Adaptability: Includes functions to determine appropriate step sizes based on different timeframes, ensuring the indicator remains accurate across various trading periods.
Script Breakdown
1. Indicator Declaration
The script starts by declaring itself as a TradingView indicator using the latest version of Pine Script. This sets up the framework for the indicator's functionality.
2. User Inputs for Smoothing and Averaging Lengths
The script allows users to input specific lengths for smoothing and averaging intervals. These inputs are crucial for determining how the price data is processed to identify trends. By adjusting these lengths, users can fine-tune the sensitivity of the indicator to market movements.
3. Color Scheme Selection
Users can choose between two color schemes: "Traditional" and "WT1 0 Rule". The selected color scheme will determine how the indicator colors the candles to represent bullish and bearish conditions. This customization enhances the visual appeal and usability of the indicator according to personal preferences.
4. Settings for Timeframe Visibility
The script includes settings that allow users to specify which timeframes the indicator should be visible on. This feature helps traders focus on the most relevant timeframes for their trading strategies. Additionally, users can set the number of recent candles to display, providing a clear view of the most recent market trends.
5. Color Definitions
The indicator defines specific colors for bearish and bullish candles. Bearish candles are colored red, while bullish candles are green. These color definitions are applied based on the selected color scheme and the calculated trend, providing a quick visual reference for market conditions.
6. Time Constants
To manage different timeframes effectively, the script uses constants that represent various time intervals in milliseconds, such as minutes, hours, and days. These constants are used to convert timeframes into a format that the script can work with to determine the appropriate step size for calculations.
7. Step Size Determination
The script includes a function that determines the step size based on the selected timeframe. This function ensures that the indicator adapts to different timeframes, maintaining its accuracy and relevance across various trading periods. The step size is calculated based on time intervals, and appropriate labels (like "60", "240", "1D") are assigned.
- For timeframes less than or equal to 1 minute, the step size is set to "60".
- For timeframes less than or equal to 5 minutes, the step size is set to "240".
- For timeframes less than or equal to 1 hour, the step size is set to "1D" (daily).
- For timeframes less than or equal to 4 hours, the step size is set to "3D" (three days).
- For timeframes less than or equal to 12 hours, the step size is set to "7D" (weekly).
- For timeframes less than or equal to 1 day, the step size is set to "1M" (monthly).
- For timeframes less than or equal to 1 week, the step size is set to "3M" (three months).
- For all other timeframes, the step size is set to "12M" (yearly).
8. Trend Calculation
The core of the indicator is its ability to calculate market trends. Here's a detailed breakdown of how the `calculateTrend` function works:
- Initialization: Variables for the middle price and scale, and summations of high/low prices and ranges, are initialized.
- Summation Loop: A loop runs over the smoothing length to calculate the sum of high and low prices and their range.
- Middle and Scale Calculation: The middle price is determined as the average of high/low sums, and the scale is calculated as a fraction of the average range.
- Normalization: The high, low, and close prices are normalized based on the middle price and scale.
- HT Calculation: The normalized prices are smoothed using a simple moving average (SMA).
- Frequency and Exponential Calculations: The frequency and related constants (a, c1, c2, c3) are calculated for further smoothing.
- Smoothed Moving Average (SMA): A smoothed moving average is computed using the HT values and exponential constants.
- WT1 and WT2 Calculation: The final smoothed values (WT1) and their average (WT2) are derived.
9. Color Application Based on Trend
Once the trend is calculated, the script applies the appropriate color to the candles based on the selected color scheme. This function ensures that the visual representation of the trend is consistent with the user’s preferences.
10. Label Plotting for Timeframes
If the option to display timeframe labels is enabled, the script plots labels on the chart to indicate the current timeframe. This feature helps users quickly identify which timeframe they are analyzing.
11. Shape Plotting Based on Trend and Color Scheme
The indicator plots shapes (squares) on the chart based on the calculated trend and selected color scheme. These shapes provide an additional visual cue for market conditions, enhancing the overall clarity of the indicator.
12. Neutral Candle Color Option
The script includes an option to set the color of neutral candles when market conditions are neither strongly bullish nor bearish. This option helps traders better visualize periods of market indecision.
Summary
The "Regime Filter II " is a powerful and customizable tool for traders, offering clear visual cues for market trends and adaptability to various timeframes. By smoothing price data and applying intuitive color schemes, it helps traders make more informed decisions. With features like adjustable smoothing lengths, multiple color schemes, and optional neutral candle displays, this indicator enhances market analysis and trading strategy development. By following this comprehensive guide, traders can effectively utilize the "Regime Filter II " indicator to enhance their market analysis and make more informed trading decisions.
Best regards
ICT Balance Price Range [UAlgo]The "ICT Balance Price Range " indicator identifies and visualizes potential balance price ranges (BPRs) on a price chart. These ranges are indicative of periods where the market exhibits balance between bullish and bearish forces, often preceding significant price movements.
🔶 What is Balanced Price Range (BPR) ?
Balanced Price Range is a concept based on Fair Value Gap. Balanced price range (BPR) is the area on price chart where two opposite fair value gaps overlap.
When price approaches the Balanced Price Range (BPR), we assume that the price will react quickly and strongly here. This is because its the combination of two fair value gaps and being a good point of interest for smart money traders.
🔶 Key Features:
Bars to Consider: Determines the number of bars to evaluate for BPR conditions.
Threshold for BPR: Sets the minimum range required for a valid BPR to be identified.
Remove Old BPR: Option to automatically remove invalidated BPRs from the chart.
Bearish/Bullish Box Color: Customizable colors for visual representation of bearish and bullish BPRs.
🔶 Disclaimer
This indicator is provided for educational and informational purposes only.
It should not be considered as financial advice or a recommendation to buy or sell any financial instrument.
The use of this indicator involves inherent risks, and users should employ their own judgment and conduct their own research before making any trading decisions. Past performance is not indicative of future results.
🔷 Related Scripts
Fair Value Gaps (FVG)
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.
Gold Option Signals with EMA and RSIIndicators:
Exponential Moving Averages (EMAs): Faster to respond to recent price changes compared to simple moving averages.
RSI: Measures the magnitude of recent price changes to evaluate overbought or oversold conditions.
Signal Generation:
Buy Call Signal: Generated when the short EMA crosses above the long EMA and the RSI is not overbought (below 70).
Buy Put Signal: Generated when the short EMA crosses below the long EMA and the RSI is not oversold (above 30).
Plotting:
EMAs: Plotted on the chart to visualize trend directions.
Signals: Plotted as shapes on the chart where conditions are met.
RSI Background Color: Changes to red for overbought and green for oversold conditions.
Steps to Use:
Add the Script to TradingView:
Open TradingView, go to the Pine Script editor, paste the script, save it, and add it to your chart.
Interpret the Signals:
Buy Call Signal: Look for green labels below the price bars.
Buy Put Signal: Look for red labels above the price bars.
Customize Parameters:
Adjust the input parameters (e.g., lengths of EMAs, RSI levels) to better fit your trading strategy and market conditions.
Testing and Validation
To ensure that the script works as expected, you can test it on historical data and validate the signals against known price movements. Adjust the parameters if necessary to improve the accuracy of the signals.
US M2### Relevance and Functionality of the "US M2" Indicator
#### Relevance
The "US M2" indicator is relevant for several reasons:
1. **Macro-Economic Insight**: The M2 money supply is a critical indicator of the amount of liquidity in the economy. Changes in M2 can significantly impact financial markets, including equities, commodities, and cryptocurrencies.
2. **Trend Identification**: By analyzing the M2 money supply with moving averages, the indicator helps identify long-term and short-term trends, providing insights into economic conditions and potential market movements.
3. **Trading Signals**: The indicator generates bullish and bearish signals based on moving average crossovers and the difference between current M2 values and their moving averages. These signals can be useful for making informed trading decisions.
#### How It Works
1. **Data Input**:
- **US M2 Money Supply**: The indicator fetches the US M2 money supply data using the "USM2" symbol with a monthly resolution.
2. **Moving Averages**:
- **50-Period SMA**: Calculates the Simple Moving Average (SMA) over 50 periods (months) to capture short-term trends.
- **200-Period SMA**: Calculates the SMA over 200 periods to identify long-term trends.
3. **Difference Calculation**:
- **USM2 Difference**: Computes the difference between the current M2 value and its 50-period SMA to highlight deviations from the short-term trend.
4. **Amplification**:
- **Amplified Difference**: Multiplies the difference by 100 to make the deviations more visible on the chart.
5. **Bullish and Bearish Conditions**:
- **Bullish Condition**: When the current M2 value is above the 50-period SMA, indicating a positive short-term trend.
- **Bearish Condition**: When the current M2 value is below the 50-period SMA, indicating a negative short-term trend.
6. **Short-Term SMA of Amplified Difference**:
- **14-Period SMA**: Applies a 14-period SMA to the amplified difference to smooth out short-term fluctuations and provide a clearer trend signal.
7. **Plots and Visualizations**:
- **USM2 Plot**: Plots the US M2 data for reference.
- **200-Period SMA Plot**: Plots the long-term SMA to show the broader trend.
- **Amplified Difference Histogram**: Plots the amplified difference as a histogram with green bars for bullish conditions and red bars for bearish conditions.
- **SMA of Amplified Difference**: Plots the 14-period SMA of the amplified difference to track the trend of deviations.
8. **Moving Average Cross Signals**:
- **Bullish Cross**: Plots an upward triangle when the 50-period SMA crosses above the 200-period SMA, signaling a potential long-term uptrend.
- **Bearish Cross**: Plots a downward triangle when the 50-period SMA crosses below the 200-period SMA, signaling a potential long-term downtrend.
### Summary
The "US M2" indicator provides a comprehensive view of the US M2 money supply, highlighting significant trends and deviations. By combining short-term and long-term moving averages with amplified difference analysis, it offers valuable insights and trading signals based on macroeconomic liquidity conditions.
BTC x M2 Divergence (Weekly)### Why the "M2 Money Supply vs BTC Divergence with Normalized RSI" Indicator Should Work
IMPORTANT
- Weekly only indicator
- Combine it with BTC Halving Cycle Profit for better results
The "M2 Money Supply vs BTC Divergence with Normalized RSI" indicator leverages the relationship between macroeconomic factors (M2 money supply) and Bitcoin price movements, combined with technical analysis tools like RSI, to provide actionable trading signals. Here's a detailed rationale on why this indicator should be effective:
1. **Macroeconomic Influence**:
- **M2 Money Supply**: Represents the total money supply, including cash, checking deposits, and easily convertible near money. Changes in M2 reflect liquidity in the economy, which can influence asset prices, including Bitcoin.
- **Bitcoin Sensitivity to Liquidity**: Bitcoin, being a digital asset, often reacts to changes in liquidity conditions. An increase in money supply can lead to higher asset prices as more money chases fewer assets, while a decrease can signal tightening conditions and lower prices.
2. **Divergence Analysis**:
- **Economic Divergence**: The indicator calculates the divergence between the percentage changes in M2 and Bitcoin prices. This divergence can highlight discrepancies between Bitcoin's price movements and broader economic conditions.
- **Market Inefficiencies**: Large divergences may indicate inefficiencies or imbalances that could lead to price corrections or trends. For example, if M2 is increasing (indicating more liquidity) but Bitcoin is not rising proportionately, it might suggest a potential upward correction in Bitcoin's price.
3. **Normalization and Smoothing**:
- **Normalized Divergence**: Normalizing the divergence to a consistent scale (-100 to 100) allows for easier comparison and interpretation over time, making the signals more robust.
- **Smoothing with EMA**: Applying Exponential Moving Averages (EMAs) to the normalized divergence helps to reduce noise and identify the underlying trend more clearly. This double-smoothed divergence provides a clearer signal by filtering out short-term volatility.
4. **RSI Integration**:
- **RSI as a Momentum Indicator**: RSI measures the speed and change of price movements, indicating overbought or oversold conditions. Normalizing the RSI and incorporating it into the divergence analysis helps to confirm the strength of the signals.
- **Combining Divergence with RSI**: By using RSI in conjunction with divergence, the indicator gains an additional layer of confirmation. For instance, a bullish divergence combined with an oversold RSI can be a strong buy signal.
5. **Dynamic Zones and Sensitivity**:
- **Good DCA Zones**: Highlighting zones where the divergence is significantly positive (good DCA zones) indicates periods where Bitcoin might be undervalued relative to economic conditions, suggesting good buying opportunities.
- **Red Zones**: Marking zones with extremely negative divergence, combined with RSI confirmation, identifies potential market tops or bearish conditions. This helps traders avoid buying into overbought markets or consider selling.
- **Peak Detection**: The sensitivity setting for detecting upside down peaks allows for early identification of potential market bottoms, providing timely entry points for traders.
6. **Visual Cues and Alerts**:
- **Clear Visualization**: The plots and background colors provide immediate visual feedback, making it easier for traders to spot significant conditions without deep analysis.
- **Alerts**: Built-in alerts for key conditions (good DCA zones, red zones, sell signals) ensure traders can act promptly based on the indicator's signals, enhancing the practicality of the tool.
### Conclusion
The "M2 Money Supply vs BTC Divergence with Normalized RSI" indicator integrates macroeconomic data with technical analysis to offer a comprehensive view of Bitcoin's market conditions. By analyzing the divergence between M2 money supply and Bitcoin prices, normalizing and smoothing the data, and incorporating RSI for momentum confirmation, the indicator provides robust signals for identifying potential buying and selling opportunities. This holistic approach increases the likelihood of capturing significant market movements and making informed trading decisions.
Sniper Entry using RSI confirmationThis is a sniper entry indicator that provides Buy and Sell signals using other Indicators to give the best possible Entries (note: Entries will not be 100 percent accurate and analysis should be done to support an entry)
Moving Average Crossovers:
The indicator uses two moving averages: a short-term SMA (Simple Moving Average) and a long-term SMA.
When the short-term SMA crosses above the long-term SMA, it generates a buy signal (indicating potential upward momentum).
When the short-term SMA crosses below the long-term SMA, it generates a sell signal (indicating potential downward momentum).
RSI Confirmation:
The indicator incorporates RSI (Relative Strength Index) to confirm the buy and sell signals generated by the moving average crossovers.
RSI is used to gauge the overbought and oversold conditions of the market.
A buy signal is confirmed if RSI is below a specified overbought level, indicating potential buying opportunity.
A sell signal is confirmed if RSI is above a specified oversold level, indicating potential selling opportunity.
Dynamic Take Profit and Stop Loss:
The indicator calculates dynamic take profit and stop loss levels based on the Average True Range (ATR).
ATR is used to gauge market volatility, and the take profit and stop loss levels are adjusted accordingly.
This feature helps traders to manage their risk effectively by setting appropriate profit targets and stop loss levels.
Combining the information provided by these, the indicator will provide an entry point with a provided take profit and stop loss. The indicator can be applied to different asset classes. Risk management must be applied when using this indicator as it is not 100% guaranteed to be profitable.
Goodluck!
Percentile Nearest Rank Without Arrays [CHE] Presentation of the "Percentile Nearest Rank Without Arrays " Indicator
The "Percentile Nearest Rank Without Arrays " is a robust trading indicator designed to calculate the percentile value of a specific price within a defined time frame. This indicator provides traders with a visual representation that helps identify market trends and potential turning points.
Key Features and Functions:
- Percentile Calculation: The indicator calculates the percentile of the closing price within a specified period (default length is 15 periods). This allows traders to view the current price in the context of its historical distribution.
- Customizable Parameters: Traders can adjust the length of the observed period and the desired percentile value, making the analysis more tailored to their trading strategies.
- Color-Coded Visualization: The indicator uses color coding to signal whether the current closing price is above (green) or below (red) the calculated percentile value, providing visual clarity and quick decision-making.
- Efficiency Without Arrays: By avoiding the use of arrays, the indicator is more efficient in terms of computation and memory usage. This results in faster performance, especially when dealing with large datasets or real-time data.
Importance for Traders:
1. Trend Identification: By analyzing whether the current price is above or below a specific percentile value, traders can identify trends early and act accordingly.
2. Risk Management: The indicator helps traders better understand volatility and price distribution, leading to more effective risk management.
3. Trading Strategies: It can be used as part of trading strategies to identify entry and exit points based on statistical distributions.
4. Simplicity and Efficiency: As the indicator operates without the use of arrays, it is more efficient and simpler to implement, reducing computation time and improving the performance of the trading platform.
Scientific Explanation of Percentile Nearest Rank:
The Percentile Nearest Rank method is a statistical technique used to determine the relative standing of a value within a data set. For a given dataset of length \( n \) and a desired percentile \( p \), the method follows these steps:
1. Index Calculation: The index corresponding to the desired percentile is calculated using the formula:
index = ( p / 100 n ) -1
where "ceiling" denotes rounding up to the nearest integer.
2. Value Sorting: The values in the dataset are conceptually sorted from smallest to largest.
3. Count Comparison: For each value in the dataset, count how many values are smaller. When the count matches the calculated index, the value at this position is the percentile value.
4. Result Assignment: The value identified as the percentile value is then used for further analysis or plotting.
This method is advantageous for trading because it provides a non-parametric way to understand price distributions, making it less sensitive to outliers and more robust in volatile markets.
Scientific Context and Utility:
- Statistical Robustness: Unlike mean and median, the percentile provides a robust measure of the data distribution, less influenced by extreme values. This robustness is crucial for traders dealing with volatile markets.
- Non-Parametric Analysis: Percentiles do not assume any underlying distribution (e.g., normal distribution) of the data, making the analysis more flexible and broadly applicable.
- Quantitative Decision Making: By using percentiles, traders can make data-driven decisions based on the relative standing of current prices within historical data, enhancing the objectivity of their strategies.
- Efficiency Without Arrays: Avoiding the use of arrays reduces memory consumption and computational overhead, making the indicator more suitable for real-time applications and large datasets. This improves overall performance and responsiveness on trading platforms, which is crucial for making timely trading decisions.
In summary, the "Percentile Nearest Rank Without Arrays " indicator is a powerful tool for traders seeking to integrate statistical price distribution insights into their trading strategies. It provides a robust, non-parametric, and visually intuitive method to analyze market trends and volatility, while offering enhanced computational efficiency by avoiding the use of arrays.
HPotter Last PriceIf you, like me, like to watch the market in real time for a long time, then this script will be useful to you. Stay tuned.
A script that helps you navigate the current price and the latest highs and lows
IMPORTANT: For the script to work correctly, you must enable "On every tick" in Preoperties.
Throw it on any chart.
On the right appears:
white price - last transaction price
green price - current high that has not been reached (looks at bars in history)
red price - current low that has not been reached (looks at bars in history)
yellow price - new high or low installed
QuasimodoThis indicator helps traders spot certain patterns on a price chart that might indicate a change in price direction. These patterns are known as "engulfing patterns."
How It Works1.
Bullish Engulfing Patterns:- The current bar (or candle) closes higher than it opens (it's a green or white candle).- The previous bar closed lower than it opened (it was a red or black candle).- The current bar's high is higher than the previous bar's high, and its low is lower than the previous bar's low.- There's another variation where both the current and previous bars are green, but the current bar is still higher and lower than the previous one.
2. Bearish Engulfing Patterns:- The current bar closes lower than it opens (it's a red or black candle).- The previous bar closed higher than it opened (it was a green or white candle).- The current bar's low is lower than the previous bar's low, and its high is higher than the previous bar's high.- There's another variation where both the current and previous bars are red, but the current bar is still higher and lower than the previous one.
What It Shows-
When the indicator spots one of these patterns, it colors the previous candle:-
Yellow for a bullish pattern (price might go up).-
Pink for a bearish pattern (price might go down).
Alerts- The indicator can also send an alert to let you know when it finds one of these patterns, so you don't miss it.
CZ's Hybrid IndicatorCZ's Hybrid Indicator is designed to provide traders with key support and resistance levels, buy and sell signals, and trend analysis.
Functions and Usage:
Support and Resistance Calculation:
The indicator calculates support and resistance levels using the lowest and highest prices over a specified period (srLength), defaulted to 20 bars.
Usage: These levels help traders identify potential price reversal points.
Buy and Sell Levels Calculation:
Similar to support and resistance, buy and sell levels are calculated using the lowest and highest prices over a specified period (bsLength), defaulted to 20 bars.
Usage: These levels can be used to identify potential entry and exit points for trades.
Plotting Levels:
Support and resistance levels are plotted in green and red, respectively, with a specified offset to align them with the price bars.
Buy and sell levels are also plotted in green and red, with a smaller offset for immediate identification.
Usage: Visual aids on the chart for easy recognition of key levels.
EMA 200:
An Exponential Moving Average (EMA) over 200 bars is calculated and plotted, changing color based on whether the current price is above (green) or below (red) the EMA.
Usage: EMA 200 is a common trend-following indicator, helping traders determine the overall trend direction.
Trend Signal:
A trend signal is calculated using an EMA over a user-defined period (trend Length), defaulted to 50 bars. The trend is identified as either "Uptrend" or "Downtrend".
Usage: Helps traders understand the prevailing market trend.
Filling Areas:
The script fills the area between support and buy levels and resistance and sell levels with colors indicating the trend direction.
Usage: Enhances visual interpretation of support/resistance and buy/sell levels relative to the trend.
Buy and Sell Signals:
The script generates buy and sell signals when the price crosses the support/resistance or buy/sell levels.
Usage: Alerts traders to potential trading opportunities.
Labels for Trend Signal:
Labels indicating "Uptrend" or "Downtrend" are displayed on the chart based on the trend signal.
Usage: Provides clear trend information on the chart.
Trade Levels:
The script calculates and displays stop-loss, entry, and multiple take-profit levels for buy and sell signals.
Usage: Assists traders in setting up their trades with predefined risk management levels.
Alerts:
Alerts are set up for buy and sell signals, allowing traders to receive notifications when certain conditions are met.
Usage: Keeps traders informed of potential trading signals even when not actively monitoring the chart.
Han Algo - Moving average strategyHan Algo Indicator Strategy Description
Overview:
The Han Algo Indicator is designed to identify trend directions and signal potential buy and sell opportunities based on moving average crossovers. It aims to provide clear signals while filtering out noise and minimizing false signals.
Indicators Used:
Moving Averages:
200 SMA (Simple Moving Average): Used as a long-term trend indicator.
100 SMA: Provides a medium-term perspective on price movements.
50 SMA: Offers insights into shorter-term trends.
20 SMA: Provides a very short-term perspective on recent price actions.
Trend Identification:
The indicator identifies the trend based on the relationship between the closing price (close) and the 200 SMA (ma_long):
Uptrend: When the closing price is above the 200 SMA.
Downtrend: When the closing price is below the 200 SMA.
Sideways: When the closing price is equal to the 200 SMA.
Buy and Sell Signals:
Buy Signal: Generated when transitioning from a downtrend to an uptrend (buy_condition):
Displayed as a green "BUY" label above the price bar.
Sell Signal: Generated when transitioning from an uptrend to a downtrend (sell_condition):
Displayed as a red "SELL" label below the price bar.
Signal Filtering:
Signals are filtered to prevent consecutive signals occurring too closely (min_distance_bars parameter):
Ensures that only significant trend reversals are captured, minimizing false signals.
Visualization:
Background Color:
Changes to green for uptrend and red for downtrend (bgcolor function):
Provides visual cues for current market sentiment.
Usage:
Traders can customize the indicator's parameters (long_term_length, medium_term_length, short_term_length, very_short_term_length, min_distance_bars) to align with their trading preferences and timeframes.
The Han Algo Indicator helps traders make informed decisions by highlighting potential trend reversals and aligning with market trends identified through moving average analysis.
Disclaimer:
This indicator is intended for educational purposes and as a visual aid to support trading decisions. It should be used in conjunction with other technical analysis tools and risk management strategies.
ET's FlagsPurpose:
This Pine Script is designed for the TradingView platform to identify and visually highlight specific technical chart patterns known as "Bull Flags" and "Bear Flags" on financial charts. These patterns are significant in trading as they can indicate potential continuation trends after a brief consolidation. The script includes mechanisms to manage signal frequency through a cooldown period, ensuring that the trading signals are not excessively frequent and are easier to interpret.
Functionality:
Input Parameters:
flagpole_length: Defines the number of bars to consider when identifying the initial surge in price, known as the flagpole.
flag_length: Determines the number of bars over which the flag itself is identified, representing a period of consolidation.
percent_change: Sets the minimum percentage change required to validate the presence of a flagpole.
cooldown_period: Specifies the number of bars to wait before another flag can be identified, reducing the risk of overlapping signals.
Percentage Change Calculation:
The script calculates the percentage change between two price points using a helper function percentChange(start, end). This function is crucial for determining whether the price movement within the specified flagpole_length meets the threshold set by percent_change, thus qualifying as a potential flagpole.
Flagpole Identification:
Bull Flagpole: Identified by finding the lowest close price over the flagpole_length and determining if the subsequent price rise meets or exceeds the specified percent_change.
Bear Flagpole: Identified by finding the highest close price over the flagpole_length and checking if the subsequent price drop is sufficient as per the percent_change.
Flag Identification:
After identifying a flagpole, the script assesses if the price action within the next flag_length bars consolidates in a manner that fits a flag pattern. This involves checking if the price fluctuation stays within the bounds set by the percent_change.
Signal Plotting:
If a bull or bear flag pattern is confirmed, and the cooldown period has passed since the last flag of the same type was identified, the script plots a visual shape on the chart:
Green shapes below the price bar for Bull Flags.
Red shapes above the price bar for Bear Flags.
Line Drawing:
For enhanced visualization, the script draws lines at the high and low prices of the flag during its formation period. This visually represents the consolidation phase of the flag pattern.
Debugging Labels:
The script optionally displays labels at the flag formation points, showing the exact percentage change achieved during the flagpole formation. This feature aids users in understanding why a particular segment of the price chart was identified as a flag.
Compliance and Usage:
This script does not automate trading but provides visual aids and potential signals based on historical price analysis. It adheres to TradingView's scripting policies by only accessing publicly available price data and user-defined parameters without executing trades or accessing any external data.
Conclusion:
This Pine Script is a powerful tool for traders who follow technical analysis, offering a clear, automated way to spot potential continuation patterns in the markets they monitor. By emphasizing visual clarity and reducing signal redundancy through cooldown periods, the script enhances decision-making processes for chart analysis on TradingView.
TrendVortex PowerThis Pine Script indicator in TradingView creates weekly labels for each trading day (Monday to Friday) and generates buy/sell signals based on a swing calculation:
Weekday Labels
Purpose: Labels each trading day of the week with different colors.
Implementation:
Initializes variables for labels (mondayLabel, tuesdayLabel, etc.).
Uses dayofweek function to determine the current day of the week.
Checks if the current day is different from the previous day to avoid redundant label creation.
Creates labels using label.new function with appropriate colors based on the day of the week.
Buy and Sell Signals:
Purpose: Identifies buy and sell signals based on swing high and swing low points.
Implementation:
Uses a specified number of bars (no) to determine swing highs (res) and lows (sup).
Determines the direction (avd) based on whether the close is above the previous swing high or below the previous swing low.
Tracks the last non-zero direction change (avn).
Calculates the trailing stop loss (tsl) based on whether the direction is bullish or bearish.
Generates buy signals (Buy) when the close crosses above the trailing stop loss (tsl), and sell signals (Sell) when the close crosses below.
Alerts:
Purpose: Alerts are generated when buy or sell signals occur.
Implementation:
Uses alertcondition function to trigger alerts when Buy or Sell conditions are met.
Optional: Remove labels on weekends
Purpose: Prevents labels from appearing on weekends or non-trading days.
Implementation: Checks if the current day (dayOfWeek) is Saturday or Sunday, and deletes the labels (mondayLabel, tuesdayLabel, etc.) if true.
Summary:
This indicator provides visual and alert-based indications of buy and sell signals based on swing highs and lows, alongside labeling each trading day of the week in a distinctive manner. It's designed to assist traders in identifying potential entry and exit points based on these technical signals. Adjustments can be made to parameters such as the swing number (no) and color schemes to fit specific trading strategies or preferences.
Inside Bar Setup [as]Inside Bar Setup Indicator Description
The **Inside Bar Setup ** indicator is a powerful tool for traders to identify and visualize inside bar patterns on their charts. An inside bar pattern occurs when the current candle's high is lower than the previous candle's high, and the current candle's low is higher than the previous candle's low. This pattern can indicate a potential breakout or a continuation of the existing trend.
Key Features:
1. **Highlight Inside Bar Patterns:**
- The indicator highlights inside bar patterns with distinct colors for bullish and bearish bars. Bullish inside bars are colored with the user-defined bull bar color (default lime), and bearish inside bars are colored with the user-defined bear bar color (default maroon).
2. **Marking Mother Candle High and Low:**
- The high and low of the mother candle (the candle preceding the inside bar) are marked with horizontal lines. The high is marked with a green line, and the low is marked with a red line.
- These levels are labeled as "Range High" and "Range Low" respectively, with the labels displayed a few bars to the right for clarity. The labels have a semi-transparent background for better visibility.
3. **Target Levels:**
- The indicator calculates and plots potential target levels (T1 and T2) for both long and short positions based on user-defined multipliers of the mother candle's range.
- For long positions, T1 and T2 are plotted above the mother candle's high.
- For short positions, T1 and T2 are plotted below the mother candle's low.
- These target levels are optional and can be toggled on or off via the input settings.
4. **Customizable Inputs:**
- **Colors:**
- Bull Bar Color: Customize the color for bullish inside bars.
- Bear Bar Color: Customize the color for bearish inside bars.
- **Long Targets:**
- Show Long T1: Toggle the display of the first long target.
- Show Long T2: Toggle the display of the second long target.
- Long T1: Multiplier for the first long target above the mother candle's high.
- Long T2: Multiplier for the second long target above the mother candle's high.
- **Short Targets:**
- Show Short T1: Toggle the display of the first short target.
- Show Short T2: Toggle the display of the second short target.
- Short T1: Multiplier for the first short target below the mother candle's low.
- Short T2: Multiplier for the second short target below the mother candle's low.
5. **New Day Detection:**
- The indicator detects the start of a new day and clears the inside bar arrays, ensuring that the pattern detection is always current.
#### Usage:
- Add the indicator to your TradingView chart.
- Customize the inputs to match your trading strategy.
- Watch for highlighted inside bars to identify potential breakout opportunities.
- Use the marked range highs and lows, along with the calculated target levels, to plan your trades.
This indicator is ideal for traders looking to capitalize on inside bar patterns and their potential breakouts. It provides clear visual cues and customizable settings to enhance your trading decisions.
Note:
This indicator is based on famous 15 min inside bar strategy shared by Subashish Pani on his youtube channel Power of stocks. Please watch his videos to use this indicator for best results.
RunRox - Backtesting System (ASMC)Introducing RunRox - Backtesting System (ASMC), a specially designed backtesting system built on the robust structure of our Advanced SMC indicator. This innovative tool evaluates various Smart Money Concept (SMC) trading setups and serves as an automatic optimizer, displaying which entry and exit points have historically shown the best results. With cutting-edge technology, RunRox - Backtesting System (ASMC) provides you with effective strategies, maximizing your trading potential and taking your trading to the next level
🟠 HOW OUR BACKTESTING SYSTEM WORKS
Our backtesting system for the Advanced SMC (ASMC) indicator is meticulously designed to provide traders with a thorough analysis of their Smart Money Concept (SMC) strategies. Here’s an overview of how it works:
🔸 Advanced SMC Structure
Our ASMC indicator is built upon an enhanced SMC structure that integrates the Institutional Distribution Model (IDM), precise retracements, and five types of order blocks (CHoCH OB, IDM OB, Local OB, BOS OB, Extreme OB). These components allow for a detailed understanding of market dynamics and the identification of key trading opportunities.
🔸 Data Integration and Analysis
1. Historical Data Testing:
Our system tests various entry and exit points using historical market data.
The ASMC indicator is used to simulate trades based on predefined SMC setups, evaluating their effectiveness over a specified time period.
Traders can select different parameters such as entry points, stop-loss, and take-profit levels to see how these setups would have performed historically.
2. Entry and Exit Events:
The backtester can simulate trades based on 12 different entry events, 14 target events, and 14 stop-loss events, providing a comprehensive testing framework.
It allows for testing with multiple combinations of entry and exit strategies, ensuring a robust evaluation of trading setups.
3. Order Block Sensitivity:
The system uses the sensitivity settings from the ASMC indicator to determine the most relevant order blocks and fair value gaps (FVGs) for entry and exit points.
It distinguishes between different types of order blocks, helping traders identify strong institutional zones versus local zones.
🔸 Optimization Capabilities
1. Auto-Optimizer:
The backtester includes an auto-optimizer feature that evaluates various setups to find those with the best historical performance.
It automatically adjusts parameters to identify the most effective strategies for both trend-following and counter-trend trading.
2. Stop Loss and Take Profit Optimization:
It optimizes stop-loss and take-profit levels by testing different settings and identifying those that provided the best historical results.
This helps traders refine their risk management and maximize potential returns.
3. Trailing Stop Optimization:
The system also optimizes trailing stops, ensuring that traders can maximize their profits by adjusting their stops dynamically as the market moves.
🔸 Comprehensive Reporting
1. Performance Metrics:
The backtesting system provides detailed reports, including key performance metrics such as Net Profit, Win Rate, Profit Factor, and Max Drawdown.
These metrics help traders understand the historical performance of their strategies and make data-driven decisions.
2. Flexible Settings:
Traders can adjust initial balance, commission rates, and risk per trade settings to simulate real-world trading conditions.
The system supports testing with different leverage settings, allowing for realistic assessments even with tight stop-loss levels.
🔸 Conclusion
The RunRox Backtesting System (ASMC) is a powerful tool for traders seeking to validate and optimize their SMC strategies. By leveraging historical data and sophisticated optimization algorithms, it provides insights into the most effective setups, enhancing trading performance and decision-making.
🟠 HERE ARE THE AVAILABLE FEATURES
Historical backtesting for any setup – Select any entry point, exit point, and various stop-loss options to see the results of your setup on historical data.
Auto-optimizer for finding the best setups – The indicator displays settings that have shown the best results historically, providing valuable insights.
Auto-optimizer for counter-trend setups – Discover entry and exit points for counter-trend trading based on historical performance.
Auto-optimizer for stop-loss – The indicator shows stop-loss points that have been most effective historically.
Auto-optimizer for take-profit – The indicator identifies take-profit points that have performed well in historical trading data.
Auto-optimizer for trailing stop – The indicator presents trailing stop settings that have shown the best historical results.
And much more within our indicator, all of which we will cover in this post. Next, we will showcase the possible entry points, targets, and stop-loss options available for testing your strategies
🟠 ENTRY SETTINGS
12 Event Triggers for Trade Entry
Extr. ChoCh OB
Extr. ChoCh FVG
ChoCh
ChoCh OB
ChoCh FVG
IDM OB
IDM FVG
BoS FVG
BoS OB
BoS
Extr. BoS FVG
Extr. BoS OB
3 Trade Direction Options
Long Only: Enter long positions only
Short Only: Enter short positions only
Long and Short: Enter both long and short positions based on trend
3 Levels for Order Block/FVG Entries
Beginning: Enter the trade at the first touch of the Order Block/FVG
Middle: Enter the trade when the middle of the Order Block/FVG is reached
End: Enter the trade upon full filling of the Order Block/FVG
*Three levels work only for Order Blocks and FVG. For trade entries based on BOS or CHoCH, these settings do not apply as these parameters are not available for these types of entries
You can choose any combination of trade entries imaginable.
🟠 TARGET SETTINGS
14 Target Events, Including Fixed % and Fixed RR (Risk/Reward):
Fixed - % change in price
Fixed RR - Risk Reward per trade
Extr. ChoCh OB
Extr. ChoCh FVG
ChoCh
ChoCh OB
ChoCh FVG
IDM OB
IDM FVG
BoS FVG
BoS OB
BoS
Extr. BoS FVG
Extr. BoS OB
3 Levels of Order Block/FVG for Target
Beginning: Close the trade at the first touch of your target.
Middle: Close the trade at the midpoint of your chosen target.
End: Close the trade when your target is fully filled.
Customizable Parameters
Easily set your Fixed % and Fixed RR targets with a user-friendly input field. This field works only for the Fixed and Fixed RR entry parameters. When selecting a different entry point, this field is ignored
Choose any combination of target events to suit your trading strategy.
🟠 STOPLOSS SETTINGS
14 Possible StopLoss Events Including Entry Orderblock/FVG
Fixed - Fix the loss on the trade when the price moves by N%
Entry Block
Extr. ChoCh OB
Extr. ChoCh FVG
ChoCh
ChoCh OB
ChoCh FVG
IDM OB
IDM FVG
BoS FVG
BoS OB
BoS
Extr. BoS FVG
Extr. BoS OB
3 Levels for Order Blocks/FVG Exits
Beginning: Exit the trade at the first touch of the order block/FVG.
Middle: Exit the trade at the middle of the order block/FVG.
End: Exit the trade at the full completion of the order block/FVG.
Dedicated Field for Setting Fixed % Value
Set a fixed % value in a dedicated field for the Fixed parameter. This field works only for the Fixed parameter. When selecting other exit parameters, this field is ignored.
🟠 ADDITIONAL SETTINGS
Trailing Stop, %
Set a Trailing Stop as a percentage of your trade to potentially increase profit based on historical data.
Move SL to Breakeven, bars
Move your StopLoss to breakeven after exiting the entry zone for a specified number of bars. This can enhance your potential WinRate based on historical performance.
Skip trade if RR less than
This feature allows you to skip trades where the potential Risk-to-Reward ratio is less than the number set in this field.
🟠 EXAMPLE OF MANUAL SETUP
For example, let me show you how it works on the chart. You select entry parameters, stop loss parameters, and take profit parameters for your trades, and the strategy automatically tests this setup on historical data, allowing you to see the results of this strategy.
In the screenshot above, the parameters were as follows:
Trade Entry: CHoCH OB (Beginning)
Stop Loss: Entry Block
Take Profit: Break of BOS
The indicator will automatically test all possible trades on the chart and display the results for this setup.
🟠 AUTO OPTIMIZATION SETTINGS
In the screenshot above, you can see the optimization table displaying various entry points, exits, and stop-loss settings, along with their historical performance results and other parameters. This feature allows you to identify trading setups that have shown the best historical outcomes.
This functionality will enhance your trading approach, providing you with valuable insights based on historical data. You’ll be aware of the Smart Money Concept settings that have historically worked best for any specific chart and timeframe.
Our indicator includes various optimization options designed to help you find the most effective settings based on historical data. There are 5 optimization modes, each offering unique benefits for every trader
Trend Entry - Optimization of the best settings for trend-following trades. The strategy will enter trades only in the direction of the trend. If the trend is upward, it will look for long entry points and vice versa.
Counter Trend Entry - Finding setups against the trend. If the trend is upward, the script will search for short entry points. This is the opposite of trend entry optimization.
Stop Loss - Identifying stop-loss points that showed the best historical performance for the specific setup you have configured. This helps in finding effective exit points to minimize losses.
Take Profit - Determining targets for the configured setup based on historical performance, helping to identify potentially profitable take profit levels.
Trailing Stop - Finding optimal percentages for the trailing stop function based on historical data, which can potentially increase the profit of your trades.
Ability to set parameters for auto-optimization within a specified range. For example, if you choose FixRR TP from 1 to 10, the indicator will automatically test all possible Risk Reward Take Profit variations from 1 to 10 and display the results for each parameter individually.
Ability to set initial deposit parameters, position commissions, and risk per trade as a fixed percentage or fixed amount. Additionally, you can set the maximum leverage for a trade.
There are times when the stop loss is very close to the entry point, and adhering to the risk per trade values set in the settings may not allow for such a loss in any situation. That’s why we added the ability to set the maximum possible leverage, allowing you to test your trading strategy even with very tight stop losses.
Duplicated Smart Money Structure settings from our Advanced SMC indicator that you can adjust to match your trading style flexibly. All these settings will be taken into account during the optimization process or when manually calculating settings.
Additionally, you can test your strategy based on higher timeframe order blocks. For example, you can test a strategy on a 1-minute chart while displaying order blocks from a 15-minute timeframe. The auto-optimizer will consider all these parameters, including higher timeframe order blocks, and will enter trades based on these order blocks.
Highly flexible dashboard and results optimization settings allow you to display the tables you need and sort results by six different criteria: Profit Factor, Profit, Winrate, Max Drawdown, Wins, and Trades. This enables you to find the exact setup you desire, based on these comprehensive data points.
🟠 ALERT CUSTOMIZATION
With this indicator, you can set up buy and sell alerts based on the test results, allowing you to create a comprehensive trading strategy. This feature enables you to receive real-time signals, making it a powerful tool for implementing your trading strategies.
🟠 STRATEGY PROPERTIES
For backtesting, we used realistic initial data for entering trades, such as:
Starting balance: $1000
Commission: 0.01%
Risk per trade: 1%
To ensure realistic data, we used the above settings. We offer two methods for calculating your order size, and in our case, we used a 1% risk per trade. Here’s what it means:
Risk per trade: This is the maximum loss from your deposit if the trade goes against you. The trade volume can change depending on your stop-loss distance from the entry point. Here’s the formula we use to calculate the possible volume for a single trade:
1. quantity = percentage_risk * balance / loss_per_1_contract (incl. fee)
Then, we calculate the maximum allowed volume based on the specified maximum leverage:
2. max_quantity = maxLeverage * balance / entry_price
3. If quantity < max_quantity, meaning the leverage is less than the maximum allowed, we keep quantity. If quantity > max_quantity, we use max_quantity (the maximum allowed volume according to the set leverage).
This way, depending on the stop-loss distance, the position size can vary and be up to 100% of your deposit, but the loss in each trade will not exceed the set percentage, which in our case is 1% for this backtest. This is a standard risk calculation method based on your stop-loss distance.
🔸 Statistical Significance of Trade Data
In our strategy, you may notice there weren’t enough trades to form statistically significant data. This is inherent to the Smart Money Concept (SMC) strategy, where the focus is not on the number of trades but rather on the risk-to-reward ratio per trade. In SMC strategies, it’s crucial to avoid taking numerous uncertain setups and instead perform a comprehensive analysis of the market situation.
Therefore, our strategy results show fewer than 100 trades. It’s important to understand that this small sample size isn’t statistically significant and shouldn’t be relied upon for strategy analysis. Backtesting with a small number of trades should not be used to draw conclusions about the effectiveness of a strategy.
🔸 Versatile Use Cases
The methods of using this indicator are numerous, ranging from identifying potentially the best-performing order blocks on the chart to creating a comprehensive trading strategy based on the data provided by our indicator. We believe that every trader will find a valuable application for this tool, enhancing their entry and exit points in trades.
Disclaimer
Past performance is not indicative of future results. The results shown by this indicator do not guarantee similar outcomes in the future. Use this tool as part of a comprehensive trading strategy, considering all market conditions and risks.
How to access
For access to this indicator, please read the author’s instructions below this post
First 12 Candles High/Low BreakoutThis indicator identifies potential breakout opportunities based on the high and low points formed within the first 12 candles after the market opens on a 5-minute timeframe. It provides visual cues and labels to help traders make informed decisions.
Features:
Market Open High/Low: Marks the highest and lowest price of the first 12 candles following the market open with horizontal lines for reference.
Breakout Signals: Identifies potential buy or sell signals based on the first 5-minute candle closing above the open high or below the open low.
Target and Stop-Loss: Plots horizontal lines for target prices (100 points by default, adjustable) and stop-loss levels (100 points by default, adjustable) based on the entry price.
Visual Cues: Uses green triangles (up) for buy signals and red triangles (down) for sell signals.
Informative Labels: Displays labels with "Buy" or "Sell" text, target price, and stop-loss price next to the entry signals (optional).
Customization:
You can adjust the target and stop-loss point values using the provided inputs.
How to Use:
Add the script to your TradingView chart.
The indicator will automatically plot the open high, open low, potential entry signals, target levels, and stop-loss levels based on the first 12 candles after the market opens.
Use the signals and price levels in conjunction with your own trading strategy to make informed decisions.