I made an example to demonstrate this, see this chart :
MetaTrader Trading Platform Screenshots
MetaQuotes Software Corp., MetaTrader 5, Demo
Example of a mini chart (object) with an indicator added
I added a chart object named "MiniChart", then I run the following code :
//--- Get mini chart ID long miniChartID=ObjectGetInteger(0,"MiniChart",OBJPROP_CHART_ID); //--- Get inficator handle int maHandle=iMA("EURCHF",PERIOD_H1,12,0,MODE_SMA,PRICE_CLOSE); //--- Add indicator ro mini chart if(miniChartID>0 && maHandle!=INVALID_HANDLE) ChartIndicatorAdd(miniChartID,0,maHandle);
Sorry for such a noob question but how do you execute the above code?
I can add a new mini chart via the drop down menu's (Insert/Objects/Graphical/Chart)
But I dont understand how to run the code to get the indicator appear.
Thank you.
Sorry for such a noob question but how do you execute the above code?
I can add a new mini chart via the drop down menu's (Insert/Objects/Graphical/Chart)
But I dont understand how to run the code to get the indicator appear.
Thank you.
Create a new script for example and copy and paste this code inside OnStart() function.
I made an example to demonstrate this, see this chart :
I added a chart object named "MiniChart", then I run the following code :
Hi, I need to add this indicator in the chart how can I do ?... Idont need to se the candle grafic I just need the indicator
Can you help me please?
(indicator is two times in the same window but with diferent configuration)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I was wondering if it is possible to add indicators to the mini charts that are available in MT5. I Googled it and came up blank.
Pic below.
http://i.imgur.com/V8nKd5r.png