Discussion of article "Synchronizing several same-symbol charts on different timeframes"

 

New article Synchronizing several same-symbol charts on different timeframes has been published:

When making trading decisions, we often have to analyze charts on several timeframes. At the same time, these charts often contain graphical objects. Applying the same objects to all charts is inconvenient. In this article, I propose to automate cloning of objects to be displayed on charts.

The indicator operation can be divided into two blocks.

  1. When the indicator is launched, the open charts are sorted by the symbol. The presence of the indicator on the open charts of the corresponding symbol is checked. All objects on the current chart are cloned to the selected charts.
  2. Initialization block diagram

  3. Processing chart events. When creating or modifying a graphical object, the program reads a data on a modified object and passes it to all charts from the previously formed list.

Author: Dmitriy Gizlyk

 
I am looking to synchronize support and resistance levels on different timeframes, i.e. support added on one time frame appears on all the other timeframe charts
 
Tapani:
I am looking to synchronize support and resistance levels on different timeframes, i.e. support added on one time frame appears on all the other timeframe charts

Hello,
How you have added resistance levels on chart? Like horizontal line or rectangle box?

 

Is there a way to choose to clone only certain types of objects and ignore the rest? Also, how would I clone the objects visibility properties as well because it seems the the cloned objects visibility setting is not copied over and must be manually set again on the other charts.

Many thanks

 
yousurfer:

Is there a way to choose to clone only certain types of objects and ignore the rest? Also, how would I clone the objects visibility properties as well because it seems the the cloned objects visibility setting is not copied over and must be manually set again on the other charts.

Many thanks

Hello, yousurfer.
If you want select objects by some of property you can add it in this function

string CCopyObject::CreateMessage(long chart)
  {
   string result = NULL;
   int total = ObjectsTotal(chart, 0);
   for(int i=0;i<total;i++)
     {
      string name = ObjectName(chart, i, 0);
//
//    if(!( check object property to copy) )    // if you don't want to copy this object
//       continue;                              // go to next object
//
      switch((ENUM_OBJECT)ObjectGetInteger(chart,name,OBJPROP_TYPE))
        {
         case OBJ_HLINE:
           result+="{NAME="+name+"|TYPE="+IntegerToString(OBJ_HLINE)+"|"+HLineToString(chart, name)+"}";
           break;
         case OBJ_VLINE:
           result+="{NAME="+name+"|TYPE="+IntegerToString(OBJ_VLINE)+"|"+VLineToString(chart, name)+"}";
           break;
         case OBJ_TREND:
           result+="{NAME="+name+"|TYPE="+IntegerToString(OBJ_TREND)+"|"+TrendToString(chart, name)+"}";
           break;
         case OBJ_RECTANGLE:
           result+="{NAME="+name+"|TYPE="+IntegerToString(OBJ_RECTANGLE)+"|"+RectangleToString(chart, name)+"}";
           break;
        }
     }
   return result;
  }

Regards,
Dmitriy.

 
Hi, I would like to clone and synchronize only the arrowed line, is it possible?
 
Many thanks! very useful....
Reason: