Custom Indicator that output dots and crosses

Q: My indicator outputs round dots and crosses. Where can I find a solution to implement this indicator?

A: These kinds of things written onto a MetaTrader chart are called “objects”.  MT defines many object types such as thumbs, arrows, dots, etc.

The best way to work with these kinds of indicators is to use the functions “fnGetObjectByType” or “fnGetObjectByName”. These are found in the Functions toolbox under the “Chart Objects” menu. (They are part of the Chart Object Plug-in)

Create a simple EA that uses these functions and writes the values to the chart (use the Message tab) to see how and when the custom indicator writes the objects. Once you understand that, you can use the info within the logic of your EA for opening/closing trades. 


Here is a link to a video showing how to configure a simple MT custom indicator. It’s an older version of VTS, but the configuration is exactly the same.