Download MetaTrader 5
To add comments, please log in or register
Let your idle PCs do something useful. Join MQL5 Cloud Network!
tbfa
7
tbfa 2016.03.07 11:46 

Hi,

I want to draw multiple letters above the chart. The problem is that the letters I am currently drawing are relative to window, not to chart. How can I change that?

This is my code : 

   for(int i=0; i < limit; i++) {    

      ... 

      string name = "symbol" + i;

      ObjectCreate(name, OBJ_LABEL, 0, 0, 0, 0, 0);

      ObjectSetText(name, "H", 10, "Times New Roman", Green);

      ObjectSet(name, OBJPROP_COLOR, Red);

      ObjectSet(name, OBJPROP_XDISTANCE, 100 + i * 10); 

      ... 

 } 

whroeder1
13644
whroeder1 2016.03.07 15:24  
tbfa: relative to window, not to chart.
  1. Label objects are relative to the window.
  2. Text objects are relative to a candle.
tbfa
7
tbfa 2016.03.07 19:03  
It works, thanks!
/
To add comments, please log in or register