Download MetaTrader 5

Please, PB to change font size

To add comments, please log in or register
Frédéric LEBRE
380
Frédéric LEBRE  

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
3245
qjol  
HLine and Label are 2 different objects and can't have the same name ---> ("Plus Bas Jour")
Frédéric LEBRE
380
Frédéric LEBRE  
Thanks for your answer but changing name doesn't solve my problem.
Keith Watford
Moderator
10533
Keith Watford  
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
1467
Syed Naufal Gaddafi  
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
3245
qjol  
can you please attach the image to show exactly what you are trying to accomplish
euclid
37
euclid  

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
380
Frédéric LEBRE  

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
35118
Alain Verleyen  
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
380
Frédéric LEBRE  

Thanks a lot, it woks.


Bye.

To add comments, please log in or register