Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compute +DM and -DM #4

Open
wellzero opened this issue Nov 22, 2024 · 0 comments
Open

compute +DM and -DM #4

wellzero opened this issue Nov 22, 2024 · 0 comments

Comments

@wellzero
Copy link

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'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant