"Indicators" In the world of investing is a vital tool, indicators typically refer to technical chart patterns deriving from the price, volume, or open interest of a given security.
- Building a indicator with
mpf.addplot()
method - Inbuilt Indicator Method (Upcoming Feature)
- The
mpf.addplot()
Method is easy to use and requires little or no knowledge of matplotlib, and no need to import matplotlib. - The
mpf.addplot()
withmpf.make_addplot
handles 95% of the most common types of indicators and market studies. - The
mpf.make_addplot
method attains its simplicity, in part, by having certain limitations.
These limitations are:- Large code required for complex indicators.
- Larger calculation required.
- Legend box support Limited.
- The Inbuilt method is adequate for any kind of complex indicator:
- Complex indicators can be handled.
- Legend box fully supported
- With one or more studies/indicators, such as:
- Ichimoku Cloud, MACD, DMI, RSI, Bollinger, Accumulation/Distribution Oscillator, Commodity Channel Index, Etc.
- See here for a tutorial and details on implementing the mplfinance for addplot method.
- The Alphatrend Indicator
- For Building Alphatrend Indicator with
make_addplot
. This method helps plot two lines, named k1 and k2. The area between two lines is filled withfill_between
method. For color conditional formatting we use thewhere
. - Details on how to implement Alphatrend Indicator Over are described below.
(code examples can be found in the examples/indicators/)
- For Building Alphatrend Indicator with
- Awesome Oscillator
- Use method
make_addplot
method Awesome Oscillator Build as Histogram Bar type of plotbar
in a new panel withpanel
method - Details on how to implement Awesome Oscillator is described below.
(code examples can be found in the examples/indicators/)
- Use method
- Dochian Channel
- For Building Dochian Channel with
make_addplot
. This method helps plot three lines in this indicator, named upper, middle, and lower bands. The area between the upper and lower band is filled withfill_between
method. - Details on how to implement Dochian Channel Over are described below.
(code examples can be found in the examples/indicators/)
- For Building Dochian Channel with
- Golden Cross Over
- For Building Golden Cross with
make_addplot
we use two moving averages named short-term moving averages and long-term moving averages. When One Line Cross another that point is marked withmarker
with typescatter
. while to change the color of the long-term moving average we use a custom function. - Details on how to implement Golden Cross Over are described below.
(code examples can be found in the examples/indicators/)
- For Building Golden Cross with
- Ichimoku Cloud
- For Building Ichimoku Cloud with
make_addplot
. The following method helps to plot Five lines used in this indicator, named Tenkan-sen, Kijun-sen, Senkou_Span_A, Senkou_Span_B, Chikou_Span. The area between the Senkou_Span_A and Senkou_Span_B is filled withfill_between
method. - Details on how to implement Ichimoku Cloud are described below.
(code examples can be found in the examples/indicators/)
- For Building Ichimoku Cloud with
- MACD
- Use method
make_addplot
MACD is built as Histogram Bar type of plotbar
in a new panel withpanel
method - Details on how to implement MACD are described below.
(code examples can be found in the examples/indicators/)
- Use method
- MACD Histogram
- Use method
make_addplot
MACD with Histogram is built as Histogram Bar type of plotbar
in a new panel withpanel
method. For Generating a color list for the histogram we use the custom function. - Details on how to implement MACD Histogram are described below.
(code examples can be found in the examples/indicators/)
- Use method
- Relative Strength Index
- Use methods
make_addplot
andpanel
were used to plot rsi - Details on how to implement Relative Strength Index are described below.
(code examples can be found in the examples/indicators/)
- Use methods
- Parabolic SAR
- For Building Parabolic SAR with
make_addplot
. This method helps plot two lines in this indicator, named upper and lower bands. The custom function is used to segregate uptrend and down-trending areas. Which later plot with typescatter
- Details on how to implement Parabolic SAR are described below.
(code examples can be found in the examples/indicators/)
- For Building Parabolic SAR with
- Supertrend
- For Building Supertrend with
make_addplot
. This method helps plot three lines in this indicator, named upper, trendline, and lower bands. when the price is above the trendline area marked uptrend and downtrend with a custom function, The area between the upper band and high of the candle is filled withfill_between
method. - Details on how to implement Supertrend described below.
(code examples can be found in the examples/indicators/)
- For Building Supertrend with