Download MetaTrader 5
To add comments, please log in or register
Do you have questions to the application's developer - ask them in Comments section
sd59
499
sd59 2015.02.12 22:21 

Hi All,

i am creating a table on a chart that uses a "Wingdings" arrow. The simple code below produces an arrow in the label named "arrow" - I want to use OBJ_LABEL because of x,y coords and not time/price.

ObjectCreate("arrow",OBJ_LABEL,0,0,0,0);
ObjectSet("arrow", OBJPROP_XDISTANCE,200);
ObjectSet("arrow", OBJPROP_YDISTANCE,200);
ObjectSetText("arrow",CharToStr(218),14,"Wingdings",Green)

 I would like to be able to write an integer value in the same label space next to the arrow

ObjectSetText("arrow",CharToStr(218)+"2",14,"Wingdings",Green)

This doesn't work of course because it interprets the "2" in "Wingdings" format.

Does anybody know the correct format to be able to do this?

thanks 

Keith Watford
Moderator
7979
Keith Watford 2015.02.12 22:35  

I don't think this is ideal, using the limited numbers in wingdings

ObjectSetText("arrow",CharToStr(218)+CharToStr(130),14,"Wingdings",Green);
honest_knave
969
honest_knave 2015.02.12 22:43  

As GumRai rightly says, there is no ideal solution. You can't mix fonts within the same object, so your two choices are:

(1) Create two objects; or

(2) Make do with the wingding characters 128-149 

sd59
499
sd59 2015.02.12 22:50  
GumRai:

I don't think this is ideal, using the limited numbers in wingdings

 

thanks for the reply. I didn't put the full explanation in but I want to put a calculated integer value next to the arrow character - the integer will be calculated by some function so it will change.

I know this can be done by just creating another label space but I'm looking for a neater solution first if it can be done.

sd59
499
sd59 2015.02.12 22:51  
honest_knave:

As GumRai rightly says, there is no ideal solution. You can't mix fonts within the same object, so your two choices are:

(1) Create two objects; or

(2) Make do with the wingding characters 128-149 

OK thanks - if it can't be done...it can't be done!
/
To add comments, please log in or register