Skip to content

plot ¤

IndicatorPlotter ¤

IndicatorPlotter(
    dataframe: DataFrame,
    plotter: Callable,
    filter: Callable | Series | None = None,
    push: bool = True,
    **kwargs
)

Add indicator plotter to DataFrame

Source code in lettrade/indicator/plot.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
def __init__(
    self,
    dataframe: pd.DataFrame,
    plotter: Callable,
    filter: Callable | pd.Series | None = None,
    push: bool = True,
    **kwargs,
) -> None:
    # self.dataframe: pd.DataFrame = dataframe
    self.plotter: Callable = plotter
    self.filter: Callable | pd.Series | None = filter
    self.kwargs = kwargs

    if push:
        indicator_push_plotter(dataframe=dataframe, ip=self)