Dumb newbie question

 

I want to display the account information on the chart. I can display Account balance etc by using


DoubleToStr(AccountNumber(), 0)

......etc



But when I try to display the account name, or anything not numerical it only shows a zero.



What do I use to display the alpha results from account information like account name and broker name? I can't seem to find what to use by searching :o(



Also, I want to display a message if the user is on a chart other than GBPUSD......how would I do this?



Thanks,

Wayne

 
jacksun:

I want to display the account information on the chart. I can display Account balance etc by using


DoubleToStr(AccountNumber(), 0)

......etc



But when I try to display the account name, or anything not numerical it only shows a zero.



What do I use to display the alpha results from account information like account name and broker name? I can't seem to find what to use by searching :o(



Also, I want to display a message if the user is on a chart other than GBPUSD......how would I do this?



Thanks,

Wayne

If you aren't printing a double, then don't use doubleToStr, leave that part out.

if(Symbol() != "GBPUSD") Alert("NOT GBPUSD");

 
paranoidtruth:

If you aren't printing a double, then don't use doubleToStr, leave that part out.

if(Symbol() != "GBPUSD") Alert("NOT GBPUSD");


Hi Paranoidtruth, thank you for your reply. I tried that and it still isn't working. I am using it in a comment, here is the whole line:

//---------------------------------------------------------------

Message =

"" + NL +

"Account Name: " + DoubleToStr(AccountName(), 0) + NL +



Comment(Message);

//---------------------------------------------------------------



If I just remove the DoublToStr I get tons of errors.



Any ideas?



Thanks Heaps,

Wayne

 

Hi Jacksun


The following code works.


string Message;

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+

int start()
{

   Message = "" + "\n" + "Account Name: " + AccountName();
   Comment( Message );

}
The function AccountName() returns a string suitable for use in the comment string.

I think your NL means new line. If so, you should use the special character "\n".

Also, I don't know why you need the "" at the start of your message. I think it does nothing.

Cheers
Jellybean
 
Jellybean:

Hi Jacksun


The following code works.


You may get some ideas here:

Its a script you drop on the chart, then look at the generated textfile.

Files:
 

high guys,

im new here in trading business, any one can spear time to teach or guide me..

oscar of dubai

Reason: