Here's the code from my video LINK(insert link) to calculate the ADX value.
The dataset used is from https://school.stockcharts.com/doku.php?id=technical_indicators:average_directional_index_adx.
Feel free to use the code for anything you want, if you want to change which dataset you're using, just change the load parameter in line 5, and remember to make sure your high,low and close values fit the column headers in your data. Furthermore, make sure the date column is named correctly too.