Download MetaTrader 5

AccountInfoDouble - ambiguous call to overloaded function with the same parameters

To add comments, please log in or register
catalinchirila
9
catalinchirila 2013.11.02 10:29 

Hi,

I have this bit of code from MQL docs which I want to use in my EA to display these details over the chart for the moment, I want to use them later on but I get the amiguous call error, any idea on how this can be fixed?


Thank you 

 

 //Get and show account details

double  AccountInfoDouble(

   int  property_id      // identifier of the property

   );
  

   void OnStart()

  {

//--- show all the information available from the function AccountInfoDouble()

   printf("ACCOUNT_BALANCE =  %G",AccountInfoDouble(ACCOUNT_BALANCE));

   printf("ACCOUNT_CREDIT =  %G",AccountInfoDouble(ACCOUNT_CREDIT));

   printf("ACCOUNT_PROFIT =  %G",AccountInfoDouble(ACCOUNT_PROFIT));

   printf("ACCOUNT_EQUITY =  %G",AccountInfoDouble(ACCOUNT_EQUITY));

   printf("ACCOUNT_MARGIN =  %G",AccountInfoDouble(ACCOUNT_MARGIN));

   printf("ACCOUNT_FREEMARGIN =  %G",AccountInfoDouble(ACCOUNT_FREEMARGIN));

   printf("ACCOUNT_MARGIN_LEVEL =  %G",AccountInfoDouble(ACCOUNT_MARGIN_LEVEL));

   printf("ACCOUNT_MARGIN_SO_CALL = %G",AccountInfoDouble(ACCOUNT_MARGIN_SO_CALL));

   printf("ACCOUNT_MARGIN_SO_SO = %G",AccountInfoDouble(ACCOUNT_MARGIN_SO_SO));

  }
Alain Verleyen
Moderator
31134
Alain Verleyen 2013.11.02 11:07  
Please edit your post and Use SRC button when you post code.
catalinchirila
9
catalinchirila 2013.11.02 11:14  
angevoyageur:
Please edit your post and Use SRC button when you post code.
Done that. Sorry.
Alain Verleyen
Moderator
31134
Alain Verleyen 2013.11.02 11:18  
catalinchirila:
Done that. Sorry.

Ok. You don't have to copy all code you see on documentation page . The upper part is the documentation of AccountInfoDouble function.

Try this code :

   void OnStart()

  {

//--- show all the information available from the function AccountInfoDouble()

   printf("ACCOUNT_BALANCE =  %G",AccountInfoDouble(ACCOUNT_BALANCE));

   printf("ACCOUNT_CREDIT =  %G",AccountInfoDouble(ACCOUNT_CREDIT));

   printf("ACCOUNT_PROFIT =  %G",AccountInfoDouble(ACCOUNT_PROFIT));

   printf("ACCOUNT_EQUITY =  %G",AccountInfoDouble(ACCOUNT_EQUITY));

   printf("ACCOUNT_MARGIN =  %G",AccountInfoDouble(ACCOUNT_MARGIN));

   printf("ACCOUNT_FREEMARGIN =  %G",AccountInfoDouble(ACCOUNT_FREEMARGIN));

   printf("ACCOUNT_MARGIN_LEVEL =  %G",AccountInfoDouble(ACCOUNT_MARGIN_LEVEL));

   printf("ACCOUNT_MARGIN_SO_CALL = %G",AccountInfoDouble(ACCOUNT_MARGIN_SO_CALL));

   printf("ACCOUNT_MARGIN_SO_SO = %G",AccountInfoDouble(ACCOUNT_MARGIN_SO_SO));

  }
To add comments, please log in or register