<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def average_directional_index(close_data, high_data, low_data, period):
 """ Average Directional Index. Formula: ADX = 100 * SMMA(abs((+DI - -DI) / (+DI + -DI))) """

    avg_di = (abs(
              (positive_directional_index(
                close_data, high_data, low_data, period) -
              negative_directional_index(
                close_data, high_data, low_data, period)) /
              (positive_directional_index(
                close_data, high_data, low_data, period) +
               negative_directional_index(
                close_data, high_data, low_data, period)))
              )
    adx = 100 * smma(avg_di, period)
    return adx