Directional Index Macro Indicator

What is This For?
The default settings for this indicator are for BINANCE:BTCUSDT and intended to be used on the 3D timeframe to identify market trends. This indicator does a great job identifying whether the market is bullish , bearish , or consolidating. This can also work well on lower time frames to help identify when a trend is strong or when it's reversing.

Directional Index Rate of Change
Core to this indicator is the rate at which DI+ and DI- are moving away or towards each other. This is called The Rate of Change ( ROC ). "The ROC length dictates how many bars back you want to compare to the current bar to see how much it has changed. It is calculated like this:

(source - source/source) * 100"

The rate of change is smoothed using an EMA . A shorter EMA length will cause the ROC to flip back and forth between positive and negative while a larger EMA length will cause the ROC to change less often. Since the rate of change is used to indicate periods of 'consolidation', you want to find a setting that doesn't flip back and forth too often. Between the DI+ and DI- is a blue centerline. Offset from this centerline is a channel that is used to filter out false crosses of the DI+ and DI-. Sometimes, the DI+ and DI- lines will come together in this channel and cross momentarily before resuming the direction prior to the cross. When this happens, you don't want to flip your bias too soon. The wider the channel, the later the indicator will signal a DI reversal. A narrower channel will call it sooner but risks being more choppy and indicating a false cross.

Indicator Status Line
This indicator has 4 values in the status line (in order):
  • DI+
  • DI-
  • Distance between DI+ and DI-
  • DI Rate of Change (how quickly are DI+ and DI- moving away or towards center)

Indicator Plots
This indicator plots DI+ (green), DI- (red), and a center channel between DI- and DI+. Across the top of the indicator, red and green triangles indicate the market trend while the background changes to show whether the price is in an impulse wave or consolidating. This makes up 4 possible scenarios:
  • Bullish impulse wave (green triangle up + green background)
  • Bullish consolidation (green triangle up + yellow background)
  • Bearish impulse wave (red triangle down + red background)
  • Bearish consolidation (red triangle down + yellow background)

Combined with support and resistance levels, volume , and your other favorite indicators, this can be a useful tool for validating that your entries are not going against the trend.

This is not financial advice. Do not take trades only based on the DI+ and DI- crossing. Always use multiple indicators to validate your entries and never take a trade when you aren’t emotionally grounded. Have a plan. Stick to the plan.

The screenshot for this strategy is of a manual historical review of BTC on the 3 day chart. The indicator was built to try and mimic the chart above. You’ll see that it nails it sometimes, is a little late sometimes, and chops around between consolidation and impulse waves when it should stay in consolidation. Share your settings if you are able to improve the choppiness without sacrificing catching the reversals early.

Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?