Commit f795570
BUG: Allow multiple names for vector indicators (#382)
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 <kerncece@gmail.com>1 parent 0ce24d8 commit f795570
3 files changed
+72
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
541 | | - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
542 | 555 | | |
543 | | - | |
| 556 | + | |
544 | 557 | | |
545 | 558 | | |
546 | 559 | | |
| |||
550 | 563 | | |
551 | 564 | | |
552 | 565 | | |
553 | | - | |
| 566 | + | |
554 | 567 | | |
555 | 568 | | |
556 | 569 | | |
557 | 570 | | |
558 | 571 | | |
559 | | - | |
| 572 | + | |
560 | 573 | | |
561 | 574 | | |
562 | 575 | | |
563 | 576 | | |
564 | 577 | | |
565 | | - | |
| 578 | + | |
566 | 579 | | |
567 | 580 | | |
568 | 581 | | |
569 | 582 | | |
570 | | - | |
| 583 | + | |
571 | 584 | | |
572 | 585 | | |
573 | 586 | | |
| |||
578 | 591 | | |
579 | 592 | | |
580 | 593 | | |
581 | | - | |
| 594 | + | |
582 | 595 | | |
583 | | - | |
| 596 | + | |
584 | 597 | | |
585 | 598 | | |
586 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
122 | 132 | | |
123 | | - | |
124 | | - | |
| 133 | + | |
| 134 | + | |
125 | 135 | | |
126 | 136 | | |
127 | 137 | | |
| |||
139 | 149 | | |
140 | 150 | | |
141 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
142 | 157 | | |
143 | 158 | | |
144 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
758 | 789 | | |
759 | 790 | | |
760 | 791 | | |
| |||
0 commit comments