MT5 Mini Chart

 

Hey Folks, 

 is it possible, to set the mini charts, which you can insert from menu: paste/objects/graphic/diagram... To set an automatic symbol?  the problem is, if I wants to put in my main chart (dow Jones), 3 mini charts from the menu, also  the symbol dow Jones in three different time frames (M15, H1, D1) I must choice that in the object settings of the mini chart. For a first time and main setup, ok. But if I save the template now, and go to my next open chart window, EUR/USD and wants to select the saved template with the three mini charts, he put it in but not in the current symbol, rather like in my first chart, with dow Jones, it takes over the template, but not the symbols and shows the symbol like I saved the template (DJ). 


Maybe some one have a idea how can I change the symbol automatic? I´m not a programmer crack, i hope there is a way for easy  use ;)

I hope it's understandable something. 

Greets

 
systematic:

Hey Folks, 

 is it possible, to set the mini charts, which you can insert from menu: paste/objects/graphic/diagram... To set an automatic symbol?  the problem is, if I wants to put in my main chart (dow Jones), 3 mini charts from the menu, also  the symbol dow Jones in three different time frames (M15, H1, D1) I must choice that in the object settings of the mini chart. For a first time and main setup, ok. But if I save the template now, and go to my next open chart window, EUR/USD and wants to select the saved template with the three mini charts, he put it in but not in the current symbol, rather like in my first chart, with dow Jones, it takes over the template, but not the symbols and shows the symbol like I saved the template (DJ). 


Maybe some one have a idea how can I change the symbol automatic? I´m not a programmer crack, i hope there is a way for easy  use ;)

I hope it's understandable something. 

Greets

Please use the searchfunction right hand above, i done this and had some Matches.

https://www.mql5.com/en/search#!keyword=mini%20chart

Search - MQL5.community
Search - MQL5.community
  • www.mql5.com
Searching is based on morphology and is insensitive to case. All letters, no matter of their case, will be processed as lowercase. By default, our search engine shows pages, that...
 
Michael Stoetzner:

Hey Folks, 

 is it possible, to set the mini charts, which you can insert from menu: paste/objects/graphic/diagram... To set an automatic symbol?  the problem is, if I wants to put in my main chart (dow Jones), 3 mini charts from the menu, also  the symbol dow Jones in three different time frames (M15, H1, D1) I must choice that in the object settings of the mini chart. For a first time and main setup, ok. But if I save the template now, and go to my next open chart window, EUR/USD and wants to select the saved template with the three mini charts, he put it in but not in the current symbol, rather like in my first chart, with dow Jones, it takes over the template, but not the symbols and shows the symbol like I saved the template (DJ). 


Maybe some one have a idea how can I change the symbol automatic? I´m not a programmer crack, i hope there is a way for easy  use ;)

I hope it's understandable something. 

Greets

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   string chartName=ObjectName(0,0,0,OBJ_CHART);
   string miniChartSymbol=ObjectGetString(0,chartName,OBJPROP_SYMBOL);
   if(miniChartSymbol!=_Symbol) ObjectSetString(0,chartName,OBJPROP_SYMBOL,_Symbol);

   return(rates_total);
  }

Hi,@Michael Stoetzner

I write the code by myself afert fail to get the good result from the search function.

You can also find the code file attached. Just load the indicator in your chart, the mini-chart object will  switch automaticly when the price changed (no response when the market is closed).

The code can only work with 1 minichart, you have to update it for >2 minicharts on your own.

Files:
MiniChart.mq5  4 kb
Reason: