ADX and DI with SMAADX and DI with an additional configurable SMA,
The objective of this indicator is to provide a tool to asses if the price is trending (ADX above SMA) or range bound (ADX below SMA), to decide the type of strategy to apply.
Should be used at a larger time frame than the intended operation time frame.
在脚本中搜索"adx"
Chande Kroll Stop + ADX filter strategyDear TV''ers,
Hereby a script where i created a simple strategy using the underappreciated chande kroll stop indicator. Short signal is when the close crosses under the orange line and a long signal is generated upon a crossover of a close candle of the blue line.
Additionally you have the option to filter using ADX the minimize getting rekt in a choppy market.
good luck trading!
CCA - ADX ChangeThis shows the velocity in which the ADX value is moving. If the velocity is decreasing, the value will go to 0, if it's negative, the line will change to orange. Very useful to tell when the momentum is changing in a particular direction.
DMI + ADX + OBVThis trend following indicator is made up of 3 parts.
A normalized (OBV) On Balance Volume (the gray line) which ranges between -100 and 100 and has a 55 period SMA overlayed (the orange line) to give an indication of the overall trend as far as volume goes.
- If the volume decreases without a drop in price, it might indicate a move down.
- If volume increases without a rise rise in the price, it might indicate a move up.
The (DMI) Directional Movement Indicator which shows the strength of the bulls versus the bears.
- The red line measures how strongly price moves downwards.
- The green line measures how strongly price moves upwards.
One way to trade this is on crossovers e.g.when the green line crosses the red; although it's best to combine this with another indicator or pattern for confirmation.
Another useful feature of the DMI is the ability to see strength of buyers and sellers pressure at the same time, acting as a confirmation before entering a trade.
The third way to use the DMI is when price makes a new high but the green line does not. (Or the price makes a new low and the red line doesn't) This is known as divergence and should act as a warning to tighten your stops or take profits because it signals a possible change of direction.
The last part of the indicator is the (ADX) Average Directional Index
This is the blue line and shows the strength of the trend regardless of direction. This can act as a confirmation for the DMI or other indicators in your trading system.
When the blue line is:
- above the green shaded area there is an extreme trend.
- in the green shaded area there is a very strong trend.
- in the yellow shaded area there is a strong trend.
- below the yellow shaded area there is no trend.
Stochastic RSI 3in1 & Volatility peaks + ADX by AGUDescription:
3 Lines are Stochastic RSI's, strongest move is when all crosses and moves to one direction (from top or bottom).
Orange is original Stochastic of the timeline. (Live movement of price).
Green is original Stoch x 6. (Short term movement).
Red is original Stoch x27 (Long term price movement).
Transparent columns are ADX signal.
Higher the mountain, stronger the signal. When the mountain tops, trend usually change.
And finally the volatility peaks. Green peak HIGHEST volatility , RED peak LOWEST volatility .
I use it on 1 min BTC chart. But it works on all.
TIPS >> 3HCQ41cRpxcq2MJdRUSYoq9N1RnEy98xD2
BO ADX Binary Option strategy based on ADX/DI cross, Put or Call at the beginning of the next candle, expire 5m for 5m candle.
[FT] ADX-Multi-TF by FractalTraderAverage Directional Index is a way to determine trend strength (and whether there is a trend). One of the caveats is when you have trendless conditions on a higher timeframe. You can get whipsaw conditions on the current timeframe in that case.
The purpose of this script is to put ADX into the context of a higher degree trend on a single indicator.
ADX Combined Strategy IPadx Mmmentume in index options trading.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ADX / Connectable [Azullian]
Streamline your strategy with the ADX indicator. Precisely analyze market strength and direction, integrating these insights for more adaptable trading decisions.
This connectable ADX indicator is part of an indicator system designed to help test, visualize and build strategy configurations without coding. Like all connectable indicators , it interacts through the TradingView input source, which serves as a signal connector to link indicators to each other. All connectable indicators send signal weight to the next node in the system until it reaches either a connectable signal monitor, signal filter and/or strategy.
█ UNIFORM SETTINGS AND A WAY OF WORK
Although connectable indicators may have specific weight scoring conditions, they all aim to follow a standardized general approach to weight scoring settings, as outlined below.
■ Connectable indicators - Settings
• 🗲 Energy: Energy applies an ATR multiplier to the plotted shapes on the chart. A higher value plots shapes farther away from the candle, enhancing visibility.
• ☼ Brightness: Brightness determines the opacity of the shape plotted on the chart, aiding visibility. Indicator weight also influences opacity.
• → Input: Use the input setting to specify a data source for the indicator. Here you can connect the indicator to other indicators.
• ⌥ Flow: Determine where you want to receive signals from:
○ Both: Weights from this indicator and the connected indicator will apply
○ Indicator only: Only weights from this indicator will apply
○ Input only: Only weights from the connected indicator will apply
• ⥅ Weight multiplier: Multiply all weights in the entire indicator by a given factor, useful for quickly testing different indicators in a granular setup.
• ⥇ Threshold: Set a threshold to indicate the minimum amount of weight it should receive to pass it through to the next indicator.
• ⥱ Limiter: Set a hard limit to the maximum amount of weight that can be fed through the indicator.
■ Connectable indicators - Weight scoring settings
▢ Weight scoring conditions
• SM – Signal mode: Enable specific conditions for weight scoring
○ All: All signals will be scored.
○ Entries only: Only entries will score
○ Exits only: Only exits will score.
○ Entries & exits: Both entries and exits will score.
○ Zone: Continuous scoring for each candle within the zone.
• SP – Signal period: Defines a range of candles within which a signal can score.
• SC - Signal count: Specifies the number of bars to retrospectively examine and score.
○ Single: Score for a single occurrence
○ All occurrences: Score for all occurrences
○ Single + Threshold: Score for single occurrences within the signal period (SP)
○ Every + Threshold: Score for all occurrences within the signal period (SP)
▢ Weight scoring direction
• ES: Enter Short weight
• XL: Exit long weight
• EL: Enter Long weight
• XS: Exit Short weight
▢ Weight scoring values
• Weights can hold either positive or negative scores. Positive weights enhance a particular trading direction, while negative weights diminish it.
█ ADX - INDICATOR SETTINGS
■ Main settings
• Enable/Disable Indicator: Toggle the entire indicator on or off.
• S - Source: Choose an alternative data source for the ADX calculation.
• T - Timeframe: Select an alternative timeframe for the ADX calculation.
• SM - Smoothing: Smooth the length averages.
• LE - DI Length: Determine the DI: Directional indicator length.
• TH - Trend threshold: Specify the level the ADX has to cross
• EM - Entry signal mode: Determine entry mode
○ DI: Use only DI+ and DI- crossings
○ DI + ADX: Use DI with increasing ADX
○ DI + ADX + Invert: Use DI with increasing ADX and DI with decreasing ADX
• XM - Exit signal mode: Determine exit mode
○ DI: Use DI crossing to exit
○ ADX: Use decreasing ADX to signal exit
■ Scoring functionality
• The ADX scores long entries when the ADX crosses the TH: Trend threshold and +DM is greater than -DM
• The ADX scores long exits when the ADX falls back below the TH: Trend threshold and +DM is greater than -DM
• The ADX scores long zones the entire time the ADX is above the TH: Trend threshold and +DM is greater than -DM
• The ADX scores short entries when the ADX crosses the TH: Trend threshold and +DM is smaller than -DM
• The ADX scores short exits when the ADX falls back below the TH: Trend threshold and +DM is smaller than -DM
• The ADX scores short zones the entire time the ADX is above the TH: Trend threshold and +DM is smaller than -DM
█ PLOTTING
• Standard: Symbols (EL, XS, ES, XL) appear relative to candles based on set conditions. Their opacity and position vary with weight.
• Conditional Settings: A larger icon appears if global conditions are met. For instance, with a Threshold(⥇) of 12, Signal Period (SP) of 3, and Scoring Condition (SC) set to "EVERY", an ADX signaling over two times in 3 candles (scoring 6 each) triggers a larger icon.
█ USAGE OF CONNECTABLE INDICATORS
■ Connectable chaining mechanism
Connectable indicators can be connected directly to the signal monitor, signal filter or strategy , or they can be daisy chained to each other while the last indicator in the chain connects to the signal monitor, signal filter or strategy. When using a signal filter you can chain the filter to the strategy input to make your chain complete.
• Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
• Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter and/or strategy.
■ Set up this indicator with a signal filter and strategy
The indicator provides visual cues based on signal conditions. However, its weight system is best utilized when paired with a connectable signal filter, signal monitor, and/or strategy .
Let's connect the ADX to a connectable signal filter and a strategy :
1. Load all relevant indicators
• Load ADX / Connectable
• Load Signal filter / Connectable
• Load Strategy / Connectable
2. Signal Filter: Connect the ADX to the Signal Filter
• Open the signal filter settings
• Choose one of the three input dropdowns (1→, 2→, 3→) and choose : ADX / Connectable: Signal Connector
• Toggle the enable box before the connected input to enable the incoming signal
3. Signal Filter: Update the filter signals settings if needed
• The default settings of the filter enable EL (Enter Long), XL (Exit Long), ES (Enter Short) and XS (Exit Short).
4. Signal Filter: Update the weight threshold settings if needed
• All connectable indicators load by default with a score of 6 for each direction (EL, XL, ES, XS)
• By default, weight threshold (TH) is set at 5. This allows each occurrence to score, as the default score in each connectable indicator is 1 point above the threshold. Adjust to your liking.
5. Strategy: Connect the strategy to the signal filter in the strategy settings
• Select a strategy input → and select the Signal filter: Signal connector
6. Strategy: Enable filter compatible directions
• Set the signal mode of the strategy to a compatible direction with the signal filter.
Now that everything is connected, you'll notice green spikes in the signal filter representing long signals, and red spikes indicating short signals. Trades will also appear on the chart, complemented by a performance overview. Your journey is just beginning: delve into different scoring mechanisms, merge diverse connectable indicators, and craft unique chains. Instantly test your results and discover the potential of your configurations. Dive deep and enjoy the process!
█ BENEFITS
• Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
• Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
• Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
• Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
• Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
• Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
• Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
• Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.
█ COMPATIBLE INDICATORS
Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.
█ COMMON MISTAKES, CLARIFICATIONS AND TIPS
• Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
• Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
• Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
• Hide attributes: As connectable indicators send through quite some information you'll notice all the arguments are taking up some screenwidth and cause some visual clutter. You can disable arguments in Chart Settings / Status line.
• Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
• Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
█ A NOTE OF GRATITUDE
Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.
█ RISK DISCLAIMER
Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.
ADX and DI-BolarinwaThe Average Directional Movement Index (ADX) is a technical indicator that measures the strength of a trend. While the indicator itself doesn’t give an insight into the direction of the trend, the Directional Movement lines can be used to determine if the market moves up or down.
The ADX can return a value between 0 and 100. The usual threshold for a market to be considered as trending by the ADX is a value of 25 or above. Values between 25 and 50 signal a trending market, between 50 and 75 very strong trends and between 75 and 100 extremely strong trends.
The ADX Crossover Trading Strategy
A popular trading strategy to trade on the ADX is based on a crossover of the directional movement lines (+DI and -DI) which was developed directly by the indicator’s creator Mr. Wilder.
The trading strategy states that the first condition for a trade setup is that the ADX has a value of 25 or above, which indicates a trending market.
A buy order is triggered when +DI crosses above -DI, i.e. the underlying trend is an uptrend, while a sell signal is triggered when -DI crosses above +DI, i.e. the underlying trend is a downtrend.
Stop-losses are placed at the low of the current trading day, and the trade setup remains valid even if the directional movement lines cross again after the trade signal. Only a break of the current trading day’s low would lead to the trade setup becoming invalid.
If the ADX remains above 25 or rises even higher, indicating that the strength of the underlying trend increases, then traders can put a trailing stop on the trade.
The following chart shows an example of the ADX crossover strategy on the daily EUR/USD pair.
ADX Crossover Strategy
The first cross of -DI above +DI didn’t send a sell signal because the ADX was below 25. The sell signal came with ADX crossing above 25, while the -DI was still above +DI. On the chart, the SL was put just above the day’s high.
The second signal was a buy signal, with the cross of +DI above -DI and the ADX above 25, signaling a strong trend. The stop-loss is placed just below the day’s low, indicated by the dotted line on the chart.
Finally, the third sell signal came with the cross of -DI above -DI and the ADX above 25. Again, the stop-loss is placed just above the day’s high.
While the ADX crossover strategy can also be applied to lower timeframes, you need to be aware that the increased market noise may create more false signals than on the higher timeframes. The following chart is a 5-minute chart with buy and sell signals based on the crossover strategy. Notice that we placed the stop-losses slightly different than in the previous example. In this case, stop-losses have been placed at the recent highs and lows of the price.
ADX Trading Graph
The first buy signal came with +DI crossing above -DI and ADX above 25. In the middle of the chart, you can notice the crosses of the directional movement lines (+DI and -DI) while the ADX was below 25. As ADX needs to be above 25, those crosses are not used as entry triggers based on the ADX crossover strategy.
After that we received a sell signal with -DI crossing above +DI and ADX above 25, which is followed by a buy signal when +DI crossed above -DI.
Using ADX for Trade Confirmations
Beside the ADX crossover strategy which is based on the crosses of +DI and -DI, traders can also use the ADX indicator to supplement other trading strategies. For example, you might want to use a trend-following strategy when ADX shows a strong trend (value above 25), or a trading strategy that is more suited for ranging markets in times when the ADX shows an absence of trends (value below 25).
Before You Trade
The Average Directional Movement Index is a versatile technical indicator that can be used as a stand-alone trading strategy, or in combination with other trading strategies. The ADX crossover strategy is based on the crossover of the directional movement lines (+DI and -DI) and an ADX reading of above 25. While it can be used across all timeframes, it usually returns the best results on higher ones.
As the ADX measures the strength of the underlying trend, trend-following traders can use it to filter flat and ranging markets and avoid trading during those times.
Directional Movement IndexADX is an oscillating indicator, displayed as a single line, ranging from 0 to 100, it only indicates the strength of the trend and does not indicate its direction. In other words, the ADX is non-directional, meaning that it measures the strength of a trend, but doesn’t distinguish between uptrend and downtrends. So, during a strong uptrend, the ADX rises and during a strong downtrend, the ADX also rises.
Here is how you correctly read what ADX is saying about the market. Here are 5 aspects regarding the interpretation of the ADX:
1- When ADX is above 25, trend strength is strong. Usually, once the ADX gets above 25 this signals the beginning of a trend. Big moves (upwards or downwards) tend to happen when ADX is right around this number. You can experiment with this number, some traders that want faster signals, tend to use a 20 threshold when trading with the ADX.
2- When ADX is below 25, traders must avoid trend trading strategies as the market is in accumulation or distribution phase. So, when we see the ADX line below 20 or 25 level, we forget about trend following strategies and we apply strategies suitable for a ranging market.
3- When ADX is above 25 and Positive Directional Movement Indicator (+DMI) is above the Negative Directional Movement Indicator (-DMI). ADX measures the strength of an uptrend. The crossover between the 2 Directional Movement Indicator, as the ADX line is well above 25 can result in an excellent bullish move.
4- The Positive Directional Movement Indicator (+DMI) should be above the Negative Directional Movement and the ADX should be above 25 signals for a strong upward trend for long opportunities. When ADX is above 25 and Positive Directional Movement Indicator is below the Negative Directional Movement Indicator, ADX measures the strength of a downtrend and short opportunities.
5- Values over 50 of the ADX indicate a very strong trend
There are pros and cons of ADX.
So, why is the ADX useful for traders: First, is excellent at quantifying trend strength. Also, it allows traders to see the strength of bulls and bears at the same time. It is good at filtering out trades, during accumulation periods and is good at identifying trending conditions.
But the ADX also has its limitations. The most important disadvantage is the fact that ADX is a lagging indicator that follows the price, so we must be very careful when we apply this indicator, because we might miss the inception of the trend and join it when it’s nearly over.
Also, it offers many false signals when used on shorter time frames, so it’s advisable to trade it on higher time frames Also, the ADX does not contain all of the data necessary a for proper analysis of price action, so it must be used in combination with other tools or indicators.
Now that we fully covered the good and the bad regarding ADX, let’s see how it is used in a trading strategy.
The trading strategy involves a DMI crossover, confirmed by ADX above consolidation threshold. If +DMI crossover, we take long position and if -DMI crosses over, we take a short position.
Candles are re-colored for easy demonstration of uptrend, downtrend and consolidation periods.
Green candles – ADX > Consolidation Threshold and +DMI > -DMI
Red candles – ADX > Consolidation Threshold and +DMI < -DMI
Black candles – ADX < Consolidation Threshold
Repaint – This is a non-repainting strategy - All the signals are generated at candle closing. All the calculations are made on previous candle’s open, high, low, close. No request security function is used. No data is being used from higher time frame. Trade exit uses close function instead of exit to avoid limit orders. Only one long trade at a time (no pyramiding) is allowed.
Strategy Time frame – D (To filter out false signals, higher time frame is recommended)
Strategy For – Swing Traders
Assets – Cryptocurrencies + Stocks
ADX & DI with dynamic threshold indicator
ADX and DI with Dynamic Threshold
This Pine Script indicator, "ADX & DI with Dynamic Threshold," helps traders detect trends, trend reversals, and trend strength using the Average Directional Index (ADX) and the Directional Indexes (DI+ and DI-). It incorporates a dynamic threshold calculated using the average ADX over a user-defined period, along with a fixed minimum threshold, making trend detection more flexible and adaptable.
ADX and Directional Indexes (DI+ and DI-)
ADX measures the strength of a trend, while DI+ and DI- measure the direction of the trend. High DI+ signals upward price strength, and high DI- signals downward price strength.
Dynamic Threshold
A threshold based on the average ADX over a certain number of periods, ensuring the indicator adapts to market conditions. The threshold is compared to DI+ and DI- to generate trend signals.
Fixed Minimum Threshold
A user-defined minimum threshold ensures that signals are only generated in markets with a certain level of trend strength, preventing false signals in low-trending markets.
Visual Highlights
The background color highlights:
Green for potential uptrend,
Red for potential downtrend, and
Orange when directional movement is strong but trend strength is weak, helping traders avoid false signals in sideways markets.
Customization
Several input parameters allow for complete customization of the indicator, ensuring it can adapt to different timeframes and assets.
How to Use
Length (len)
This is the smoothing period used to calculate the ADX and DI+/- values. Range: 5 to 50 (default: 14).
Threshold Period (th_period)
Determines the number of periods over which the dynamic ADX threshold is calculated. Range: 5 to 200 (default: 50).
Fixed Minimum Threshold (fixed_th)
The minimum ADX value that must be exceeded for the indicator to trigger signals. Range: 10 to 40 (default: 20).
Smoothing Method
Choose between SMA (Simple Moving Average) or EMA (Exponential Moving Average) for smoothing the true range and directional movement calculations.
DI+ (Green)
Indicates the strength of upward price movements.
DI- (Red)
Indicates the strength of downward price movements.
ADX (Navy)
Indicates the overall strength of the trend, regardless of direction.
Dynamic Threshold (Gray)
The dynamic threshold used for comparing ADX values.
Fixed Threshold Line
A dotted black line showing the user-defined minimum threshold for ADX.
Green Background
Indicates a potential uptrend when DI+ > DI- and ADX is above the threshold.
Red Background
Indicates a potential downtrend when DI- > DI+ and ADX is above the threshold.
Orange Background
Indicates that DI+ or DI- are strong, but ADX is weak, suggesting a lack of trend strength despite directional movement, which could lead to false signals.
Adjust the length (len) based on the volatility of the asset. A lower len (e.g., 10) may be suitable for faster timeframes (like 5-min charts), while a higher value (e.g., 20-30) may work better on longer timeframes.
Use the threshold period (th_period) to fine-tune the dynamic ADX threshold. A higher value smooths the dynamic threshold over a longer period, making it more resistant to sudden volatility.
Fixed Threshold (fixed_th) should be set based on the strength of trends you want to capture. A higher value (e.g., 30-40) is more conservative and will only trigger signals in very strong trends.
Example Usage
This indicator can be used to:
Identify trends: When the ADX crosses the threshold and DI+ or DI- is dominant, indicating an uptrend or downtrend.
Spot trend reversals: When DI+ and DI- cross each other with a strong ADX reading.
Avoid false signals: By recognizing when DI+ or DI- are strong, but the ADX is below the threshold (highlighted in orange).
Conclusion
The ADX and DI with Dynamic Threshold indicator is a versatile tool for trend-following strategies. It adapts to market conditions using dynamic and fixed thresholds and provides clear visual signals to help traders make informed decisions about market direction and trend strength.
By adjusting the various input parameters, this indicator can be tailored to any asset class or timeframe, making it suitable for all types of traders, from scalpers to swing traders.
Feel free to experiment with different settings and incorporate this indicator into your trading strategy for enhanced market analysis.
ADX Trend Strength Analyzer█ OVERVIEW
This script implements the Average Directional Index (ADX), a powerful tool used to measure the strength of market trends. It works alongside the Directional Movement Index (DMI), which breaks down the directional market pressure into bullish (+DI) and bearish (-DI) components. The purpose of the ADX is to indicate when the market is in a strong trend, without specifying the direction. This indicator can be especially useful for identifying market trends early and validating trading strategies based on trend-following systems.
The ADX component in this script is based on two key parameters:
ADX Smoothing Length (adxlen), which determines the degree of smoothing for the trend strength.
DI Length (dilen), which defines the look-back period for calculating the directional index values.
Additionally, a horizontal line is plotted at the 30 level, providing a widely used threshold that signifies when a trend is considered strong (above 30).
█ CONCEPTS
Directional Movement (DM): The core idea behind this indicator is the calculation of price movement in terms of bullish and bearish forces. By evaluating the change in highs and lows, the script distinguishes between bullish movement (+DM) and bearish movement (-DM). These values are normalized by dividing them by the True Range (TR), creating the +DI and -DI values.
True Range (TR): The True Range is calculated using the Average True Range (ATR) formula, and it serves to smooth out volatility, ensuring that short-term fluctuations don't distort the long-term trend signal.
ADX Calculation: The ADX is derived from the absolute difference between the +DI and -DI. By smoothing this difference and normalizing it, the ADX is able to measure the overall strength of the trend without regard to whether the market is moving up or down. A rising ADX indicates increasing trend strength, while a falling ADX signals weakening trends.
█ METHODOLOGY
Directional Movement Calculation: The script first determines the upward and downward price movement by comparing changes in the high and low prices. If the upward movement is greater than the downward movement, it registers a bullish signal and vice versa for bearish movement.
True Range Adjustment: The script then applies a smoothing function to normalize these movements by dividing them by the True Range (ATR). This ensures that the trend signal is based on relative, rather than absolute, price movements.
ADX Signal Generation: The final step is to calculate the ADX by applying the Relative Moving Average (RMA) to the difference between +DI and -DI. This produces the ADX value, which is plotted in red, making it easy to visualize shifts in market momentum.
Threshold Line: A blue horizontal line is plotted at 30, which serves as a key reference point. When the ADX is above this line, it indicates a strong trend, whether bullish or bearish.
█ HOW TO USE
Trend Strength: Traders typically use the 30 level as a critical threshold. When the ADX is above 30, it signifies a strong trend, making it a favorable environment for trend-following strategies. Conversely, ADX values below 30 suggest a weak or non-trending market.
+DI and -DI Relationship: The indicator also provides insight into whether the trend is bullish or bearish. When +DI is greater than -DI, the market is considered bullish. When -DI is greater than +DI, the market is considered bearish. While this script focuses on the ADX value itself, the underlying +DI and -DI help interpret the trend direction.
Market Conditions: This indicator is effective in trending markets, but not ideal for choppy or sideways conditions. Traders can use it to determine the best entry and exit points when trends are strong, or to avoid trading in periods of low volatility.
Combining with Other Indicators: The ADX is commonly used in conjunction with oscillators like RSI or moving averages, to confirm the trend strength and avoid false signals.
█ METHOD VARIANTS
This script applies the standard approach for calculating the ADX, but could be adapted with the following variants:
Different Timeframes: The script could be modified to calculate ADX values across higher or lower timeframes, depending on the trader's strategy.
Custom Thresholds: Instead of using the default 30 threshold, traders could adjust the horizontal line to suit their own risk tolerance or market conditions.
ADX with Alerts for Strong Trending ConditionsMad Props to Chat GPT. Basically, this thing lets you set alerts on the ADX being Above 20 AND the Positive or Negative Directional Movement Line being Above the ADX. Useful for being alerted when a strong trend is in place to look for the pullback.
Description
The ADX with Custom Alerts indicator is designed to assist traders in identifying trends and potential trading opportunities based on the Average Directional Index (ADX) and Directional Indicators (DI+ and DI-). This tool provides a clear visual representation of market strength and directional movement, enhancing decision-making in trading.
Features
ADX Calculation:
The ADX measures the strength of a trend, regardless of its direction. The indicator calculates the ADX using a configurable length and a smoothing parameter, allowing traders to customize it based on their trading preferences.
Directional Indicators:
DI+: Represents bullish momentum.
DI-: Represents bearish momentum.
The indicator plots both DI+ and DI- alongside the ADX to give a complete picture of market direction.
Alert Conditions:
The indicator includes custom alert conditions that notify traders when:
Condition 1: The ADX rises above the defined threshold (default set at 20) and DI+ is above the ADX, indicating potential bullish momentum.
Condition 2: The ADX rises above the defined threshold and DI- is above the ADX, indicating potential bearish momentum.
Visual Representation:
The ADX line is plotted in blue, with the DI+ line in green and the DI- line in red.
A dotted horizontal line represents the ADX threshold, providing a clear visual cue for trend strength.
Background Highlighting:
The indicator uses background coloring to enhance visual analysis:
Green shading indicates when DI+ is above the ADX, suggesting bullish conditions.
Red shading indicates when DI- is above the ADX, suggesting bearish conditions.
Customizable Parameters:
Traders can adjust the length of the ADX calculation, the smoothing factor, and the threshold level to suit their trading strategies and timeframes.
Usage
This indicator is particularly useful for traders looking to:
Identify strong trends and potential entry points based on trend strength.
Make informed decisions using alerts that signal important market conditions.
Enhance their trading strategies with clear visual cues and customizable parameters.
ADX with Donchian Channels
The "ADX with Donchian Channels" indicator combines the Average Directional Index (ADX) with Donchian Channels to provide traders with a powerful tool for identifying trends and potential breakouts.
Features:
Average Directional Index (ADX):
The ADX is used to quantify the strength of a trend. It helps traders determine whether a market is trending or ranging.
Adjustable parameters for ADX smoothing and DI length allow traders to fine-tune the sensitivity of the trend strength measurement.
Donchian Channels on ADX:
Donchian Channels are applied directly to the ADX values to highlight the highest high and lowest low of the ADX over a specified period.
The upper and lower Donchian Channels can signal potential trend breakouts when the ADX value moves outside these bounds.
The middle Donchian Channel provides a reference for the average trend strength.
Visualization:
The indicator plots the ADX line in red to clearly display the trend strength.
The upper and lower Donchian Channels are plotted in blue, with a green middle line to represent the average.
The area between the upper and lower Donchian Channels is filled with a blue shade to visually emphasize the range of ADX values.
Default Settings for Scalping:
Donchian Channel Length: 10
Standard Deviation Multiplier: 1.58
ADX Length: 2
ADX Smoothing Length: 2
These default settings are optimized for scalping, offering a quick response to changes in trend strength and potential breakout signals. However, traders can adjust these settings to suit different trading styles and market conditions.
How to Use:
Trend Strength Identification: Use the ADX line to identify the strength of the current trend. Higher ADX values indicate stronger trends.
Breakout Signals: Monitor the ADX value in relation to the Donchian Channels. A breakout above the upper channel or below the lower channel can signal a potential trend continuation or reversal.
Range Identification: The filled area between the Donchian Channels provides a visual representation of the ADX range, helping traders identify when the market is ranging or trending.
This indicator is designed to enhance your trading strategy by combining trend strength measurement with breakout signals, making it a versatile tool for various market conditions.
ADX and SADX, SDIThe indicator aims to analyze and visualize the Average Directional Index (ADX) and its smoothed versions, along with directional indicators (DI) to help traders identify trend strength and potential buy/sell signals.
Indicator Settings:
The indicator is named "ADX and SADX, SDI" and is set to display prices with a precision of 2 decimal places.
Users can customize the ADX smoothing length, DI length, ADX smoothing period, and DI smoothing period through input variables.
Directional Movement (DM) Calculation:
The function dirmov calculates the positive and negative directional movements (DM) and the smoothed values of the positive directional index (DI+) and negative directional index (DI-).
This is done using the average true range (ATR) to normalize the DM values.
Average Directional Index (ADX) Calculation:
The function adx calculates the ADX, which measures the strength of a trend.
It uses the DI+ and DI- values to compute the ADX value.
Smoothed ADX and DI Calculation:
The ADX values are further smoothed using a simple moving average (SMA).
The DI difference is also smoothed and used to determine the trend direction.
Buy and Sell Signals:
A buy signal is generated when the DI+ crosses above DI- and the smoothed DI difference is increasing.
A sell signal is generated when the DI- crosses above DI+ and the smoothed DI difference is decreasing.
Plotting:
The ADX, smoothed ADX, smoothed DI difference (SPM), DI+, and DI- values are plotted on the chart.
Horizontal lines are drawn to indicate threshold levels (e.g., level 22).
Background and bar colors change based on buy (lime) and sell (maroon) signals to visually indicate these conditions.
Purpose of the Code:
This Pine Script code is used to create a custom indicator on TradingView that helps traders identify the strength and direction of a trend. The Average Directional Index (ADX) is used to measure trend strength, while the Directional Indicators (DI+ and DI-) are used to determine the direction of the trend. The smoothed versions of these indicators (SADX and SDI) provide additional confirmation and smoothing to reduce noise and false signals. Traders can use the buy and sell signals generated by this indicator to make informed trading decisions based on the trend strength and direction.
Important Note:
This script is provided for educational purposes and does not constitute financial advice. Traders and investors should conduct their research and analysis before making any trading decisions.
ADX W. Wilders(DI+, DI-, DX, ADXR, Equilibrium Point)The reason for publishing the script was the lack of display of important components in the standard ADX indicator, such as DI+, DI-, DX , ADXR, and the absence of a choice of methods for calculating moving averages in the indicator.
According to the book by the author of the ADX indicator, W. Wilder, the indicator components were calculated using the SMA formula, however, the RMA moving average is used in the code of the built-in indicator in TradingView, which shows excellent results, but this is not a classic calculation method. In addition to SMA and RMA, there are also EMA , HMA , WMA , VWMA moving averages to choose from. Added the ability to display lines ADX , ADXR , DX , DI+, DI- and Equilibrium points (when DI+ and DI- are equal or intersect).
ADX Trading Rules
1. Trade the intersections of DI+ and DI-
2. Extreme Point Rule(EPR). EPR is formed when DI+, DI- (Equilibrium point) crosses, forming a trend reversal point at the extremum of the current bar. In the example on the ADX RMA chart, the DI- line is above DI+. Being in a short position at the reverse intersection of the DI- and DI + lines, it is necessary to take the high price of the crossing bar for the reversal point, upon breakdown of which, turn to long. In this example, the breakdown did not take place and the short position remained active, despite the intersection of the DI+ lines over DI-. This rule is an excellent filter that removes unnecessary transactions in the trading system.
3. DI+ > ADX and DI- > ADX. Stop trading trend-following systems.
4. If ADXR > 25, the trading system will be profitable. With ADXR < 20, trend-following systems need to stop trading. Many mistakenly use ADX values instead of ADXR . The author explicitly pointed to ADXR in his book.
5. Equilibrium Point - balance points. The accumulation of these points on the chart means the presence of a flat in the market. Accumulation often appears on a declining ADX after a top has been established on the ADX indicator. The smaller the distance between the points, the less significant movements occurred in the market.
6. For intraday trading of cryptocurrencies use can the following ADX settings:
DI Length = 100
ADX Smoothing = 14
MA Type = VWMA
Flat Zone = 30
P.S. Fragment from an interview with W. Wilder:
OH: You are probably best known for inventing the Relative Strength Index ( RSI ), Average Directional Index ( ADX ) and Average True Range (ATR). Which of these is the most powerful tool for a trader?
WW: The ADX .
OH: Is it the indicator you are most proud of?
WW: I guess so.