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

profit_taken does not seem to be correct! #303

Open
iazdan opened this issue Jul 19, 2023 · 0 comments
Open

profit_taken does not seem to be correct! #303

iazdan opened this issue Jul 19, 2023 · 0 comments
Labels
discussion Code understanding good first issue Good for newcomers

Comments

@iazdan
Copy link

iazdan commented Jul 19, 2023

What is the rational behind this formula to calculate the profit? Something does not seem right!W
Why would action be a decimal number if the action space = {0, 1, 2}?

if action is either 0, 1, or 2 then _profit_takens is always equal to self.cf.symbol(self.assets[i], "stop_loss_max"), otherwise if action is decimal then _profit_takens is equal to self.cf.symbol(self.assets[i], "profit_taken_max")) + self.cf.symbol(self.assets[i], "stop_loss_max")

_profit_taken = math.ceil((x - _action) * self.cf.symbol(self.assets[i], "profit_taken_max")) + self.cf.symbol(self.assets[i], "stop_loss_max")

@YangletLiu YangletLiu added good first issue Good for newcomers discussion Code understanding labels Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Code understanding good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants