Download MetaTrader 5
To add comments, please log in or register
Join MQL5 Cloud Network. Millions of traders are waiting for this!
Frédéric LEBRE
233
Frédéric LEBRE 2014.04.07 08:18 

Hi,

Please, could you help me ?


I can't change color, font size and font name label of my Hline by this way :


ObjectCreate("Plus Bas Jour",OBJ_HLINE,0,0,iLow(NULL,PERIOD_D1,0));

ObjectSetText("Plus Bas Jour","Plus Bas Jour",8,"Arial",indicator_color4);


Is it the good function ?

qjol
3243
qjol 2014.04.07 10:46  
HLine and Label are 2 different objects and can't have the same name ---> ("Plus Bas Jour")
Frédéric LEBRE
233
Frédéric LEBRE 2014.04.07 11:31  
Thanks for your answer but changing name doesn't solve my problem.
Keith Watford
Moderator
8000
Keith Watford 2014.04.07 11:34  
qjol:
HLine and Label are 2 different objects and can't have the same name ---> ("Plus Bas Jour")

The OP is not creating a label object, he/she is adding the text that will show when the cursor is placed on the line.
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.07 11:34  
ObjectCreate("Plus Bas Jour",OBJ_HLINE,0,0,iLow(NULL,PERIOD_D1,0));

ObjectSetText("Plus Bas Jour","Plus Bas Jour",8,"Arial",indicator_color4);
You actually don't create enough object properties. You need to learn more about object creation.
qjol
3243
qjol 2014.04.07 11:45  
can you please attach the image to show exactly what you are trying to accomplish
euclid
34
euclid 2014.04.07 12:05  

He is asking how to change the font of the object description for a horizontal line.

And the answer is: You can't change it.

Frédéric LEBRE
233
Frédéric LEBRE 2014.04.07 13:22  

Yes, i wanted to increase font label description of a Hline.

Thanks a lot for all your answers, i hope one day i'll be able to help you as you do.

Have a good day and sorry for my english, i'm french.

Alain Verleyen
Moderator
28672
Alain Verleyen 2014.04.07 15:21  
06710671f:

Yes, i wanted to increase font label description of a Hline.

Thanks a lot for all your answers, i hope one day i'll be able to help you as you do.

Have a good day and sorry for my english, i'm french.

You can add a description to an HLine, but you can't change his font, color and size.

What you can do is to use 2 objects, one HLine and one Label, and associate this label with your HLine. The font, color and size of a label can be changed.

Frédéric LEBRE
233
Frédéric LEBRE 2014.04.08 08:53  

Thanks a lot, it woks.


Bye.

/
To add comments, please log in or register