@@ -75,7 +75,7 @@ def _check_params(self, params):
7575
7676 def I (self , # noqa: E741, E743
7777 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 ,
7979 ** kwargs ) -> np .ndarray :
8080 """
8181 Declare indicator. An indicator is just an array of values,
@@ -105,6 +105,10 @@ def I(self, # noqa: E741, E743
105105 If `scatter` is `True`, the plotted indicator marker will be a
106106 circle instead of a connected line segment (default).
107107
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+
108112 Additional `*args` and `**kwargs` are passed to `func` and can
109113 be used for parameters.
110114
@@ -151,7 +155,7 @@ def init():
151155 overlay = ((x < 1.4 ) & (x > .6 )).mean () > .6
152156
153157 value = _Indicator (value , name = name , plot = plot , overlay = overlay ,
154- color = color , scatter = scatter ,
158+ color = color , scatter = scatter , histogram = histogram ,
155159 # _Indicator.s Series accessor uses this:
156160 index = self .data .index )
157161 self ._indicators .append (value )
0 commit comments