display currency name at the end of line in CCFp

 

pls help to add currency name in cluster indi CCFp, similar to attached picture.

Thanks,

 
why not attached,
 
limuc:
why not attached,
Create a Text Object at bar 0 at the last price in the buffer
 
and color the text objects with same color as the line with that currency
 
RaptorUK:
Create a Text Object at bar 0 at the last price in the buffer


Could you please help to add, Many thanks,

Files:
 
limuc:

Could you please help to add, Many thanks,

Where are you having problems ? if you just want someone else to write this code for you then you can get all the help you need here: modify my MT4 indicator for me
 

Thanks,

 
deVries:
and color the text objects with same color as the line with that currency

I tried to add Currency name in the chart, look like above picture.

I added ObjectCreate and ObjectText in the mq4, e.g., but did not work, I really appreciate for your help.

{ int width = 0;
if(0 > StringFind(Symbol(), "USD", 0))
width = 1;
else
width = Line_Thickness;
SetIndexStyle(0, DRAW_LINE, DRAW_LINE, width, Color_USD);
SetIndexBuffer(0, arrUSD);

SetIndexLabel(0, "USD");

ObjectCreate( "name",OBJ_TEXT,0,0,0);
ObjectSetText("name","USD",10,"Tahoma",Gold);

}
 
limuc:

I tried to add Currency name in the chart, look like above picture.

I added ObjectCreate and ObjectText in the mq4, e.g., but did not work, I really appreciate for your help.

<CODE REMOVED>

Looking at this line . . .

ObjectCreate( "name",OBJ_TEXT,0,0,0);

. . . where are you trying to place the Object ? read the documentation before you answer: ObjectCreate()



Please use the SRC button to post code: How to use the SRC button.

 
RaptorUK:

Looking at this line . . .

. . . where are you trying to place the Object ? read the documentation before you answer: ObjectCreate()



Please use the SRC button to post code: How to use the SRC button.


Thanks, I changed to

ObjectCreate( "name",OBJ_TEXT,0,0,arrUSD)

// I think arrUSD is a buffer, which you told me.

ObjectSetText("name","USD",10,"Tahoma",Gold); 

but I am unlucky, still it did not work

 
limuc:

Thanks, I changed to

// I think arrUSD is a buffer, which you told me.

but I am unlucky, still it did not work

RaptorUK:

Looking at this line . . .

ObjectCreate( "name",OBJ_TEXT,0,0,arrUSD)

. . . where are you trying to place the Object ? read the documentation before you answer: ObjectCreate()



Same question . . . can you answer please ?
Reason: