display currency name at the end of line in CCFp - page 3

 
limuc:

Thanks,

it still doesn't work.

Read the documentation . . . it is obvious you still haven't.
 
GumRai:

Thanks for your reply, I set "sub-window" is 1, but it still did not display name.


{  int width = 0;
   int i =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"); 
   //string name = "text_object";
//if(ObjectFind(name) != -1) ObjectDelete(name);
  
  ObjectCreate( "name",OBJ_TEXT,1,Time[0],arrUSD[0]+5*Point);

//ObjectCreate( name,OBJ_TEXT,WindowFind("name"),Time[0],arrUSD[0]+5*Point);
//ObjectCreate( "name",OBJ_TEXT,1,0,arrUSD[0]+5*Point);
//ObjectSetText("name",DoubleToStr(arrUSD[0],Digits)+"   USD",10,"Tahoma",Gold);
//ObjectSet("name", OBJPROP_XDISTANCE, 100);
//ObjectSet("name", OBJPROP_YDISTANCE, 100);
 
ObjectSetText("name","USD",10,"Tahoma",Gold);  
 
}
 
RaptorUK:
Read the documentation . . . it is obvious you still haven't.


:-(
 
limuc:

:-(
I asked you to answer the same simple question twice . . . you haven't and you are still asking for help . . . why won't you help those trying to help you ?
 
RaptorUK:
I asked you to answer the same simple question twice . . . you haven't and you are still asking for help . . . why won't you help those trying to help you ?


Sorry, because I did not understand your question before, :-). I just tried to modify existed code I found from internet.

where are you trying to place the Object ? I want to place a TEXT in the sub-window, so I used 1, and when price close, then buffer[0], is the following code right?

  ObjectCreate( "name",OBJ_TEXT,1,Time[0],arrUSD[0]+5*Point);

Thanks!

 
limuc:

Thanks for your reply, I set "sub-window" is 1, but it still did not display name.


 ObjectCreate( "name",OBJ_TEXT,1,Time[0],arrUSD[0]+5*Point);

In your posted code you do not assign a value to arrUSD[0]

Why +5*Point ?

It is not clear whether your code is in init() or start()

Make sure that an object is only created once in your code, if you try to create an object with the same name, you will get an error.

Create the object once and then use ObjectMove.

 
GumRai:

In your posted code you do not assign a value to arrUSD[0]

Why +5*Point ?

It is not clear whether your code is in init() or start()

Make sure that an object is only created once in your code, if you try to create an object with the same name, you will get an error.

Create the object once and then use ObjectMove.

Thanks a million! I finally see what I want.
 
RaptorUK, deVries, GumRai, Thank you all for your warm-hearted help, :-)
Reason: