def accumulation_distribution(close_data, high_data, low_data, volume):
catch_errors.check_for_input_len_diff(<EOL>close_data, high_data, low_data, volume<EOL>)<EOL>ad = np.zeros(len(close_data))<EOL>for idx in range(<NUM_LIT:1>, len(close_data)):<EOL><INDENT>ad[idx] = (<EOL>(((close_data[idx] - low_data[idx]) -<EOL>(high_data[idx] - close_data[idx])) /<EOL>(high_data[idx] - low_data[idx]) *<EOL>volume[idx]) +<EOL>ad[idx-<NUM_LIT:1>]<EOL>)<EOL><DEDENT>return ad<EOL>
Accumulation/Distribution.

Formula:
A/D = (Ct - Lt) - (Ht - Ct) / (Ht - Lt) * Vt + A/Dt-1