FibExtender [tradeviZion]FibExtender : A Guide to Identifying Resistance with Fibonacci Levels
Introduction
Fibonacci levels are essential tools in technical analysis, helping traders identify potential resistance and support zones in trending markets. FibExtender is designed to make this analysis accessible to traders at all levels, especially beginners, by automating the process of plotting Fibonacci extensions. With FibExtender, you can visualize potential resistance levels quickly, empowering you to make more informed trading decisions without manually identifying every pivot point. In this article, we’ll explore how FibExtender works, guide you step-by-step in using it, and share insights for both beginner and advanced users.
What is FibExtender ?
FibExtender is an advanced tool that automates Fibonacci extension plotting based on significant pivot points in price movements. Fibonacci extensions are percentages based on prior price swings, often used to forecast potential resistance zones where price might reverse or consolidate. By automatically marking these Fibonacci levels on your chart, FibExtender saves time and reduces the complexity of technical analysis, especially for users unfamiliar with calculating and plotting these levels manually.
FibExtender not only identifies Fibonacci levels but also provides a customizable framework where you can adjust anchor points, colors, and level visibility to suit your trading strategy. This customization allows traders to tailor the indicator to fit different market conditions and personal preferences.
Key Features of FibExtender
FibExtender offers several features to make Fibonacci level analysis easier and more effective. Here are some highlights:
Automated Fibonacci Level Identification : The script automatically detects recent swing lows and pivot points to anchor Fibonacci extensions, allowing you to view potential resistance levels with minimal effort.
Customizable Fibonacci Levels : Users can adjust the specific Fibonacci levels they want to display (e.g., 0.618, 1.0, 1.618), enabling a more focused analysis based on preferred ratios. Each level can be color-coded for visual clarity.
Dual Anchor Points : FibExtender allows you to choose between anchoring levels from either the last pivot low or a recent swing low, depending on your preference. This flexibility helps in aligning Fibonacci levels with key market structures.
Transparency and Visual Hierarchy : FibExtender automatically adjusts the transparency of levels based on their "sequence age," creating a subtle visual hierarchy. Older levels appear slightly faded, helping you focus on more recent, potentially impactful levels.
Connection Lines for Context : FibExtender draws connecting lines from recent lows to pivot highs, allowing users to visualize the price movements that generated each Fibonacci extension level.
Step-by-Step Guide for Beginners
Let’s walk through how to use the FibExtender script on a TradingView chart. This guide will ensure that you’re able to set it up and interpret the key information displayed by the indicator.
Step 1: Adding FibExtender to Your Chart
Open your TradingView chart and select the asset you wish to analyze.
Search for “FibExtender ” in the Indicators section.
Click to add the indicator to your chart, and it will automatically plot Fibonacci levels based on recent pivot points.
Step 2: Customizing Fibonacci Levels
Adjust Levels : Under the "Fibonacci Settings" tab, you can enable or disable specific levels, such as 0.618, 1.0, or 1.618. You can also change the color for each level to improve visibility.
Set Anchor Points : Choose between "Last Pivot Low" and "Recent Swing Low" as your Fibonacci anchor point. If you want a broader view, choose "Recent Swing Low"; if you prefer tighter levels, "Last Pivot Low" may be more suitable.
Fib Line Length : Modify the line length for Fibonacci levels to make them more visible on your chart.
Step 3: Spotting Visual Clusters (Manual Analysis)
Identify Potential Resistance Clusters : Look for areas on your chart where multiple Fibonacci levels appear close together. For example, if you see 1.0, 1.272, and 1.618 levels clustered within a small price range, this may indicate a stronger resistance zone.
Why Clusters Matter : Visual clusters often signify areas where traders expect heightened price reaction. When levels are close, it suggests that resistance may be reinforced by multiple significant ratios, making it harder for price to break through. Use these clusters to anticipate potential pullbacks or consolidation areas.
Step 4: Observing the Price Action Around Fibonacci Levels
As price approaches these identified levels, watch for any slowing momentum or reversal patterns, such as doji candles or bearish engulfing formations, that might confirm resistance.
Adjust Strategy Based on Resistance : If price hesitates or reverses at a clustered resistance zone, it may be a signal to secure profits or tighten stops on a long position.
Advanced Insights (for Intermediate to Advanced Users)
For users interested in the technical workings of FibExtender, this section provides insights into how the indicator functions on a code level.
Pivot Point and Swing Detection
FibExtender uses a pivot-high and pivot-low detection function to identify significant price points. The upFractal and dnFractal variables detect these levels based on recent highs and lows, creating the basis for Fibonacci extension calculations. Here’s an example of the code used for this detection:
// Fractal Calculations
upFractal = ta.pivothigh(n, n)
dnFractal = ta.pivotlow(n, n)
By setting the number of periods for n, users can adjust the sensitivity of the script to recent price swings.
Fibonacci Level Calculation
The following function calculates the Fibonacci levels based on the selected pivot points and applies each level’s specific ratio (e.g., 0.618, 1.618) to project extensions above the recent price swing.
calculateFibExtensions(float startPrice, float highPrice, float retracePrice) =>
fibRange = highPrice - startPrice
var float levels = array.new_float(0)
array.clear(levels)
if array.size(fibLevels) > 0
for i = 0 to array.size(fibLevels) - 1
level = retracePrice + (fibRange * array.get(fibLevels, i))
array.push(levels, level)
levels
This function iterates over each level enabled by the user, calculating extensions by multiplying the price range by the corresponding Fibonacci ratio.
Example Use Case: Identifying Resistance in Microsoft (MSFT)
To better understand how FibExtender highlights resistance, let’s look at Microsoft’s stock chart (MSFT), as shown in the image. The chart displays several Fibonacci levels extending upward from a recent pivot low around $408.17. Here’s how you can interpret the chart:
Clustered Resistance Levels : In the chart, note the grouping of several Fibonacci levels in the range of $450–$470. These levels, particularly when tightly packed, suggest a zone where Microsoft may encounter stronger resistance, as multiple Fibonacci levels signal potential barriers.
Applying Trading Strategies : As price approaches this clustered resistance, traders can watch for weakening momentum. If price begins to stall, it may be wise to lock in profits on long positions or set tighter stop-loss orders.
Observing Momentum Reversals : Look for specific candlestick patterns as price nears these levels, such as bearish engulfing candles or doji patterns. Such patterns can confirm resistance, helping you make informed decisions on whether to exit or manage your position.
Conclusion: Harnessing Fibonacci Extensions with FibExtender
FibExtender is a powerful tool for identifying potential resistance levels without the need for manual Fibonacci calculations. It automates the detection of key swing points and projects Fibonacci extensions, offering traders a straightforward approach to spotting potential resistance zones. For beginners, FibExtender provides a user-friendly gateway to technical analysis, helping you visualize levels where price may react.
For those with a bit more experience, the indicator offers insight into pivot points and Fibonacci calculations, enabling you to fine-tune the analysis for different market conditions. By carefully observing price reactions around clustered levels, users can identify areas of stronger resistance and refine their trade management strategies accordingly.
FibExtender is not just a tool but a framework for disciplined analysis. Using Fibonacci levels for guidance can support your trading decisions, helping you recognize areas where price might struggle or reverse. Integrating FibExtender into your trading strategy can simplify the complexity of Fibonacci extensions and enhance your understanding of resistance dynamics.
Note: Always practice proper risk management and thoroughly test the indicator to ensure it aligns with your trading strategy. Past performance is not indicative of future results.
Trade smarter with TradeVizion—unlock your trading potential today!
Trend Analysis
Quick scan for drift🙏🏻
ML based algorading is all about detecting any kind of non-randomness & exploiting it, kinda speculative stuff, not my way, but still...
Drift is one of the patterns that can be exploited, because pure random walks & noise aint got no drift.
This is an efficient method to quickly scan tons of timeseries on the go & detect the ones with drift by simply checking wherther drift < -0.5 or drift > 0.5. The code can be further optimized both in general and for specific needs, but I left it like dat for clarity so you can understand how it works in a minute not in an hour
^^ proving 0.5 and -0.5 are natural limits with no need to optimize anything, we simply put the metric on random noise and see it sits in between -0.5 and 0.5
You can simply take this one and never check anything again if you require numerous live scans on the go. The metric is purely geometrical, no connection to stats, TSA, DSA or whatever. I've tested numerous formulas involving other scaling techniques, drift estimates etc (even made a recursive algo that had a great potential to be written about in a paper, but not this time I gues lol), this one has the highest info gain aka info content.
The timeseries filtered by this lil metric can be further analyzed & modelled with more sophisticated tools.
Live Long and Prosper
P.S.: there's no such thing as polynomial trend/drift, it's alwasy linear, these curves you see are just really long cycles
P.S.: does cheer still work on TV? @admin
Volume-Adjusted Schaff Trend Cycle (VASTC)Volume-Adjusted Schaff Trend Cycle (VASTC)
The VASTC is a fairly fast-moving oscillator designed to identify trends early and signal when trends may be nearing their end. While it can be used for both trend-following and mean-reversion strategies , it shines in trend-following setups. It’s particularly useful for catching the start of a trend and giving early warnings that a trend might end soon, making it a valuable addition to a multi-indicator system.
How It Works:
The VASTC adapts the traditional Schaff Trend Cycle by adjusting the MACD component with volume data. This volume-adjusted MACD is run through two stochastic processes , applying exponential smoothing to enhance responsiveness. Volume sensitivity allows the VASTC to adapt dynamically to periods of high or low trading activity, providing more reliable trend signals.
Recommended Use:
Use VASTC in confluence with other indicators to confirm trend entries and exits. It’s best for identifying early trend setups rather than sustaining prolonged trend trades. When used alongside other indicators, especially those with a longer-term outlook or momentum based trend indicators, you’ll gain a clearer signal for potential exits or entries. Always backtest the VASTC on your chosen assets to determine the most effective input parameters, as the defaults may not suit all markets or assets. Different assets behave differently, and adjustments in parameters can improve its ability to analyze the assets you're looking at.
Parameters:
Length : Sets the primary smoothing length.
Fast/Slow Length : Adjust the speed of the volume-adjusted MACD component.
Factor : Controls the final smoothing applied to the STC.
Overbought/Oversold Levels : Defines overbought/oversold levels.
Experiment with these settings to customize the VASTC to your trading strategy and asset.
Disclaimer : This indicator is a tool to complement your trading analysis and should not be used in isolation. Always backtest and use other confluence signals for best results. The assets I looked at when making this indicator are almost certainly different than what you're looking at.
Dema Percentile Standard DeviationDema Percentile Standard Deviation
The Dema Percentile Standard Deviation indicator is a robust tool designed to identify and follow trends in financial markets.
How it works?
This code is straightforward and simple:
The price is smoothed using a DEMA (Double Exponential Moving Average).
Percentiles are then calculated on that DEMA.
When the closing price is below the lower percentile, it signals a potential short.
When the closing price is above the upper percentile and the Standard Deviation of the lower percentile, it signals a potential long.
Settings
Dema/Percentile/SD/EMA Length's: Defines the period over which calculations are made.
Dema Source: The source of the price data used in calculations.
Percentiles: Selects the type of percentile used in calculations (options include 60/40, 60/45, 55/40, 55/45). In these settings, 60 and 55 determine percentile for long signals, while 45 and 40 determine percentile for short signals.
Features
Fully Customizable
Fully Customizable: Customize colors to display for long/short signals.
Display Options: Choose to show long/short signals as a background color, as a line on price action, or as trend momentum in a separate window.
EMA for Confluence: An EMA can be used for early entries/exits for added signal confirmation, but it may introduce noise—use with caution!
Built-in Alerts.
Indicator on Diffrent Assets
INDEX:BTCUSD 1D Chart (6 high 56 27 60/45 14)
CRYPTO:SOLUSD 1D Chart (24 open 31 20 60/40 14)
CRYPTO:RUNEUSD 1D Chart (10 close 56 14 60/40 14)
Remember no indicator would on all assets with default setting so FAFO with setting to get your desired signal.
Trend Levels [ChartPrime]The Trend Levels indicator is designed to identify key trend levels (High, Mid, and Low) during market trends, based on real-time calculations of highest, lowest, and mid-level values over a customizable length. Additionally, the indicator calculates trend strength by measuring the ratio of candles closing above or below the midline, providing a clear view of the ongoing trend dynamics and strength.
⯁ KEY FEATURES AND HOW TO USE
⯌ Trend Shift Signals :
Trend shifts, based on highest and lowest values during input length. When high is == to highest it will change trend to up when low == lowest value it will be shift to down trend.
// Calculate highest and lowest over the specified length
h = ta.highest(length)
l = ta.lowest(length)
// Determine trend direction: if the current high is the highest value, set trend to true
if h == high
trend := true
// If the current low is the lowest value, set trend to false
if l == low
trend := false
Whenever the trend changes direction (from uptrend to downtrend or vice versa), the indicator provides visual cues in the form of arrows. This gives traders clear signals to identify potential trend reversals, enabling them to adjust their strategies accordingly.
⯌ Trend Level Calculation :
As soon as a trend is detected (uptrend or downtrend), the indicator starts calculating the highest, lowest, and mid-level values over the defined period. These levels are plotted on the chart as color-coded lines for easy visualization, allowing traders to quickly spot the key levels within a trend.
⯌ Midline Retests :
Throughout the trend, the mid-level line is often retested, acting as a potential zone for pullbacks or rejections. Traders can use these retests as opportunities for entering positions or confirming trend continuation. The chart shows how price frequently interacts with the midline, helping to identify important reaction levels.
⯌ Trend Strength Calculation :
The indicator measures the trend strength by calculating the delta between the number of candles closing above and below the midline. This percentage-based delta is displayed in real-time, providing a clear indication of whether the trend is gaining or losing momentum.
⯁ USER INPUTS
Length : Specifies the lookback period for calculating the highest and lowest values, which determines the key trend levels.
Candle Counting : Measures the number of candles closing above and below the midline to calculate the trend strength delta.
⯁ CONCLUSION
The Trend Levels indicator provides traders with a powerful tool for visualizing trend dynamics, key levels of support and resistance, and real-time trend strength. By identifying midline retests, tracking candle counts, and providing trend shift signals, this indicator can help traders make well-informed decisions during market trends.
VWAP it GOODWhy: Instead of having 5 individual VWAP indicators, I found it beneficial for one view with a clean display. This VWAP indicator combines the daily, weekly, monthly, quarterly and annual into one color coded view. These colors and styles can be modified by the user.
A user can turn any timeframe off, but this is how I personally like to trade since it helps me better understand potential bounce or pullback areas.
Do your own research for what is best for you.
Percent Trend Change [BigBeluga]The Percent Trend Change indicator is a trend-following tool that provides real-time percentage changes during trends based on entry prices. Using John Ehlers’ Ultimate Smoother filter, it detects trend direction, identifies uptrends and downtrends, and tracks percentage changes during the trend. Additionally, it has a channel that can be toggled on or off, and the width can be customized, adding an extra visual layer to assess trend strength and direction.
NIFTY50:
META:
🔵 IDEA
The Percent Trend Change indicator helps traders visualize the progression of a trend with percentage changes from entry points. It identifies trends and marks percentage changes during the trend, making it easier to assess the strength and sustainability of the ongoing trend.
The use of John Ehlers' Ultimate Smoother filter helps detect trend changes based on consecutive price movements over five bars, making it highly responsive to short- and medium-term trends.
🔵 KEY FEATURES & USAGE
◉ Ultimate Smoother Filter for Trend Detection:
The trend is detected using the Ultimate Smoother filter. If the smoothed line rises five times in a row, the indicator identifies an uptrend. If it falls five times in a row, it identifies a downtrend.
◉ Trend Entry with Price Labels:
The indicator marks trend entry points with up (green) and down (red) triangles. These triangles are labeled with the entry price, allowing traders to track the starting price of the trend.
◉ Percentage Change Labels During Trends:
During a trend, the indicator periodically plots percentage change labels based on the bar period set in the settings.
In an uptrend, positive changes are marked in green, while negative changes are marked in orange. In a downtrend, negative changes are marked in red, while positive changes are marked in orange.
Each plotted percentage label also includes a count of the trend points, allowing traders to track how many times the percentage labels have been plotted during the current trend.
These percentage labels help traders understand how much the price has changed since the trend began and can be used to define potential take-profit targets.
◉ Channel Toggle and Width Customization:
The indicator includes a channel that visually highlights the trend. Traders can toggle this channel on or off, and the width of the channel can be adjusted to match individual preferences. The channel helps visualize the overall trend direction and the range within which price fluctuations occur.
🔵 CUSTOMIZATION
Smoother Length: Adjusts the length of the Ultimate Smoother filter, affecting how responsive the indicator is to price fluctuations.
Bars Percent: Defines how many bars must pass before a new percentage label is plotted. A smaller value plots labels more frequently, while a higher value shows fewer labels.
Channel Width & Show Channel: The width of the channel can be customized, and traders can toggle the channel on or off depending on their preferences.
Color Customization: Traders can customize the colors for the uptrend, downtrend, and percentage labels, providing flexibility in how the indicator is displayed on the chart.
By combining trend-following capabilities with percentage change tracking, the Percent Trend Change indicator offers a powerful tool for identifying trend direction and setting potential take-profit targets. The ability to customize the channel and percentage labels makes it adaptable to various trading strategies.
Advanced VWAP [CryptoSea]The Advanced VWAP is a comprehensive volume-weighted average price (VWAP) tool designed to provide traders with a deeper understanding of market trends through multi-layered VWAP analysis. This indicator is ideal for those who want to track price movements in relation to VWAP bands and detect key market levels with greater precision.
Key Features
Multi-Timeframe VWAP Bands: Includes multiple VWAP bands with different lookback periods (5, 10, 25, and 50), allowing traders to observe short-term and long-term price behavior.
Smoothed Band Options: Offers optional smoothing of VWAP bands to reduce noise and highlight significant trends more clearly.
Dynamic Median Line Display: Plots the median line of the VWAP bands, providing a reference for price movements and potential reversal zones.
VWAP Trend Strength Calculation: Measures the strength of the trend based on the price's position relative to the VWAP bands, normalized between -1 and 1 for easier interpretation.
In the example below we can see the VWAP Forecastd Cloud, which consists of multiple layers of VWAP bands with varying lookback periods, creating a dynamic forecast visualization. The cloud structure represents potential future price ranges by projecting VWAP-based bands outward, with darker areas indicating higher density and overlap of the bands, suggesting stronger support or resistance zones. This approach helps traders anticipate price movement and identify areas of potential consolidation or breakout as the price interacts with different layers of the forecast cloud.
How it Works
VWAP Calculation: Utilizes multiple VWAP calculations based on various lookback periods to capture a broad range of price behaviors. The indicator adapts to different market conditions by switching between short-term and long-term VWAP references.
Smoothing Algorithms: Provides the ability to smooth the VWAP bands using different moving average types (SMA, EMA, SMMA, WMA, VWMA) to suit various trading strategies and reduce market noise.
Trend Strength Analysis: Computes the trend strength based on the price's distance from the VWAP bands, with a value range of -1 to 1. This feature helps traders identify the intensity of uptrends and downtrends.
Alert Conditions: Includes alert options for crossing above or below the smoothed median line, as well as touching the smoothed upper or lower bands, providing timely notifications for potential trading opportunities.
This image below illustrates the use of smoothed VWAP bands, which provide a cleaner representation of the price's relationship to the VWAP by reducing market noise. The smoothed bands create a flowing cloud-like structure, making it easier to observe significant trends and potential reversal points. The circles highlight areas where the price interacts with the smoothed bands, indicating potential key levels for trend continuation or reversal. This setup helps traders focus on meaningful movements and filter out minor fluctuations, improving the identification of strategic entry and exit points based on smoother trend signals.
Application
Strategic Entry and Exit Points: Helps traders identify optimal entry and exit points based on the interaction with VWAP bands and trend strength readings.
Trend Confirmation: Assists in confirming trend strength by analyzing price movements relative to the VWAP bands and detecting significant breaks or touches.
Customized Analysis: Supports a wide range of trading styles by offering adjustable smoothing, band settings, and alert conditions to meet specific trading needs.
The Advanced VWAP by is a valuable addition to any trader's toolkit, offering versatile features to navigate different market scenarios with confidence. Whether used for day trading or longer-term analysis, this tool enhances decision-making by providing a robust view of price behavior relative to VWAP levels.
TradingIQ - Reversal IQIntroducing "Reversal IQ" by TradingIQ
Reversal IQ is an exclusive trading algorithm developed by TradingIQ, designed to trade trend reversals in the market. By integrating artificial intelligence and IQ Technology, Reversal IQ analyzes historical and real-time price data to construct a dynamic trading system adaptable to various asset and timeframe combinations.
Philosophy of Reversal IQ
Reversal IQ integrates IQ Technology (AI) with the timeless concept of reversal trading. Markets follow trends that inevitably reverse at some point. Rather than relying on rigid settings or manual judgment to capture these reversals, Reversal IQ dynamically designs, creates, and executes reversal-based trading strategies.
Reversal IQ is designed to work straight out of the box. In fact, its simplicity requires just one user setting, making it incredibly straightforward to manage.
AI Aggressiveness is the only setting that controls how Reversal IQ works.
Traders don’t have to spend hours adjusting settings and trying to find what works best - Reversal IQ handles this on its own.
Key Features of Reversal IQ
Self-Learning Reversal Detection
Employs AI and IQ Technology to identify trend reversals in real-time.
AI-Generated Trading Signals
Provides reversal trading signals derived from self-learning algorithms.
Comprehensive Trading System
Offers clear entry and exit labels.
AI-Determined Profit Target and Stop Loss
Position exit levels are clearly defined and calculated by the AI once the trade is entered.
Performance Tracking
Records and presents trading performance data, easily accessible for user analysis.
Configurable AI Aggressiveness
Allows users to adjust the AI's aggressiveness to match their trading style and risk tolerance.
Long and Short Trading Capabilities
Supports both long and short positions to trade various market conditions.
IQ Channel
The IQ Channel represents what Reversal IQ considers a tradable long opportunity or a tradable short opportunity. The channel is dynamic and adjusts from chart to chart.
IQMA – Proprietary Moving Average
Introduces the IQ Moving Average (IQMA), designed to classify overarching market trends.
IQCandles – Trend Classification Tool
Complements IQMA with candlestick colors designed for trend identification and analysis.
How It Works
Reversal IQ operates on a straightforward heuristic: go long during an extended downside move and go short during an extended upside move.
What defines an "extended move" is determined by IQ Technology, TradingIQ's exclusive AI algorithm. For Reversal IQ, the algorithm assesses the extent to which historical high and low prices are breached. By learning from these price level violations, Reversal IQ adapts to trade future, similar violations in a recurring manner. It calculates a price area, distant from the current price, where a reversal is anticipated.
In simple terms, price peaks (tops) and troughs (bottoms) are stored for Reversal IQ to learn from. The degree to which these levels are violated by subsequent price movements is also recorded. Reversal IQ continuously evaluates this stored data, adapting to market volatility and raw price fluctuations to better capture price reversals.
What classifies as a price top or price bottom?
For Reversal IQ, price tops are considered the highest price attained before a significant downside reversal. Price bottoms are considered the lowest price attained before a significant upside reversal. The highest price achieved is continuously calculated before a significant counter trend price move renders the high price as a swing high. The lowest price achieved is continuously calculated before a significant counter trend price move renders the low price as a swing low.
The image above illustrates the IQ channel and explains the corresponding prices and levels
The blue lower line represents the Long Reversal Level, with the price highlighted in blue showing the Long Reversal Price.
The red upper line represents the Short Reversal Level, with the price highlighted in red showing the Short Reversal Price.
Limit orders are placed at both of these levels. As soon as either level is touched, a trade is immediately executed.
The image above shows a long position being entered after the Long Reversal Level was reached. The profit target and stop loss are calculated by Reversal IQ
The blue line indicates where the profit target is placed (acting as a limit order).
The red line shows where the stop loss is placed (acting as a stop loss order).
Green arrows indicate that the strategy entered a long position at the highlighted price level.
You can also hover over the trade labels to get more information about the trade—such as the entry price, profit target, and stop loss.
The image above demonstrates the profit target being hit for the trade. All profitable trades are marked by a blue arrow and blue line. Hover over the blue arrow to obtain more details about the trade exit.
The image above depicts a short position being entered after the Short Reversal Level was touched. The profit target and stop loss are calculated by the AI
The blue line indicates where the profit target is placed (acting as a limit order).
The red line shows where the stop loss is placed (acting as a stop loss order).
The image above shows the profit target being hit for the short trade. Profitable trades are indicated by a blue arrow and blue line. Hover over the blue arrow to access more information about the trade exit.
Long Entry: Green Arrow
Short Entry: Red Arrow
Profitable Trades: Blue Arrow
Losing Trades: Red Arrow
IQMA
The IQMA implements a dynamic moving average that adapts to market conditions by adjusting its smoothing factor based on its own slope. This makes it more responsive in volatile conditions (steeper slopes) and smoother in less volatile conditions.
The IQMA is not used by Reversal IQ as a trade condition; however, the IQMA can be used by traders to characterize the overarching trend and elect to trade only long positions during bullish conditions and only short positions during bearish conditions.
The IQMA is an adaptive smoothing function that applies a combination of multiple moving averages to reduce lag and noise in the data. The adaptiveness is achieved by dynamically adjusting the Volatility Factor (VF) based on the slope (derivative) of the price trend, making it more responsive to strong trends and smoother in consolidating markets.
This process effectively makes the moving average a self-adjusting filter, the IQMA attempts to track both trending and ranging market conditions by dynamically changing its sensitivity in response to price movements.
When IQMA is blue, an overarching uptrend is in place. When IQMA is red, an overarching downtrend is in place.
IQ Candles
IQ Candles are price candles color-coordinated with IQMA. IQ Candles help visualize the overarching trend and are not used by Reversal IQ to determine trade entries and trade exits.
AI Aggressiveness
Reversal IQ has only one setting that controls its functionality.
AI Aggressiveness controls the aggressiveness of the AI. This setting has three options: Sniper, Aggressive, and Very Aggressive.
Sniper Mode
In Sniper Mode, Reversal IQ will prioritize trading large deviations from established reversal levels and extracting the largest countertrend move possible from them.
Aggressive Mode
In Aggressive Mode, Reversal IQ still prioritizes quality but allows for strong, quantity-based signals. More trades will be executed in this mode with tighter stops and profit targets. Aggressive mode forces Reversal IQ to learn from narrower raw-dollar violations of historical levels.
Very Aggressive Mode
In Very Aggressive Mode, Reversal IQ still prioritizes the strongest quantity-based signals. Stop and target distances aren't inherently affected, but entries will be aggressive while prioritizing performance. Very Aggressive mode forces Reversal IQ to learn from narrower raw-dollar violations of historical levels and also forces it to embrace volatility more aggressively.
AI Direction
The AI Direction setting controls the trade direction Reversal IQ is allowed to take.
“Both” allows for both long and short trades.
“Long” allows for only long trades.
“Short” allows for only short trades.
Verifying Reversal IQ’s Effectiveness
Reversal IQ automatically tracks its performance and displays the profit factor for the long strategy and the short strategy it uses. This information can be found in a table located in the top-right corner of your chart.
The image above shows the long strategy profit factor and the short strategy profit factor for Reversal IQ.
A profit factor greater than 1 indicates a strategy profitably traded historical price data.
A profit factor less than 1 indicates a strategy unprofitably traded historical price data.
A profit factor equal to 1 indicates a strategy did not lose or gain money when trading historical price data.
Using Reversal IQ
While Reversal IQ is a full-fledged trading system with entries and exits, it was designed for the manual trader to take its trading signals and analysis indications to greater heights - offering numerous applications beyond its built-in trading system.
The hallmark feature of Reversal IQ is its sniper-like reversal signals. While exits are dynamically calculated as well, Reversal IQ simply has a knack for "sniping" price reversals.
When performing live analysis, you can use the IQ Channel to evaluate price reversal areas, whether price has extended too far in one direction, and whether price is likely to reverse soon.
Of course, in times of exuberance or panic, price may push through the reversal levels. While infrequent, it can happen to any indicator.
The deeper price moves into the bullish reversal area (blue) the better chance that price has extended too far and will reverse to the upside soon. The deeper price moves into the bearish reversal area (red) the better chance that price has extended too far and will reverse to the downside soon.
Of course, you can set alerts for all Reversal IQ entry and exit signals, effectively following along its systematic conquest of price movement.
TradingIQ - Impulse IQIntroducing "Impulse IQ" by TradingIQ
Impulse IQ is an exclusive trading algorithm developed by TradingIQ, designed to trade breakouts and established trends. By integrating artificial intelligence and IQ Technology, Impulse IQ analyzes historical and real-time price data to construct a dynamic trading system adaptable to various asset and timeframe combinations.
Philosophy of Impulse IQ
Impulse IQ combines IQ Technology (AI) with the classic principles of trend and breakout trading. Recognizing that markets inherently follow trends that need to persist for significant price movements to unfold, Impulse IQ eliminates the need for rigid settings or manual intervention.
Instead, it dynamically develops, adapts, and executes trend-based trading strategies, enabling a more responsive approach to capturing meaningful market opportunities.
Impulse IQ is designed to work straight out of the box. In fact, its simplicity requires just one user setting, making it incredibly straightforward to manage.
Strategy type is the only setting that controls Impulse IQ’s functionality.
Traders don’t have to spend hours adjusting settings and trying to find what works best - Impulse IQ handles this on its own.
Key Features of Impulse IQ
Self-Learning Breakout Detection
Employs IQ Technology to identify breakouts.
AI-Generated Trading Signals
Provides breakout trading signals derived from self-learning algorithms.
Comprehensive Trading System
Offers clear entry and exit labels.
AI-Determined Trailing Profit Target and Stop Loss
Position exit levels are clearly defined and calculated by the AI once the trade is entered.
Performance Tracking
Records and presents trading performance data, easily accessible for user analysis.
Long and Short Trading Capabilities
Supports both long and short positions to trade various market conditions.
IQ Meter
The IQ Meter details where price is trading relative to a higher timeframe trend and lower timeframe trend. Fibonacci levels are interlaced along the meter, offering unique insights on trend retracement opportunities.
Self Learning, Multi Timeframe IQ Zig Zags
The Zig Zag IQ is a self-learning, multi-timeframe indicator that adapts to market volatility, providing a clearer representation of market movements than traditional zig zag indicators.
Dual Strategy Execution
Impulse IQ integrates two distinct strategy types: Breakout and Cheap (details explained later).
How It Works
Before diving deeper into Impulse IQ, it's essential to understand the core terminology:
Zig Zag IQ : A self-learning trend and breakout identification mechanism that serves as the foundation for Impulse IQ. Although it belongs to the “Zig Zag” class of technical indicators, it's powered by IQ Technology.
Impulse IQ : A self-learning trading strategy that executes trades based on Zig Zag IQ. Zig Zag IQ identifies market trends, while Impulse IQ adapts, learns, and executes trades based on these trend characterizations.
Impulse IQ operates on a simple heuristic: go long during upside volatility and go short during downside volatility, essentially capturing price breakouts.
The definition of a “price breakout” is determined by IQ Technology, TradingIQ's exclusive AI algorithm. In Impulse IQ, the algorithm utilizes two IQ Zig Zags (self-learning, multi-timeframe zig zags) to analyze and learn from market trends.
It identifies breakout opportunities by recognizing violations of established price levels marked by the IQ Zig Zags. Impulse IQ then adapts and evolves to trade similar future violations in a recurring and dynamic manner.
Put simply, IQ Zig Zags continuously learn from both historical and real-time price updates to adjust themselves for an "optimal fit" to price data. The aim is to adapt so that the marked price tops and bottoms, when violated, reveal potential breakout opportunities.
The strategy layer of IQ Zig Zags, known as Impulse IQ, incorporates an additional level of self-learning with IQ Technology. It learns from breakout signals generated by the IQ Zig Zags, enabling it to dynamically identify and signal tradable breakouts. Moreover, Impulse IQ learns from historical price data to manage trade exits.
All positions start with an initial fixed stop loss and a trailing stop target. Once the trailing stop target is reached, the fixed stop loss converts into a trailing stop, allowing Impulse IQ to remain in the breakout/trend until the trailing stop is triggered.
What Classifies as a Breakout, Price Top, and Price Bottom?
For Impulse IQ:
Price tops are considered the highest price achieved before a price bottom forms.
Price bottoms are the lowest price reached before a price top forms.
For price tops, the highest price continues to be calculated until a significant downside price move occurs. Similarly, for price bottoms, the lowest price is calculated until a significant upside price move happens.
What distinguishes Zig Zag IQ from other zig zag indicators is its unique mechanism for determining a "significant counter-trend price move." Zig Zag IQ evaluates multiple fits to identify what best suits the current market conditions. Consequently, a "significant counter-trend price move" in one market might differ in magnitude from what’s considered "significant" in another, allowing it to adapt to varying market dynamics.
For example, a 1% price move in the opposite direction might be substantial in one market but not in another, and Zig Zag IQ figures this out internally.
The image above illustrates the IQ Zig Zags in action. The solid Zig Zag IQ lines represent the most recent price move being calculated, while the dotted, shaded lines display historical price moves previously analyzed by IQ Zig Zag.
Notice how the green zig zag aligns with a larger trend, while the purple zig zag follows a smaller trend. This mechanism is crucial for generating breakout signals in Impulse IQ: for a position to be entered, the breakout of the smaller trend must occur in the same direction as the larger trend.
The image above depicts the IQ Meters—an exclusive TradingIQ tool designed to help traders evaluate trend strength and retracement opportunities.
When the lower timeframe Zig Zag IQ and the higher timeframe Zig Zag IQ are out of sync (i.e., one is uptrending while the other is downtrending, with no active positions), the meters display a neutral color, as shown in the image.
The key to using these meters is to identify trend unison and pinpoint key trend retracement entry opportunities. Fibonacci retracement levels for the current trend are interlaced along each meter, and the current price is converted to a retracement ratio of the trend.
These meters can mathematically determine where price stands relative to the larger and smaller trends, aiding in identifying entry opportunities.
The top of each meter indicates the highest price achieved during the current price move.
The bottom of each meter indicates the lowest price achieved during the current price move.
When both the larger and smaller trends are in sync and uptrending, or when a long position is active, the IQ meters turn green, indicating uptrend strength.
When both trends are in sync and downtrending, or when a short position is active, the IQ meters turn red, indicating downtrend strength.
The image above shows the Point of Change for both the larger and smaller Zig Zag IQ trends. A distinctive feature of Zig Zag IQ is its ability to calculate these turning points in advance—unlike most traditional zig zag indicators that lack predetermined turning points and often lag behind price movements. In contrast, Zig Zag IQ offers a minimal-lag trend detection capability, providing a more responsive representation of market trends.
Simply put, once the market Zig Zag anchors are touched, the corresponding Zig Zag IQ will change direction.
Trade Signals
Impulse IQ can trade in one of two ways: Entering breakouts as soon as they happen (Breakout Strategy Type) or entering the pullback of a price breakout (Cheap Strategy Type).
Generally, the Breakout Strategy type will take a greater number of trades and enter a breakout quicker. The Cheap Strategy type will usually take less trades, but potentially enter at a better time/price point, prior to the next leg up of a break up, or the next leg down of a break down.
Entry signals are given when price breaks out to the upside or downside for the "Breakout" strategy type, or for the "Cheap" strategy type, when price retraces to the level it broke out from!
Breakout Strategy Example
The image above demonstrates a long position entered and exited using the Breakout strategy. The price breakout level is marked by the dotted, horizontal green line, representing a previously established price high identified by IQ Zig Zag. Once the price breaks and closes above this level, a long position is initiated.
After entering a long position, Impulse IQ immediately displays the initial fixed stop price. As the price moves favorably for the long position, the trailing stop conversion level is reached, and the indicator switches to a trailing stop, as shown in the image. Impulse IQ continues to "ride the trend" for as long as it persists, exiting only when the trailing stop is triggered.
Cheap Strategy Example
The image above shows a short entry executed using the Cheap strategy. The aim of the Cheap strategy is to enter on a pullback before the breakout occurs. While this results in fewer trades if price doesn’t pull back before the breakout, it typically allows for a better entry time and price point when a pullback does happen.
The image above illustrates the remainder of the trade until the trailing stop was hit.
Green Arrow = Long Entry
Red Arrow = Short Entry
Blue Arrow = Trade Exit
Impulse IQ calculates the initial stop price and trailing stop distance before any entry signals are triggered. This means users don’t need to constantly tweak these settings to improve performance—Impulse IQ handles this process internally.
Verifying Impulse IQ’s Effectiveness
Impulse IQ automatically tracks its performance and displays the profit factor for both its long and short strategies, visible in a table located in the top-right corner of your chart.
The image above shows the profit factor for both the long and short strategies used by Impulse IQ.
A profit factor greater than 1 indicates that the strategy was profitable when trading historical price data.
A profit factor less than 1 indicates that the strategy was unprofitable when trading historical price data.
A profit factor equal to 1 indicates that the strategy neither gained nor lost money on historical price data.
Using Impulse IQ
While Impulse IQ functions as a comprehensive trading system with its own entry and exit signals, it was designed for the manual trader to take its trading signals and analysis indications to greater heights - offering numerous applications beyond its built-in trading system.
The standout feature of Impulse IQ is its ability to characterize and capitalize on trends. Keeping a close eye on “Breakout” labels and making use of the IQ meter is the best way to use Impulse IQ.
The IQ Meters can be used to:
Find entry points during trend retracements
Assess trend alignment across higher and lower timeframes
Evaluate overall trend strength, indicating where the price lies on both IQ Meters.
Additionally, "Break Up" and "Break Down" labels can be identified for anticipating breakouts. Impulse IQ self-learns to capture breakouts optimally, making these labels dynamic signals for predicting a breakout.
The Zig Zag IQ indicators are instrumental in characterizing the market's current state. As a self-learning tool, Zig Zag IQ constantly adapts to improve the representation of current price action. The price tops and bottoms identified by Zig Zag IQ can be treated as support/resistance and breakout levels.
Of course, you can set alerts for all Impulse IQ entry and exit signals, effectively following along its systematic conquest of price movement.
ARMORE Capital: Support–Resistance Levels v2.0 [Enhanced]Enhanced S/R Levels with Signals
The "Enhanced S R Levels with Signals" indicator is designed to help traders and investors identify key Support and Resistance levels on a price chart. It also includes LONG and SHORT signals to help you see potential buy and sell opportunities. Here's a beginner-friendly breakdown of how it works and how to use it:
How it Works
Support and Resistance Levels:
Support Levels (blue lines) are prices where the stock tends to find a "floor" or buying interest, potentially pushing the price up. These levels are calculated based on the lowest prices over a period, with the sensitivity setting helping adjust the distance between each support level.
Resistance Levels (red lines) are prices where the stock often encounters a "ceiling" or selling interest, which could push the price down. These levels are calculated based on the highest prices over a period, with sensitivity adjusting the distance between each resistance level.
The indicator plots up to five support and five resistance lines, giving you a layered view of price levels where the market may react.
LONG and SHORT Signals:
LONG Signal (green arrow pointing up): When the closing price goes above the closest support level, the indicator shows a LONG signal below the bar, suggesting a potential upward trend.
SHORT Signal (red arrow pointing down): When the closing price goes below the closest resistance level, the indicator shows a SHORT signal above the bar, indicating a potential downward trend.
Background Ribbons:
When a LONG condition is met, a faint green background appears on the chart as a visual cue.
When a SHORT condition is met, a faint red background appears to signal potential bearish pressure.
How to Use It
1. Finding Entry and Exit Points: Use the LONG and SHORT signals as a guide, but remember to consider other factors before making trading decisions. A LONG signal suggests that price may rise, while a SHORT signal indicates potential downside.
2. Support & Resistance Levels: Treat these levels as potential points of interest. Prices often react at support or resistance, so you can look for confirmation (e.g., reversal patterns, volume spikes) around these levels.
3. Experiment with Sensitivity: Adjust the "Sensitivity" setting to see how it changes the spacing of support and resistance levels. Higher sensitivity may show more frequent support/resistance levels, which can be helpful for short-term traders.
DISCLAIMER : This is purely experimental and shouldn't be considered a blatant Buy-Sell Indicator. Please feel free to use it to supplement your research, share it with your friends, iterate and improve upon it, and use it to build better, more powerful tools!
Remember, always combine technical indicators with other analysis methods and manage your risk responsibly. Happy Trading!
Market Structure Overlay🚀 Market Structure Overlay Indicator 🚀
🔍 Overview
The Market Structure Overlay (MSO) is a sophisticated technical analysis tool created to analyze price action and understand market structure in a more precise way. It identifies Break of Structure (BOS), Market Structure Breaks (MSBs), Equal Highs (EQH), and Equal Lows (EQL) with meticulous precision by utilizing both wicks and closing prices for better accuracy. The MSO is suitable for all trading timeframes, providing traders with the flexibility to observe and trade on any scale, from intraday to long-term trends.
⚙️ How It Works
The MSO uses advanced logic to detect critical price levels that highlight structural changes in the market. It calculates swing highs and lows using user-defined settings, allowing for customization in market structure analysis. The indicator further highlights BOS and MSB levels by leveraging supply and demand detection, offering a comprehensive understanding of trend reversals and continuation points.
✨ Key features include:
📈 Bullish and Bearish BOS/MSB Lines: MSO differentiates between bullish and bearish structural events, which helps traders understand the prevailing trend and identify key pivot points.
🎨 Customizable Appearance: Traders can personalize line styles and colors for BOS/MSB, trendlines and EQH/EQL, making the tool integrate seamlessly into any chart setup.
🔄 Swing Length and Demand Memory Settings: MSO allows users to specify the swing length for BOS lookback and how many historical zones should be stored on the chart, enhancing control over how much data is analyzed visually.
📊 Market Structure Elements Explained
Break of Structure (BOS): A BOS occurs when the price breaks through a previous Higher High (HH) or Lower Low (LL), indicating a continuation of the current trend. It helps confirm the prevailing market direction.
Market Structure Break (MSB): occurs when a Higher Low (HL) or Lower High (LH) is broken, signaling a potential shift in the market trend. This typically marks the beginning of a trend reversal.
Equal Highs (EQH) and Equal Lows (EQL): These levels are areas of liquidity where previous highs or lows are tested again by the market, often signifying areas of accumulation or distribution. EQH and EQL are crucial for recognizing potential liquidity traps.
Trendlines: Trendlines are used to connect successive highs or lows, providing a visual representation of the current direction of the market. They help traders understand trend momentum and potential breakouts.
🔥 Key Features and Benefits
✅ Accurate Market Structure Detection
The Market Structure Overlay identifies Break of Structure (BOS) and Market Structure Breaks (MSB) events that indicate potential trend changes or continuations. The indicator also distinguishes between bullish and bearish market structures using color-coded lines and custom labels, which helps in immediately identifying market dynamics.
📊 Supply and Demand Zones for BOS/MSB Detection
The MSO uses Supply and Demand Zones as part of the detection logic for BOS and MSB. Although these zones are not directly plotted, they play a key role in determining when a significant structural break occurs. This unique approach enhances the accuracy of BOS and MSB identification, as it takes into account areas of accumulation or distribution that often serve as precursors to trend shifts.
🔍 Equal Highs and Lows Detection
The MSO features Equal Highs (EQH) and Equal Lows (EQL) detection, which is a significant indicator for liquidity zones where potential orders might be resting. These areas often trigger key price actions as they get tested or broken.
⚙️ Customizable Settings
Users can customize the indicator’s behavior, including choosing whether to use candle wicks or closing prices, setting swing lengths for identifying key levels, and specifying memory for storing past zones. This flexibility allows traders to adjust the indicator to suit their personal trading strategy and preferences.
⏱️ Multi-Timeframe Highs and Lows
The indicator includes multi-timeframe support for significant highs and lows (daily, weekly, monthly, yearly). This helps traders understand where they are in the larger market context, especially when making decisions during intra-session trading.
🔎 Precise Detection Approach
Unlike traditional market structure indicators that rely heavily on simple pivot points, the MSO employs a more advanced and precise detection mechanism for BOS and MSB. Traditional pivot points typically use a lookback function to identify highs and lows over a fixed period, which can lead to false signals due to market noise or temporary price fluctuations. In contrast, the MSO records and checks swing and interim points against stored memory, only signaling structural breaks after a thorough evaluation. This results in a non-repainting and highly accurate depiction of market structure, minimizing false alerts and providing traders with reliable insights based on price action that remains consistent once confirmed.
🎨 Visualization Options
The MSO uses color-coded BOS and MSB lines to easily differentiate between bullish and bearish scenarios. Users also have options to visualize equal highs/lows (EQH/EQL) to recognize potential liquidity points. A detailed breakdown of Supply and Demand Zones helps traders identify high-probability areas for entries and exits. Additionally, the indicator allows traders to toggle visibility of key elements, including trend lines, labels, and multi-timeframe levels.
📝 Summary
The Market Structure Overlay is an essential tool for understanding price behavior and structural shifts in any financial market. Its use of sophisticated logic to detect structural breaks, coupled with customizable visualizations, allows traders to gain a nuanced view of market dynamics. The supply and demand zones, together with the BOS, MSB, EQH, and EQL labels, provide a strong foundation for both trend-following and reversal trading strategies.
MSO is not just a tool for understanding market direction—it's designed to enhance decision-making by delivering reliable and actionable insights into market structure. This indicator provides a seamless blend of market theory with advanced technical features, making it a valuable asset for serious traders.
📊 Key Visual Examples:
📈 Bullish and Bearish BOS/MSB Lines
📸
🌀 Trendlines
📸
⚠️ Note:
This indicator should be used as part of a broader trading strategy. Always confirm your entries and exits with additional tools and analysis methods. 💡
Z-Score Weighted Trend System I [InvestorUnknown]The Z-Score Weighted Trend System I is an advanced and experimental trading indicator designed to utilize a combination of slow and fast indicators for a comprehensive analysis of market trends. The system is designed to identify stable trends using slower indicators while capturing rapid market shifts through dynamically weighted fast indicators. The core of this indicator is the dynamic weighting mechanism that utilizes the Z-score of price , allowing the system to respond effectively to significant market movements.
Dynamic Z-Score-Based Weighting System
The Z-Score Weighted Trend System I utilizes the Z-score of price to assign weights dynamically to fast indicators. This mechanism is designed to capture rapid market shifts at potential turning points, providing timely entry and exit signals.
Traders can choose from two primary weighting mechanisms:
Threshold-Based Weighting: The fast indicators are given weight only when the absolute Z-score exceeds a user-defined threshold. Below this threshold, fast indicators have no impact on the final signal.
Continuous Weighting: By setting the threshold to zero, fast indicators always contribute to the final signal, regardless of Z-score levels. However, this increases the likelihood of false signals during ranging or low-volatility markets
// Calculate weight for Fast Indicators based on Z-Score (Slow Indicator weight is kept to 1 for simplicity)
f_zscore_weights(series float z, simple float weight_thre) =>
float fast_weight = na
float slow_weight = na
if weight_thre > 0
if math.abs(z) <= weight_thre
fast_weight := 0
slow_weight := 1
else
fast_weight := 0 + math.sqrt(math.abs(z))
slow_weight := 1
else
fast_weight := 0 + math.sqrt(math.abs(z))
slow_weight := 1
Choice of Z-Score Normalization
Traders have the flexibility to select different Z-score processing methods to better suit their trading preferences:
Raw Z-Score or Moving Average: Traders can opt for either the raw Z-score or a moving average of the Z-score to smooth out fluctuations.
Normalized Z-Score (ranging from -1 to 1) or Z-Score Percentile: The normalized Z-score is simply the raw Z-score divided by 3, while the Z-score percentile utilizes a normal distribution for transformation.
f_zscore_perc(series float zscore_src, simple int zscore_len, simple string zscore_a, simple string zscore_b, simple string ma_type, simple int ma_len) =>
z = (zscore_src - ta.sma(zscore_src, zscore_len)) / ta.stdev(zscore_src, zscore_len)
zscore = switch zscore_a
"Z-Score" => z
"Z-Score MA" => ma_type == "EMA" ? (ta.ema(z, ma_len)) : (ta.sma(z, ma_len))
output = switch zscore_b
"Normalized Z-Score" => (zscore / 3) > 1 ? 1 : (zscore / 3) < -1 ? -1 : (zscore / 3)
"Z-Score Percentile" => (f_percentileFromZScore(zscore) - 0.5) * 2
output
Slow and Fast Indicators
The indicator uses a combination of slow and fast indicators:
Slow Indicators (constant weight) for stable trend identification: DMI (Directional Movement Index), CCI (Commodity Channel Index), Aroon
Fast Indicators (dynamic weight) to identify rapid trend shifts: ZLEMA (Zero-Lag Exponential Moving Average), IIRF (Infinite Impulse Response Filter)
Each indicator is calculated using for-loop methods to provide a smoothed and averaged view of price data over varying lengths, ensuring stability for slow indicators and responsiveness for fast indicators.
Signal Calculation
The final trading signal is determined by a weighted combination of both slow and fast indicators. The slow indicators provide a stable view of the trend, while the fast indicators offer agile responses to rapid market movements. The signal calculation takes into account the dynamic weighting of fast indicators based on the Z-score:
// Calculate Signal (as weighted average)
float sig = math.round(((DMI*slow_w) + (CCI*slow_w) + (Aroon*slow_w) + (ZLEMA*fast_w) + (IIRF*fast_w)) / (3*slow_w + 2*fast_w), 2)
Backtest Mode and Performance Metrics
The indicator features a detailed backtesting mode, allowing traders to compare the effectiveness of their selected settings against a traditional Buy & Hold strategy. The backtesting provides:
Equity calculation based on signals generated by the indicator.
Performance metrics comparing Buy & Hold metrics with the system’s signals, including: Mean, positive, and negative return percentages, Standard deviations, Sharpe, Sortino, and Omega Ratios
// Calculate Performance Metrics
f_PerformanceMetrics(series float base, int Lookback, simple float startDate, bool Annualize = true) =>
// Initialize variables for positive and negative returns
pos_sum = 0.0
neg_sum = 0.0
pos_count = 0
neg_count = 0
returns_sum = 0.0
returns_squared_sum = 0.0
pos_returns_squared_sum = 0.0
neg_returns_squared_sum = 0.0
// Loop through the past 'Lookback' bars to calculate sums and counts
if (time >= startDate)
for i = 0 to Lookback - 1
r = (base - base ) / base
returns_sum += r
returns_squared_sum += r * r
if r > 0
pos_sum += r
pos_count += 1
pos_returns_squared_sum += r * r
if r < 0
neg_sum += r
neg_count += 1
neg_returns_squared_sum += r * r
float export_array = array.new_float(12)
// Calculate means
mean_all = math.round((returns_sum / Lookback), 4)
mean_pos = math.round((pos_count != 0 ? pos_sum / pos_count : na), 4)
mean_neg = math.round((neg_count != 0 ? neg_sum / neg_count : na), 4)
// Calculate standard deviations
stddev_all = math.round((math.sqrt((returns_squared_sum - (returns_sum * returns_sum) / Lookback) / Lookback)) * 100, 2)
stddev_pos = math.round((pos_count != 0 ? math.sqrt((pos_returns_squared_sum - (pos_sum * pos_sum) / pos_count) / pos_count) : na) * 100, 2)
stddev_neg = math.round((neg_count != 0 ? math.sqrt((neg_returns_squared_sum - (neg_sum * neg_sum) / neg_count) / neg_count) : na) * 100, 2)
// Calculate probabilities
prob_pos = math.round((pos_count / Lookback) * 100, 2)
prob_neg = math.round((neg_count / Lookback) * 100, 2)
prob_neu = math.round(((Lookback - pos_count - neg_count) / Lookback) * 100, 2)
// Calculate ratios
sharpe_ratio = math.round((mean_all / stddev_all * (Annualize ? math.sqrt(Lookback) : 1))* 100, 2)
sortino_ratio = math.round((mean_all / stddev_neg * (Annualize ? math.sqrt(Lookback) : 1))* 100, 2)
omega_ratio = math.round(pos_sum / math.abs(neg_sum), 2)
// Set values in the array
array.set(export_array, 0, mean_all), array.set(export_array, 1, mean_pos), array.set(export_array, 2, mean_neg),
array.set(export_array, 3, stddev_all), array.set(export_array, 4, stddev_pos), array.set(export_array, 5, stddev_neg),
array.set(export_array, 6, prob_pos), array.set(export_array, 7, prob_neu), array.set(export_array, 8, prob_neg),
array.set(export_array, 9, sharpe_ratio), array.set(export_array, 10, sortino_ratio), array.set(export_array, 11, omega_ratio)
// Export the array
export_array
//}
Calibration Mode
A Calibration Mode is included for traders to focus on individual indicators, helping them fine-tune their settings without the influence of other components. In Calibration Mode, the user can visualize each indicator separately, making it easier to adjust parameters.
Alerts
The indicator includes alerts for long and short signals when the indicator changes direction, allowing traders to set automated notifications for key market events.
// Alert Conditions
alertcondition(long_alert, "LONG (Z-Score Weighted Trend System)", "Z-Score Weighted Trend System flipped ⬆LONG⬆")
alertcondition(short_alert, "SHORT (Z-Score Weighted Trend System)", "Z-Score Weighted Trend System flipped ⬇Short⬇")
Important Note:
The default settings of this indicator are not optimized for any particular market condition. They are generic starting points for experimentation. Traders are encouraged to use the calibration tools and backtesting features to adjust the system to their specific trading needs.
The results generated from the backtest are purely historical and are not indicative of future results. Market conditions can change, and the performance of this system may differ under different circumstances. Traders and investors should exercise caution and conduct their own research before using this indicator for any trading decisions.
5-0 Harmonic Pattern [TradingFinder] 0XABCD 50 Harmonic Detector🔵 Introduction
Harmonic patterns are a powerful tool in technical analysis, widely used to detect reversal points and trend changes. Among these, the 5-0 Harmonic Pattern stands out due to its reliance on specific Fibonacci ratios—1.13, 1.618, 2.24, and 0.45 to 0.55—anchored at points 0, X, A, B, C, and D. This pattern provides a structured approach for identifying critical buy and sell points, helping traders achieve optimal entry and exit levels in volatile markets.
This 5-0 Harmonic Pattern indicator automatically detects and marks bullish and bearish formations on the chart, offering precise trading signals based on established harmonic ratios. With its dynamic signals, the 5-0 pattern enables traders to anticipate market movements and capitalize on favorable price trends.
Especially in fast-moving markets, harmonic patterns, particularly the 5-0 Harmonic Pattern, equip traders with an essential framework for identifying reversal opportunities and refining their trading strategies.
Bullish 5-0 Pattern :
Bearish 5-0 Pattern :
🔵 How to Use
The 5-0 Harmonic Pattern indicator is designed to automatically mark the key levels of the harmonic structure: 0, X, A, B, C, and D. By doing so, it detects both bullish and bearish patterns and helps traders recognize optimal entry and exit points.
Formed through specific Fibonacci levels, this pattern signals potential shifts in trend direction, giving traders critical insights for managing entries and exits effectively. The tool proves valuable in high-volatility settings, enabling traders to leverage these signals for refined decision-making.
🟣 Bullish 5-0 Pattern
A bullish 5-0 pattern materializes when Fibonacci levels indicate a potential price reversal to the upside. With points 0, X, A, B, C, and D in alignment, the indicator highlights this upward momentum by displaying a green arrow as a buy signal on the chart. This marking provides a clear entry point, indicating that prices are likely to rise, making it a prime moment for traders to enter long positions.
Additionally, the bullish 5-0 pattern is equipped with tools for traders to set stop-loss and take-profit points based on harmonic lines within the pattern, which represent support and resistance levels. Using these dynamic points, traders can create a more effective risk-reward setup while following the bullish signals in a standalone harmonic strategy.
🟣 Bearish 5-0 Pattern
The bearish 5-0 pattern functions similarly but signals a likely downturn. This pattern emerges when Fibonacci ratios align at points 0, X, A, B, C, and D, predicting a reversal downward. The indicator generates a sell signal, marked by a red arrow, prompting traders to exit long positions or initiate short trades to capitalize on falling prices.
Traders can utilize this bearish pattern for defining exit strategies and setting key levels for stop-loss and take-profit orders. The bearish 5-0 pattern enhances traders’ abilities to gauge critical price levels and manage trade risk effectively, especially in volatile markets. For traders focused on profiting from downward trends, this indicator serves as a powerful tool for timely entries and exits.
🔵 Setting
🟣 Logical Setting
ZigZag Pivot Period : You can adjust the period so that the harmonic patterns are adjusted according to the pivot period you want. This factor is the most important parameter in pattern recognition.
Show Valid Forma t: If this parameter is on "On" mode, only patterns will be displayed that they have exact format and no noise can be seen in them. If "Off" is, the patterns displayed that maybe are noisy and do not exactly correspond to the original pattern.
Show Formation Last Pivot Confirm : if Turned on, you can see this ability of patterns when their last pivot is formed. If this feature is off, it will see the patterns as soon as they are formed. The advantage of this option being clear is less formation of fielded patterns, and it is accompanied by the latest pattern seeing and a sharp reduction in reward to risk.
Period of Formation Last Pivot : Using this parameter you can determine that the last pivot is based on Pivot period.
🟣 Genaral Setting
Show : Enter "On" to display the template and "Off" to not display the template.
Color : Enter the desired color to draw the pattern in this parameter.
LineWidth : You can enter the number 1 or numbers higher than one to adjust the thickness of the drawing lines. This number must be an integer and increases with increasing thickness.
LabelSize : You can adjust the size of the labels by using the "size.auto", "size.tiny", "size.smal", "size.normal", "size.large" or "size.huge" entries.
🟣 Alert Setting
Alert : On / Off
Message Frequency : This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone : The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
Conclusion
The 5-0 Harmonic Pattern indicator serves as a robust solution for technical analysts and traders looking to pinpoint market reversal points. By automatically recognizing 5-0 patterns and generating buy and sell signals based on Fibonacci ratios, this tool supports precise trend analysis and entry/exit timing. The indicator’s adjustable alerts, color themes, and pattern toggles allow for comprehensive customization, ensuring alignment with individual trading strategies.
Harmonic patterns, especially the 5-0 Harmonic Pattern, guide traders in identifying high-accuracy entry and exit points, thus aiding in more informed trading decisions. By combining Fibonacci ratio analysis with real-time signal updates, this indicator provides a well-rounded approach for risk management and capitalizing on trading opportunities. Professional traders can harness this tool to enhance technical analysis precision and capitalize on price trends effectively, maximizing profitability in both bullish and bearish markets.
India market cap and smart dataThis indicator displays important financial and technical data, such as Market Cap, P/E Ratio, ADR %, etc.
It is specially designed for swing traders.
Key Features and Highlights
- Market Cap Alert: If the Market Cap of a stock is below 1000 crore , it is displayed in red to indicate a potential liquidity issue.
- P/E Ratio for Loss-Making Companies : For companies with net losses, the P/E ratio is shown as 0 and displayed in red , alerting you to the unprofitable status of the company.
- ADR Alert: When the ADR is below 4% , it is highlighted in red . Swing traders typically look for stocks with high ADR.
- 52-Week High Proximity: If a stock is more than 20% below its 52-week high , this data is shown in red .
- 52-Week Low Performance: If a stock is up by more than 70% from its 52-week low , the data is displayed in green , indicating strong performance.
Additional Features
- Toggle data points on or off as desired.
- Supports both dark and light modes.
- Position the table wherever preferred on the chart.
- Customize the ADR % calculation based on the desired number of days (default is 20 days).
Note: The calculation for the percentage away from the 52-week high is based on the closing price of the 52-week high candle, not the high price.
Screener MA CrossThe Screener MA Cross is an efficient tool designed to help traders quickly identify potential buy and sell signals across multiple currency pairs and timeframes. This script monitors the crossover behavior of two moving averages (MA8 and MA50) to determine possible entry points for trades.
Key Features:
Multi-Pair Monitoring: The indicator allows users to screen popular assets, including XAUUSD, US30, GBPUSD, EURUSD, USDJPY, USDCAD, and GBPJPY. You can add or remove symbols based on your preference.
Dual Timeframe Analysis: It tracks moving average crossovers on both 15-minute and 1-hour charts, giving users insights into short-term and medium-term trends without switching between timeframes.
Color-Coded Signals:
Green: Indicates a bullish "Buy" signal when the MA8 crosses above the MA50, suggesting upward momentum.
Red: Indicates a bearish "Sell" signal when the MA8 crosses below the MA50, signaling downward momentum.
Gray: Represents a neutral or no-cross state, indicating no clear trend.
Clean Table Format: Displays all relevant signals directly on your chart in a structured, easy-to-read table format, allowing you to quickly scan and assess trading opportunities.
How It Works: The script uses moving averages (MA8 and MA50) to analyze crossover patterns, a common method for identifying trend changes. A crossover occurs when a shorter moving average (MA8) crosses above or below a longer moving average (MA50). By requesting data from the 15-minute and 1-hour timeframes, the Screener MA Cross provides a clear overview of the market situation across various assets, helping you decide on potential trades.
This tool is particularly useful for trend-following strategies and can be used to spot momentum shifts on smaller timeframes, making it ideal for day traders and scalpers.
How to Use:
Add the indicator to your chart and customize the asset symbols to match your trading preferences.
Monitor the signals on the table. Green signals indicate potential buying opportunities, while red signals suggest possible selling points.
Use alongside other analysis: While the Screener MA Cross offers valuable insights, it's best used in combination with other indicators and analysis techniques to confirm trade setups.
RPS Trading Signals & Backtesting
Overview:
The Enhanced Relative Price Strength (RPS) Indicator is designed for trend traders looking to identify the relative strength of stocks within a select universe. By comparing the price movements of chosen stocks over a specified period, this indicator helps traders make informed decisions about potential buying and selling opportunities.
Key Features:
Relative Strength Ranking: Our RPS indicator ranks the price performance of individual stocks against a curated selection, enabling users to pinpoint which stocks are exhibiting relative strength or weakness.
Customizable Stock Universe: The script evaluates 40 stocks, which include 30 high-weight NDX100 stocks, 4 major index ETFs (SPY, QQQ, DIA, IWM), and allows for the addition of 6 user-defined custom stocks.
Dynamic Color Gradients: The visual representation of the RPS score utilizes a gradient color scheme ranging from purple at low scores to red at high scores, leveraging the color for clear, immediate insight into stock performance.
Threshold Visualization: Users can set specific high (default 85) and low (default 15) thresholds for RPS, highlighted with solid line indicators and area fills. This visual aspect aids traders in quickly spotting entry and exit points.
Trading Signal Generation: The script includes logic for generating buy and sell signals according to defined RPS behaviors relative to the set thresholds, factoring in market conditions based on a long-term moving average.
Backtesting Capabilities: Users can backtest trading signals by inputting desired start and end dates, allowing traders to evaluate the effectiveness of the RPS strategy on historical data for various assets including stocks and cryptocurrencies (e.g., NVDA, LLY, GOOG, BTC, ETH, SOL).
User-Friendly Options: The script allows for adjustments such as moving average lengths, visibility of trading signals, and fills for ease of use and customization according to trading preferences.
How It Works:
The RPS Indicator functions by calculating the performance of stocks relative to each other. Based on the RPS trends, the indicator identifies when to enter or exit trades, providing a framework to capitalize on market movements.
Conclusion:
The Enhanced RPS Indicator aims to empower traders with a powerful analytical tool in their arsenal, tailored to simplify decision-making and bolster trading strategies. As this script evolves, we encourage feedback and collaboration from users to refine and enhance its capabilities further.
Trade Less, Earn More!
Dynamic Box IndicatorThe BOX Indicator is a sophisticated trading tool designed to operate on 15-minute charts, aimed at enhancing market analysis. This indicator identifies the highest and lowest values of the first bar of each day, providing traders with strategic buy and sell signals. As a new day begins, the indicator dynamically updates these values to reflect current market conditions.
When the closing price surpasses the established highest level, a buy signal (LONG) is generated, signaling a strong potential upward movement in price. Conversely, when the closing price falls below the lowest level, a sell signal (SHORT) is activated, indicating that the price may experience a downward correction. On the chart, these critical levels are highlighted in eye-catching colors, while buy and sell signals are represented by symbols.
Additionally, the indicator includes an alert system for buy and sell conditions, allowing traders to minimize the risk of missing significant trading opportunities. This alert system enables users to monitor market changes in real time and take swift action when necessary.
Overall, the BOX Indicator serves as an effective tool that helps traders gain a deeper understanding of market movements and refine their trading strategies. It empowers users to enhance their technical analysis skills while maximizing their potential to capitalize on market fluctuations.
EMA and ATR Indicator BY DemirkanEMA 10 and ATR Indicator BY Demirkan
The EMA 10 and ATR Indicator combines two powerful technical indicators used to analyze trends and identify potential trading opportunities.
Indicator Components:
Exponential Moving Average (EMA):
EMA 10: Calculates the weighted average of the last 10 closing prices. This indicator is effective in tracking short-term price movements. When the price is above the EMA, it is considered that the trend is upward; when it is below, it is assessed as a downward trend.
Average True Range (ATR):
ATR: A measure of market volatility. When the ATR value falls within a specified range (between 10 and 14 in this indicator), the price movement is considered significant. This helps you base your trading decisions on more solid grounds.
Usage Recommendations:
Buy Signal: When the price is above the EMA and the ATR is within the specified range, this can be interpreted as a potential buy signal.
Sell Signal: When the price is below the EMA, this can be interpreted as a potential sell signal.
Chart Displays:
EMA Line: Displayed as a blue line, allowing you to see how the EMA relates to current price levels.
Price Status: Circles are used to indicate whether the price is above or below the EMA. A green circle indicates the price is above the EMA, while a red circle indicates it is below.
Background Colors: The chart background changes to green or red to highlight buy and sell conditions.
Aesthetic Presentation:
Using the "Flag" and "Below" parameters for the Price vs EMA indicator provides an aesthetically pleasing appearance on the chart. This type of visual presentation helps users quickly and easily grasp trading signals. Additionally, this aesthetic touch makes investors' charts look more professional and appealing.
This indicator is a useful tool for traders looking to develop short-term trading strategies. However, it should always be used in conjunction with additional analysis and other indicators.
Note: This indicator is for educational purposes only and should not be taken as investment advice.
Fibonacci Dynamic LevelsThis Pine Script code implements an Automatic Fibonacci Levels indicator for TradingView, designed to analyze market trends and visualize key Fibonacci retracement levels dynamically on the chart.
1. User Inputs and Settings
The script begins by defining several user-configurable settings. These include options to extend the Fibonacci lines left or right, display an anchor line (a diagonal line connecting the most recent swing high and low), and customize its color and width. Additionally, users can select the size of the swing detection (small, medium, or large) and enable or disable individual Fibonacci levels such as 0, 0.236, 0.382, and so forth, allowing for personalized adjustments based on trading preferences.
2. Trend Information
The script also incorporates a label that provides real-time trend information. Users can choose where to position this trend label on the chart (e.g., top right, bottom left), enhancing the indicator's usability by providing context on the market’s current direction.
3. Swing Detection
A crucial part of the script involves detecting swing highs and lows based on the selected swing size. This is achieved by applying a lookback period (34, 89, or 144 bars) to determine the highest and lowest points within that range. This detection is pivotal for accurately calculating the Fibonacci levels based on the identified swing points.
4. Fibonacci Level Calculation
The Fibonacci levels are drawn dynamically based on the trend direction determined by comparing the current price with a simple moving average (SMA) over 50 periods.
In a downtrend, Fibonacci levels are calculated from the swing low to the swing high, indicating potential resistance levels where prices might retrace.
Conversely, in an uptrend, Fibonacci levels are calculated from the swing high to the swing low, highlighting potential support levels where prices could bounce back.
For each Fibonacci level that is enabled, the script creates a line and a corresponding label displaying the level value and price, providing clear visual cues for traders.
5. Anchor Line Feature
The anchor line visually connects the most recent swing high and low points, offering a quick reference for traders to gauge the price action's context. This line is updated dynamically as new swing points are detected, reflecting the most current market conditions.
6. Trend Label
The trend label provides a summary of the market trend—either positive (uptrend), negative (downtrend), or flat. This label updates in real time, ensuring traders can quickly ascertain the prevailing market sentiment at a glance.
7. Cleanup Mechanism
Finally, the script includes mechanisms to clean up the drawn lines and labels whenever conditions change or when settings are modified. This ensures that the chart remains uncluttered and only displays relevant information based on the user's current settings.
VOLUME DIRECTION INDICATORDesigned for the 1-hour chart, this indicator shows:
Green Line: Volume when price rises, suggesting buying.
Red Line: Volume when price falls, indicating selling.
How to Use:
Watch for Crossover: When the Green Line moves above the Red, it might signal a budding uptrend.
Check Retracement: If the Green Line pulls back but stays above the Red, the uptrend could be strengthening.
Price Check: Look for a small price drop but not a reversal.
Trade Entry:
Enter at the high of the retracement candle.
Or wait for the Green Line to rise again.
For Precision: Draw a line at the retracement peak and switch to a shorter timeframe to find entry patterns above this line.
Remember: Use this with other tools for better trading decisions.
The Volume Direction Indicator provides a visual representation of market activity by assuming volume can be attributed to buying or selling based on price action within each bar. When the price closes higher than it opened, the volume for that period is considered as 'Bought Shares', plotted in green. Conversely, if the price closes lower, the volume is treated as 'Sold Shares', shown in red. This indicator resets daily to give a fresh perspective on trading activity each day.
Key Features:
Buying Pressure: Green line represents the cumulative volume during periods where the price increased.
Selling Pressure: Red line indicates the cumulative volume during price decreases.
Daily Reset: Accumulated values reset at the start of each new trading day, focusing on daily market sentiment.
Note: This indicator simplifies market dynamics by linking volume directly to price changes. It does not account for complex trading scenarios like short selling or market manipulations. Use this indicator as a tool to gauge general market direction and activity, not for precise transaction data.
Gold scalper 1 min or 30 secThis Pine Script code for TradingView is designed to create a trading indicator titled "Gold scalper 1 min or 30 sec." The indicator is primarily used for scalping gold and is focused on short-term timeframes (1 minute or 30 seconds).
### Key Components of the Code:
1. **Inputs:**
- **Resolution:** Users can set the timeframe for analysis (default is 240 minutes).
- **SMA (Simple Moving Average):** Users can specify the period for the SMA used in the calculations.
2. **Daily Highs and Lows:**
- The script calculates the previous day’s high (`yesterdayHigh`) and low (`yesterdayLow`) prices using the `request.security` function.
3. **SMA Calculation:**
- An SMA is computed based on the closing prices of the selected timeframe.
4. **Breakout Conditions:**
- The script detects breakouts using the SMA in relation to yesterday's high and low:
- A breakout upwards occurs when the SMA crosses above the previous day's high.
- A breakout downwards occurs when the SMA crosses below the previous day's low.
5. **RSI (Relative Strength Index) Calculations:**
- Two RSI values are calculated to assess market momentum:
- **Banker RSI:** Used for buy conditions.
- **Hot Money RSI:** Used for sell conditions.
- These include adjustable sensitivity factors and periods to customize the indicator’s sensitivity.
6. **Trade Direction Selection:**
- Users can select whether to trade long, short, or both directions.
7. **Buy and Sell Signals:**
- Buy conditions are set when the Retail Moving Average crosses the Banker Moving Average under certain conditions.
- Sell conditions are marked when the Banker Moving Average crosses under the specified sell threshold.
- These signals are visually represented on the chart with specific shapes (up arrows for buys and down arrows for sells).
8. **Alerts:**
- Alerts are generated for buy and sell signals to notify users when certain conditions are met.
9. **Trend Visualization:**
- The script visually indicates uptrends and downtrends on the chart by plotting colors based on the relationship between the current price, yesterday's high, and low.
### General Purpose:
This indicator is designed to assist traders in identifying potential buying and selling opportunities in the gold market based on short-term price movements and momentum indicators, helping them capitalize on quick price fluctuations that are characteristic of scalping strategies.
CMF and Scaled EFI OverlayCMF and Scaled EFI Overlay Indicator
Overview
The CMF and Scaled EFI Overlay indicator combines the Chaikin Money Flow (CMF) and a scaled version of the Elder Force Index (EFI) into a single chart. This allows traders to analyze both indicators simultaneously, facilitating better insights into market momentum and volume dynamics , specifically focusing on buying/selling pressure and momentum , without compromising the integrity of either indicator.
Purpose
Chaikin Money Flow (CMF): Measures buying and selling pressure by evaluating price and volume over a specified period. It indicates accumulation (buying pressure) when values are positive and distribution (selling pressure) when values are negative.
Elder Force Index (EFI): Combines price changes and volume to assess the momentum behind market moves. Positive values indicate upward momentum (prices rising with strong volume), while negative values indicate downward momentum (prices falling with strong volume).
By scaling the EFI to match the amplitude of the CMF, this indicator enables a direct comparison between pressure and momentum , preserving their shapes and zero crossings. Traders can observe the relationship between price movements, volume, and momentum more effectively, aiding in decision-making.
Understanding Pressure vs. Momentum
Chaikin Money Flow (CMF):
- Indicates the level of demand (buying pressure) or supply (selling pressure) in the market based on volume and price movements.
- Accumulation: When institutional or large investors are buying significant amounts of an asset, leading to an increase in buying pressure.
- Distribution: When these investors are selling off their holdings, increasing selling pressure.
Elder Force Index (EFI):
- Measures the strength and speed of price movements, indicating how forceful the current trend is.
- Positive Momentum: Prices are rising quickly, indicating a strong uptrend.
- Negative Momentum: Prices are falling rapidly, indicating a strong downtrend.
Understanding the difference between pressure and momentum is crucial. For example, a market may exhibit strong buying pressure (positive CMF) but weak momentum (low EFI), suggesting accumulation without significant price movement yet.
Features
Overlay of CMF and Scaled EFI: Both indicators are plotted on the same chart for easy comparison of pressure and momentum dynamics.
Customizable Parameters: Adjust lengths for CMF and EFI calculations and fine-tune the scaling factor for optimal alignment.
Preserved Indicator Integrity: The scaling method preserves the shape and zero crossings of the EFI, ensuring accurate analysis.
How It Works
CMF Calculation:
- Calculates the Money Flow Multiplier (MFM) and Money Flow Volume (MFV) to assess buying and selling pressure.
- CMF is computed by summing the MFV over the specified length and dividing by the sum of volume over the same period:
CMF = (Sum of MFV over n periods) / (Sum of Volume over n periods)
EFI Calculation:
- Calculates the EFI using the Exponential Moving Average (EMA) of the price change multiplied by volume:
EFI = EMA(n, Change in Close * Volume)
Scaling the EFI:
- The EFI is scaled by multiplying it with a user-defined scaling factor to match the CMF's amplitude.
Plotting:
- Both the CMF and the scaled EFI are plotted on the same chart.
- A zero line is included for reference, aiding in identifying crossovers and divergences.
Indicator Settings
Inputs
CMF Length (`cmf_length`):
- Default: 20
- Description: The number of periods over which the CMF is calculated. A higher value smooths the indicator but may delay signals.
EFI Length (`efi_length`):
- Default: 13
- Description: The EMA length for the EFI calculation. Adjusting this value affects the sensitivity of the EFI to price changes.
EFI Scaling Factor (`efi_scaling_factor`):
- Default: 0.000001
- Description: A constant used to scale the EFI to match the CMF's amplitude. Fine-tuning this value ensures the indicators align visually.
How to Adjust the EFI Scaling Factor
Start with the Default Value:
- Begin with the default scaling factor of `0.000001`.
Visual Inspection:
- Observe the plotted indicators. If the EFI appears too large or small compared to the CMF, proceed to adjust the scaling factor.
Fine-Tune the Scaling Factor:
- Increase or decrease the scaling factor incrementally (e.g., `0.000005`, `0.00001`, `0.00005`) until the amplitudes of the CMF and EFI visually align.
- The optimal scaling factor may vary depending on the asset and timeframe.
Verify Alignment:
- Ensure that the scaled EFI preserves the shape and zero crossings of the original EFI.
- Overlay the original EFI (if desired) to confirm alignment.
How to Use the Indicator
Analyze Buying/Selling Pressure and Momentum:
- Positive CMF (>0): Indicates accumulation (buying pressure).
- Negative CMF (<0): Indicates distribution (selling pressure).
- Positive EFI: Indicates positive momentum (prices rising with strong volume).
- Negative EFI: Indicates negative momentum (prices falling with strong volume).
Look for Indicator Alignment:
- Both CMF and EFI Positive:
- Suggests strong bullish conditions with both buying pressure and upward momentum.
- Both CMF and EFI Negative:
- Indicates strong bearish conditions with selling pressure and downward momentum.
Identify Divergences:
- CMF Positive, EFI Negative:
- Buying pressure exists, but momentum is negative; potential for a bullish reversal if momentum shifts.
- CMF Negative, EFI Positive:
- Selling pressure exists despite rising prices; caution advised as it may indicate a potential bearish reversal.
Confirm Signals with Other Analysis:
- Use this indicator in conjunction with other technical analysis tools (e.g., trend lines, support/resistance levels) to confirm trading decisions.
Example Usage
Scenario 1: Bullish Alignment
- CMF Positive: Indicates accumulation (buying pressure).
- EFI Positive and Increasing: Shows strengthening upward momentum.
- Interpretation:
- Strong bullish signal suggesting that buyers are active, and the price is likely to continue rising.
- Action:
- Consider entering a long position or adding to existing ones.
Scenario 2: Bearish Divergence
- CMF Negative: Indicates distribution (selling pressure).
- EFI Positive but Decreasing: Momentum is positive but weakening.
- Interpretation:
- Potential bearish reversal; price may be rising but underlying selling pressure suggests caution.
- Action:
- Be cautious with long positions; consider tightening stop-losses or preparing for a possible trend reversal.
Tips
Adjust for Different Assets:
- The optimal scaling factor may differ across assets due to varying price and volume characteristics.
- Always adjust the scaling factor when analyzing a new asset.
Monitor Indicator Crossovers:
- Crossings above or below the zero line can signal potential trend changes.
Watch for Divergences:
- Divergences between the CMF and EFI can provide early warning signs of trend reversals.
Combine with Other Indicators:
- Enhance your analysis by combining this overlay with other indicators like moving averages, RSI, or Ichimoku Cloud.
Limitations
Scaling Factor Sensitivity:
- An incorrect scaling factor may misalign the indicators, leading to inaccurate interpretations.
- Regular adjustments may be necessary when switching between different assets or timeframes.
Not a Standalone Indicator:
- Should be used as part of a comprehensive trading strategy.
- Always consider other market factors and indicators before making trading decisions.
Disclaimer
No Guarantee of Performance:
- Past performance is not indicative of future results.
- Trading involves risk, and losses can exceed deposits.
Use at Your Own Risk:
- This indicator is provided for educational purposes.
- The author is not responsible for any financial losses incurred while using this indicator.
Code Summary
//@version=5
indicator(title="CMF and Scaled EFI Overlay", shorttitle="CMF & Scaled EFI", overlay=false)
cmf_length = input.int(20, minval=1, title="CMF Length")
efi_length = input.int(13, minval=1, title="EFI Length")
efi_scaling_factor = input.float(0.000001, title="EFI Scaling Factor", minval=0.0, step=0.000001)
// --- CMF Calculation ---
ad = high != low ? ((2 * close - low - high) / (high - low)) * volume : 0
mf = math.sum(ad, cmf_length) / math.sum(volume, cmf_length)
// --- EFI Calculation ---
efi_raw = ta.ema(ta.change(close) * volume, efi_length)
// --- Scale EFI ---
efi_scaled = efi_raw * efi_scaling_factor
// --- Plotting ---
plot(mf, color=color.green, title="CMF", linewidth=2)
plot(efi_scaled, color=color.red, title="EFI (Scaled)", linewidth=2)
hline(0, color=color.gray, title="Zero Line", linestyle=hline.style_dashed)
- Lines 4-6: Define input parameters for CMF length, EFI length, and EFI scaling factor.
- Lines 9-11: Calculate the CMF.
- Lines 14-16: Calculate the EFI.
- Line 19: Scale the EFI by the scaling factor.
- Lines 22-24: Plot the CMF, scaled EFI, and zero line.
Feedback and Support
Suggestions: If you have ideas for improvements or additional features, please share your feedback.
Support: For assistance or questions regarding this indicator, feel free to contact the author through TradingView.
---
By combining the CMF and scaled EFI into a single overlay, this indicator provides a powerful tool for traders to analyze market dynamics more comprehensively. Adjust the parameters to suit your trading style, and always practice sound risk management.