Craig_Claussen

Strategy - DMI Indicator with DPO Indicator as a Guard

The Directional Movement Index Indicator is one of my favorite indicators in tradingview's built-in library. It is free to use for all
For more information on what the DMI is, please visit: www.tradingview.com/...directionalmovement/
The only problem I've come across with the DMI is that when it hits a 'trade range zone' it triggers false new trends (this is the case with almost every indicator I've ever tested).

This script modifies the DMI by removing the need for the ADX logic. It only focuses on the +DI and the -DI.
In order to remove the 'noise' generated during a trade range zone I have added another powerful indicator called the Detrended Price Oscillator.
The DPO is also a 'built-in' indicator on tradingview. www.tradingview.com/...ndedpriceoscillator/
The DPO is used in conjunction with the DMI to stop trade ranges from wrecking your profits.

This strategy logic simply checks for the DMI indicator to cross itself. If the +DI crosses over the -DI this is a bullish cross and visa versa, if the -DI crosses over the +DI then it could mean bearish sentiment is building.
But then strategy logic uses the DPO to check if the DPO is above 0 or below 0 value

If the +DI crosses over the -DI and the DPO is above 0 value, then it's a Long entry point.
However, if the +DI crosses over the -DI and the DPO is below 0 value, then the Long signal is void.
And visa versa, if the -DI crosses over the +DI and the DPO is below 0 value, then it's a Short entry point (unless the DPO is greater than 0)
With this DPO 'guard' in place, it helps us keep the total trades executed to a minimum.
This is vital to push through trade ranges that can wreck your profit potential.

I wish I could create a better plotting mechanism for this indicator so you can better see the visuals. But combining the DMI to scale with the DPO is not possible.
The best solution is to simply add another DMI indicator to your chart so you can compare the DMI to this script that is dominated by the DPO (yellow line).

Enjoy! Likes are much appreciated!








Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?