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

[Bug] TA/multi - unclear what --period affects when multiple functions are selected. #4522

Closed
deeleeramone opened this issue Mar 17, 2023 · 4 comments
Assignees
Labels
bug Fix bug

Comments

@deeleeramone
Copy link
Contributor

The Multi function does not have the ability to set parameters for each indicator, and it is unclear what --period even means where it comes to indicators having multiple parameters. Does it change anything if multi --indicators macd --period 10? The MACD function does not even contain a parameter for period. Unclear how this functionality works.

The loaded ticker is: /stocks/load/ubs

The top chart is: multi --indicators clenow,ema --period 10
The bottom chart is: clenow --period 10

image

@deeleeramone deeleeramone added the bug Fix bug label Mar 17, 2023
@IgorWounds IgorWounds self-assigned this Mar 21, 2023
@IgorWounds
Copy link
Contributor

Hi @deeleeramone ,

Thanks for raising this!

The --period is the size of the rolling window that an indicator should use. By default, the rolling window/period is set automatically (window = [20, 50]) if it is not explicitly passed by the user.

The user can also pass multiple periods --period 10,30 that will be picked up by all indicators that support different rolling window sizes and will be displayed.

For example, If I do multi --indicators sma,ema --period 10,30 I get the following:

Screenshot 2023-03-21 at 15 35 07

It seems that some indicators don't complain when you pass a period that isn't used and this might be something that we want to be explicit about. Currently, the code sets the window size for all Plotly indicators that support the length parameter natively. I'm thinking of stating inside the terminal which of the passed indicators don't support the --period flag once the command has been executed.

@deeleeramone
Copy link
Contributor Author

PR #4467 addresses some of this, so I would advise looking at it to avoid any duplication. :)

@IgorWounds
Copy link
Contributor

From what I see, the explicit message wasn't added inside that PR.

@IgorWounds
Copy link
Contributor

The period flag has been removed inside the #4467 PR and I'll close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug
Projects
None yet
Development

No branches or pull requests

2 participants