String with horizontal lines

To add comments, please log in or register
Orhun.Alptugay
23
Orhun.Alptugay  

With the latest update, the strings set with ObjectSetString do not work any more with my horizontal lines.

Why?

Keith Watford
Moderator
20526
Keith Watford  
Orhun.Alptugay:

With the latest update, the strings set with ObjectSetString do not work any more with my horizontal lines.

Why?

Which build?

Orhun.Alptugay
23
Orhun.Alptugay  
Keith Watford:

Which build?


I don't know which build I was using previously, but it was not so older one. There was no problem with the strings appearing just above the horizontal lines.

I formatted my computer and now I have 1220.

Strings with horizontal lines are completely gone.

Alain Verleyen
38709
Alain Verleyen  
Orhun.Alptugay:


I don't know which build I was using previously, but it was not so older one. There was no problem with the strings appearing just above the horizontal lines.

I formatted my computer and now I have 1220.

Strings with horizontal lines are completely gone.

I don't have any problem with ObjectSetString().

Show your code.

Orhun.Alptugay
23
Orhun.Alptugay  
   In OnTick():
   ObjectCreate(0, "yatay_çizgi_30_pip_seviyesi", OBJ_HLINE, 0, 0, 0);
   ObjectSetInteger(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_STYLE, STYLE_DOT); 
   ObjectSetInteger(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_WIDTH, 1); 
   ObjectSetInteger(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_SELECTABLE, false);
   ObjectSetInteger(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_BACK, false);
   ObjectSetString(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_TOOLTIP, "\n");


   ObjectSetDouble(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_PRICE, trend_High - 0.003);
   ObjectSetInteger(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_COLOR, clrSteelBlue);
   ObjectSetString(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_TEXT, "30 pip çizgisi (% 1.2)");


Previously working code and I've never changed my code after formatting my PC and installing a fresh new MT4 1220.

Orhun.Alptugay
23
Orhun.Alptugay  

Lines are drawn without any problem, just the strings do not appear on the horizontal lines at left:

ObjectSetString(0, "yatay_çizgi_30_pip_seviyesi", OBJPROP_TEXT, "30 pip çizgisi (% 1.2)");
William Roeder
20233
William Roeder  
Orhun.Alptugay: Previously working code and I've never changed my code after formatting my PC and installing a fresh new MT4 1220.

HLines do not have text. Your code, as written, has never worked.

If you want to see text by hovering over your HLine, put it in the tooltip.

Orhun.Alptugay
23
Orhun.Alptugay  
William Roeder:

HLines do not have text. Your code, as written, has never worked.

If you want to see text by hovering over your HLine, put it in the tooltip.


I don't mean tooltips.

Previously, I can see the strings set by the above code on the horizontal lines at the left of the chart, not as a tooltip but as a constant text.

Orhun.Alptugay
23
Orhun.Alptugay  

Ok, found it.

Just turn on "show object descriptions" check box on the "common" tab of the chart properties window.

Thanks to all.

Orhun.Alptugay
23
Orhun.Alptugay  

And just injected it in my code:


ChartSetInteger(0, CHART_SHOW_OBJECT_DESCR, true);
To add comments, please log in or register