Help in code ADX strategy

Want to back-test a strategy in which I want to compare the current adx values with the previous adx value. Referring 3 min chart.

Please help me with the code.