This script combines Moving Averages with ADX Strength, but with an added bonus. Rather than having the Moving Average line always plot on the chart, it will reference the ADX strength based on the settings by the trader.
This way, the Moving Average will not show on the chart unless there is also a strong direction in the trend. This may potentially be used to help with entries when trend trading due to adding the ADX for trend strength.
In the examples below, the ADX settings in the MA+ADX indicator are matched with the settings of a standalone ADX indicator at the bottom of the chart (not included, just for reference).