Skip to content

compute +DM and -DM #4

@wellzero

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'])

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