How to add indicator signals to the bottom of the chart?

 

Hello everyone,

I am trying to figure out how to add indicator signals to the bottom of a chart, like it's done here:

Indicators in this example are MTF and only output red and green boxes.

Example


Can this be done manually in the MQL5 UI or via code?

 
The function you're looking for is this:

#property indicator_separate_window
indicator buffers need to be created and given values accordingly
 

Thanks for your response. However, my question was more related to the format of the indicator output.

As you can see at the very bottom of the image above, the output of the last 2 indicators is simply a red/green box per bar according to the corresponding boolean value.

This kind of output doesn't match any of the DrawStyles in the docs (https://www.mql5.com/en/docs/constants/indicatorconstants/drawstyles)


I have seen this kind of plot in several EAs, however I have no idea how it is built. Maybe it's using some custom class?

Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
  • www.mql5.com
Drawing Styles - Indicator Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Emerson Gomes #: Thanks for your response. However, my question was more related to the format of the indicator output. As you can see at the very bottom of the image above, the output of the last 2 indicators is simply a red/green box per bar according to the corresponding boolean value. This kind of output doesn't match any of the DrawStyles in the docs (https://www.mql5.com/en/docs/constants/indicatorconstants/drawstyles). I have seen this kind of plot in several EAs, however I have no idea how it is built. Maybe it's using some custom class?
They are of the DRAW_HISTOGRAM drawing style, but if you want other shapes, you could also use DRAW_ARROW.
Reason: