def vertical_horizontal_filter(data, period):
catch_errors.check_for_period_error(data, period)<EOL>vhf = [abs(np.max(data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>]) -<EOL>np.min(data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>])) /<EOL>sum([abs(data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>][i] - data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>][i-<NUM_LIT:1>]) for i in range(<NUM_LIT:0>, len(data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>]))]) for idx in range(period - <NUM_LIT:1>, len(data))]<EOL>vhf = fill_for_noncomputable_vals(data, vhf)<EOL>return vhf<EOL>
Vertical Horizontal Filter.

Formula:
ABS(pHIGH - pLOW) / SUM(ABS(Pi - Pi-1))