def positive_directional_movement(high_data, low_data):
catch_errors.check_for_input_len_diff(high_data, low_data)<EOL>up_moves = calculate_up_moves(high_data)<EOL>down_moves = calculate_down_moves(low_data)<EOL>pdm = []<EOL>for idx in range(<NUM_LIT:0>, len(up_moves)):<EOL><INDENT>if up_moves[idx] > down_moves[idx] and up_moves[idx] > <NUM_LIT:0>:<EOL><INDENT>pdm.append(up_moves[idx])<EOL><DEDENT>else:<EOL><INDENT>pdm.append(<NUM_LIT:0>)<EOL><DEDENT><DEDENT>return pdm<EOL>
Positive Directional Movement (+DM).

Formula:
+DM: if UPMOVE > DWNMOVE and UPMOVE > 0 then +DM = UPMOVE else +DM = 0