Average Directional Index ProThe Average Directional Index (ADX) is a moving average of a range, usually 14 days, that's used to quantify the strength and direction of a trend. ADX values are significant in that lower values indicate a weak to non-existent trend, i.e. ADX=14, whereas an ADX=40 is indicative of a strong trend. Additionally, a weak trend could signal that price has entered in to a consolidation phase. A trader could wait for price to rise or fall out of a supply zone while simultaneously looking for ADX values to climb up and over the 25 level, since the ADX could be strong enough for price to trend after the breakout. As a result, this type of setup could be an excellent entry for a trade. Keep in mind that price is the signal most important value on a chart so it's important to use an indicator like this to confirm a particular bias that you may have.
💥💥💥💥💥
Instead of using a single line as most ADX indicators do, I thought that showing the values in terms of histogram bars would be highly intuitive and provide an interesting visual that would illustrate with varying degrees of color where the strength (or lack thereof) lies at any given time. The following are some of the characteristics that I feel make this script stand out from the pack.
💡Histogram plots. ADX values range from 0-100 and it may seem counterintuitive to see an ADX value below a 0 line. With this approach, I've divided up the ADX values between "bull" and "bear", meaning if an ADX histogram bar is above the 0 line (no matter if the value is 5 or 50), it's because the DMI+ value is ABOVE the DMI- value. Conversely, if the ADX histogram bar is below the 0 line, it's because the DMI- value is ABOVE the DMI+ value. DMI and ADX go hand-in-hand and while DMI values do not play a prominent role here, you'll see their values in the Main Label.
💡Main label. The main label's color will correspond to that of the histogram bar. The DMI and ADX values are listed along with the current price of the asset. Whichever DMI value is higher will be listed ahead of the lower value. In other words, from left to right, you'll see the ADX value followed by the higher of the 2 DMI values followed by the lesser of the 2 DMI values. The ADX value will be followed by an icon showing you if the value is rising or falling. Additionally, the main label has some extras: both buy/sell % on the current chart as well as daily chart along with total volume and average volume for the respective time frames. You can also change the MA lengths for the chart and daily TF averages. Both buy/sell % and total/avg volume values come with their own significant values inputs.
💡Color coded histogram bars dependent on ADX values. A few examples: an ADX value between 30 and 40 when DI+ > DI-, you'll see a dark green bar. Conversely, if the ADX value is > 70 and DI- > DI+, you'll get a dark purple bar. All in all, there's 18 possible colors denoted within the histogram.
💡Momentum arrows. There's 4 colors for the up/down arrows that populate above the histogram bar when DI+ and DI- combined with ADX values are showing extreme values. An example would be when DI+ is between 30 and 50 and ADX is greater than 30, you'll get a green arrow. On the flipside, when DI- is greater than -50 and ADX is greater than 40, you'll see a dark red arrow.
💡ADX and price shown on the histogram. You can choose to have the price and ADX values side by side or on top of one another as well as change the decimal value with a "significant figure" input. You can also opt to have neither value shown. The values will show above or below their respective bar dependent upon if DMI+ or DMI- is the dominant value, which in turn determines if the histogram is above or below the 0 line.
💡Weak trend colors. Any ADX values between 0 to 23 will give varying degrees of black to light gray indicating a weak or no trend. An ADX value of 17 could indicate a weak trend but the value could be rising as buyers push price higher. As the ADX approaches 25, wait for price confirmation (and volume) to validate if momentum could continue.
💡Threshold lines. ADX values above +/- 25-30 tend to show a strengthening of trend and you can choose to include these lines or not in your charts.
💡ADX value follow line. Determined by DMI+ being > or < than DMI-. For instance, if the trend changes and DMI- crosses over DMI+, the follow line will switch to follow the ADX histogram bar as it falls below 0. You can choose to enable/disable this line.
💡Colored bars. You can choose to enable the ADX color schemes to your candles further providing an easy view of the current trend.
💥💥💥💥💥
Remember to use any indicator together with price action to confirm a particular bias you may have! You could also use this indicator in confluence with my Directional Movement Pro script for an extra visual on trend direction and strength.
💥💥💥💥💥
Should you have any questions, feedback etc, please do not hesitate to contact the script's author. My hope is that this indicator becomes an invaluable resource to you and you're able to integrate it in to your everyday trading tool bag to make more informed decisions.
SimpleCryptoLife helped me code up this script and he's been an incredible source of knowledge in my trading journey. Without his patience and pine script expertise, this script would not have been possible!
Dmicrossover
RSI, SRSI, MACD and DMI cross - Open source codeHello,
I'm a passionate trader who has spent years studying technical analysis and exploring different trading strategies. Through my research, I've come to realize that certain indicators are essential tools for conducting accurate market analysis and identifying profitable trading opportunities. In particular, I've found that the RSI, SRSI, MACD cross, and Di cross indicators are crucial for my trading success.
Detailed explanation:
The RSI is a momentum indicator that measures the strength of price movements. It is calculated by comparing the average of gains and losses over a certain period of time. In this indicator, the RSI is calculated based on the close price with a length of 14 periods.
The Stochastic RSI is a combination of the Stochastic Oscillator and the RSI. It is used to identify overbought and oversold conditions of the market. In this indicator, the Stochastic RSI is calculated based on the RSI with a length of 14 periods.
The MACD is a trend-following momentum indicator that shows the relationship between two moving averages of prices. It consists of two lines, the MACD line and the signal line, which are used to generate buy and sell signals. In this indicator, the MACD is calculated based on the close price with fast and slow lengths of 12 and 26 periods, respectively, and a signal length of 9 periods.
The DMI is a trend-following indicator that measures the strength of directional movement in the market. It consists of three lines, the Positive Directional Indicator (+DI), the Negative Directional Indicator (-DI), and the Average Directional Index (ADX), which are used to generate buy and sell signals. In this indicator, the DMI is calculated with a length of 14 periods and an ADX smoothing of 14 periods.
The indicator generates buy signals when certain conditions are met for each of these indicators.
1) For the RSI, a buy signal is generated when the RSI is below or equal to 35 and the Stochastic RSI %K is below or equal to 15, or when the RSI is below or equal to 28 the Stochastic RSI %K is below or equal to 15 or when the RSI is below or equal to 25 and the Stochastic RSI %K is below or equal to 10 or when the RSI is below or equal to 28.
2) For the MACD, a buy signal is generated when the MACD line is below 0, there is a change in the histogram from negative to positive, the MACD line and histogram are negative in the previous period, and the current histogram value is greater than 0.
3) For the DMI, a buy signal is generated when the Positive Directional Indicator (+DI) crosses above the Negative Directional Indicator (-DI), and the -DI is less than the +DI.
The indicator generates sell signals when certain conditions are met for each of these indicators:
1) For the RSI, a sell signal is generated when the RSI is above or equal to 75 and the Stochastic RSI %K is above or equal to 85, or when the RSI is above or equal to 80 and the Stochastic RSI %K is above or equal to 85, or when the RSI is above or equal to 85 and the Stochastic RSI %K is above or equal to 90 or when the RSI is above or equal to 82.
2)For the MACD, a sell signal is generated when the MACD line is above 0, there is a change in the histogram from positive to negative, the MACD line and histogram are positive in the previous period, and the current histogram value is less than the previous histogram value. On the other hand, a buy signal is generated when the MACD line is below 0, there is a change in the histogram from negative to positive, the MACD line and histogram are negative in the previous period, and the current histogram value is greater than the previous histogram value.
3)For the DMI a bearish signal is generated when plusDI crosses above minusDI, indicating that bulls are losing strength and bears are taking control.
The indicator uses a combination of these four indicators to generate potential buy and sell signals. The buy signals are generated when RSI and SRSI values are in oversold conditions, while sell signals are generated when RSI and SRSI values are in overbought conditions. The indicator also uses MACD crossovers and DMI crossovers to generate additional buy and sell signals.
When a signal is strong?
The use of multiple signals within a specific timeframe can increase the accuracy and reliability of the signals generated by this indicator. It is recommended to look for at least two signals within a range of 5-8 candles in order to increase the probability of a successful trade.
Why it's original?
1) There is no indicator in the library that combine all of these indicators and give you a 360 view
2)The combination of the RSI, Stochastic RSI, MACD, and DMI indicators in a single script it's unique and not available in the libray.
3)The specific parameters and conditions used to calculate the signals may be unique and not found in other scripts or libraries.
4)The use of plotshape() to plot the signals as shapes on the chart may be unique compared to other scripts that simply plot lines or bars to indicate signals.
5)The use of alertcondition() to trigger alerts based on the signals may be unique compared to other scripts that do not have custom alert functionality.
Keep attention!
It is important to note that no trading indicator or strategy is foolproof, and there is always a risk of losses in trading. While this indicator may provide useful information for making conclusions, it should not be used as the sole basis for making trading decisions. Traders should always use proper risk management techniques and consider multiple factors when making trading decisions.
Support me:)
If you find this new indicator helpful in your trading analysis, I would greatly appreciate your support! Please consider giving it a like, leaving feedback, or sharing it with your trading network. Your engagement will not only help me improve this tool but will also help other traders discover it and benefit from its features. Thank you for your support!
DMI StrategyThis strategy is based on DMI indicator. It helps me to identify base or top of the script. I mostly use this script to trade in Nifty bank options, even when the signal comes in nifty . It can be used to trade in other scripts as well. Pivot points can also be used to take entry. Long entry is taken when DI+(11) goes below 10 and DI-(11) goes above 40 , whereas short entry is taken when DI-(11) goes below 10 and DI+(11) goes above 40.
For bank nifty , I take the trade in the strike price for which the current premium is nearby 300, with the SL of 20%. If premium goes below 10% I buy one more lot to average, but exit if the premium goes below 20% of the first entry. If the trade moves in the correct direction, we need to start trailing our stoploss or exit at the pre-defined target.
As this a strategy, there is one problem. While we are in the phase of "long", if again the "long" phase comes, it will not be shown on chart until a "short" phase has come, and vice versa. This has been resolved by creating an indicator instead of strategy with the name of "DMI Buy-sell on chart". Please go through that to get more entry points.
Please have a look at strategy tester to back test