@@ -75,7 +75,7 @@ def _check_params(self, params):
75
75
76
76
def I (self , # noqa: E741, E743
77
77
func : Callable , * args ,
78
- name = None , plot = True , overlay = None , color = None , scatter = False ,
78
+ name = None , plot = True , overlay = None , color = None , scatter = False , histogram = False ,
79
79
** kwargs ) -> np .ndarray :
80
80
"""
81
81
Declare indicator. An indicator is just an array of values,
@@ -105,6 +105,10 @@ def I(self, # noqa: E741, E743
105
105
If `scatter` is `True`, the plotted indicator marker will be a
106
106
circle instead of a connected line segment (default).
107
107
108
+ If `histogram` is `True`, the indicator values will be plotted
109
+ as a histogram instead of line or circle. When `histogram` is
110
+ `True`, 'scatter' value will be ignored even if it's set.
111
+
108
112
Additional `*args` and `**kwargs` are passed to `func` and can
109
113
be used for parameters.
110
114
@@ -151,7 +155,7 @@ def init():
151
155
overlay = ((x < 1.4 ) & (x > .6 )).mean () > .6
152
156
153
157
value = _Indicator (value , name = name , plot = plot , overlay = overlay ,
154
- color = color , scatter = scatter ,
158
+ color = color , scatter = scatter , histogram = histogram ,
155
159
# _Indicator.s Series accessor uses this:
156
160
index = self .data .index )
157
161
self ._indicators .append (value )
0 commit comments