This is the fourth video in the series about how to build an indicator. In the first three videos, we built and tested a MACD indicator. In this video, we'll build a plotter to create the graphical representation of the data over the charts.
Let's get on with it!
I'll add a plotter, label it, and customize the configuration.
Now, I'll do the same with the plotter module. The parameter ICON refers to the icon used on the layer manager to visually indicate what type of indicator the layer represents. I'll choose histogram. You may choose anything you like, and even create your own icons. Please, find the details in the documentation.
The most important underlying concept in building a plotter is that of points and their relationship with vertices in the polygons that make up the graphics. I'll briefly explain, and if you need any clarification, please refer to the docs.
The core idea of a plotter is the identification of specific points in the chart that describe the data points you wish to render on-screen. The charts are two-dimensional coordinate systems. The X-axis represents time, and the Y-axis represents the rate.
So, to define a point, we will need to specify a value for the X-axis and a value for the Y-axis of each point. What points? Well, the ones we wish to draw over the charts. In the case of the MACD indicator, we will want to represent the MACD line, the SIGNAL line, and the histogram.
The second most important concept is that the plotter produces a graphic representation for each record in the dataset, and for the period of time represented by the record.
This means that the polygons you define to produce drawings must be defined within the span of time represented by one record. For example, if you wish to draw a line… let's say… a moving average… you will need to define two points: the first is the rate of the moving average at the time the candle opens, and the second is the rate at the time the candle closes.
This video was created with tools provided by:
OBS Studio: https://obsproject.com/
Keyboard overlay: https://github.com/univrsal/input-overlay