Download MetaTrader 5
To add comments, please log in or register
Do you have a trading signal? Publish it in your blog as well!
Automated-Trading 2011.06.14 12:41 


Do you want to place a Chart objects (OBJ_CHART) on the chart and use it as conventional chart? It's possible.

This Expert Advisor is a demo of working with OBJ_CHART objects as conventional charts. You can set custom color settings, attach indicators etc. The only thing you need is the handle of OBJ_CHART object. Using the Chart Operations you may add and delete indicators (ChartIndicatorAdd() and ChartIndicatorDelete()), set chart Period, Symbol etc.

The EA_OBJPROP_CHART_ID Expert Advisor, does the following actions:

  • Adds a PriceChannel indicator, included in the standard package of the client terminal (located in terminal_data_folder\MQL5\Indicators\Examples);
  • Creates a subwindow using Subwindow indicator (copy Subwindow.mq5 to terminal_data_folder\MQL5\Indicators);
  • Creates an object (in the subwindow) of OBJ_CHART type with chart symbol, but D1 and H4 timeframes;
  • For each object of OBJ_CHART type it adds a Price_Channel indicator with default parameters and changes background color.


Author: MetaQuotes

Brett Luedtke
Brett Luedtke 2011.06.21 20:24  
Thanks. This was just next up on my list for testing, glad to see this functionality has already been completed and displayed here; I can see a number of nifty uses for this functionality.
To add comments, please log in or register