-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow setting legend names when multiple series values are used in an Indicator #382
Labels
Comments
zlpatel
changed the title
Need a way to specify meaningful legend names when multiple series values are used in a single Indicator
Allow setting legend names when multiple series values are used in a single Indicator
Jun 15, 2021
zlpatel
changed the title
Allow setting legend names when multiple series values are used in a single Indicator
Allow setting legend names when multiple series values are used in an Indicator
Jun 15, 2021
zlpatel
added a commit
to zlpatel/backtesting.py
that referenced
this issue
Jun 15, 2021
zlpatel
added a commit
to zlpatel/backtesting.py
that referenced
this issue
Jun 16, 2021
zlpatel
added a commit
to zlpatel/backtesting.py
that referenced
this issue
Jun 16, 2021
zlpatel
added a commit
to zlpatel/backtesting.py
that referenced
this issue
Jun 16, 2021
zlpatel
added a commit
to zlpatel/backtesting.py
that referenced
this issue
Jun 16, 2021
zlpatel
added a commit
to zlpatel/backtesting.py
that referenced
this issue
Jun 16, 2021
zlpatel
added a commit
to zlpatel/backtesting.py
that referenced
this issue
Jun 16, 2021
@kernc could you mark this as an enhancement? |
ivaigult
added a commit
to ivaigult/backtesting.py
that referenced
this issue
May 8, 2023
Previously we only allowed one name per vector indicators: def _my_indicator(open, close): return tuple( _my_indicator_one(open, close), _my_indicator_two(open, close), ) self.I( _my_indicator, # One name is used to describe two values name="My Indicator", self.data.Open, self.data.Close ) Now, the user can supply two (or more) names to annotate each value individually. The names will be shown in the plot legend. The following is now valid: self.I( _my_indicator, # One name is used to describe two values name=["My Indicator One", "My Indicator Two"], self.data.Open, self.data.Close )
ivaigult
added a commit
to ivaigult/backtesting.py
that referenced
this issue
May 8, 2023
Previously we only allowed one name per vector indicator: def _my_indicator(open, close): return tuple( _my_indicator_one(open, close), _my_indicator_two(open, close), ) self.I( _my_indicator, # One name is used to describe two values name="My Indicator", self.data.Open, self.data.Close ) Now, the user can supply two (or more) names to annotate each value individually. The names will be shown in the plot legend. The following is now valid: self.I( _my_indicator, # One name is used to describe two values name=["My Indicator One", "My Indicator Two"], self.data.Open, self.data.Close )
ivaigult
added a commit
to ivaigult/backtesting.py
that referenced
this issue
May 9, 2023
Previously we only allowed one name per vector indicator: def _my_indicator(open, close): return tuple( _my_indicator_one(open, close), _my_indicator_two(open, close), ) self.I( _my_indicator, # One name is used to describe two values name="My Indicator", self.data.Open, self.data.Close ) Now, the user can supply two (or more) names to annotate each value individually. The names will be shown in the plot legend. The following is now valid: self.I( _my_indicator, # Two names can now be passed name=["My Indicator One", "My Indicator Two"], self.data.Open, self.data.Close ) Co-authored-by: kernc <[email protected]>
ivaigult
added a commit
to ivaigult/backtesting.py
that referenced
this issue
May 13, 2023
Previously we only allowed one name per vector indicator: def _my_indicator(open, close): return tuple( _my_indicator_one(open, close), _my_indicator_two(open, close), ) self.I( _my_indicator, # One name is used to describe two values name="My Indicator", self.data.Open, self.data.Close ) Now, the user can supply two (or more) names to annotate each value individually. The names will be shown in the plot legend. The following is now valid: self.I( _my_indicator, # Two names can now be passed name=["My Indicator One", "My Indicator Two"], self.data.Open, self.data.Close ) Co-authored-by: kernc <[email protected]>
ivaigult
added a commit
to ivaigult/backtesting.py
that referenced
this issue
May 14, 2023
Previously we only allowed one name per vector indicator: def _my_indicator(open, close): return tuple( _my_indicator_one(open, close), _my_indicator_two(open, close), ) self.I( _my_indicator, # One name is used to describe two values name="My Indicator", self.data.Open, self.data.Close ) Now, the user can supply two (or more) names to annotate each value individually. The names will be shown in the plot legend. The following is now valid: self.I( _my_indicator, # Two names can now be passed name=["My Indicator One", "My Indicator Two"], self.data.Open, self.data.Close ) Co-authored-by: kernc <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Expected Behavior
There should be a way to specify meaningful legend names when multiple series values are used in a single Indicator
Actual Behavior
Currently, you can only specify single name for Indicator. But there are cases where you need to plot multiple data series in a single Indicator and it's important to label them for easy identification.
Currently, There's an option to specify list of colors (one for each data series). I think if we allow passing list of legend names (as a separate parameter) that would be great.
Additional info
The text was updated successfully, but these errors were encountered: