Skip to content

compute +DM and -DM #4

Description

@wellzero

found many reference compute +-DM like following

    dm_pos = pd.DataFrame(np.where(high_chg > **0**, high_chg, 0), index=self.df.index, columns=['dm_pos'])
    dm_neg = pd.DataFrame(np.where(low_chg > **0**, low_chg, 0), index=self.df.index, columns=['dm_neg'])        

following is our repo code, want to know why is different with upper

compute +DM and -DM

    dm_pos = pd.DataFrame(np.where(high_chg > **low_chg**, high_chg, 0), index=self.df.index, columns=['dm_pos'])
    dm_neg = pd.DataFrame(np.where(low_chg > **high_chg**, low_chg, 0), index=self.df.index, columns=['dm_neg'])

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions