LEVERAGE

To add comments, please log in or register
ADEM KARATEPE
636
ADEM KARATEPE  
Hello, I need a basic script for see my account leverage.
ADEM KARATEPE
636
ADEM KARATEPE  

Thank you very much for reply. I just add it in to scripts in MQL4 after i am draging the script to graph but nothings happen. Why it could be?

Files:
Sergey Golubev
Moderator
106040
Sergey Golubev  
ADEM KARATEPE:

Thank you very much for reply. I just add it in to scripts in MQL4 after i am draging the script to graph but nothings happen. Why it could be?

This is EA (you should add it as an EA).
Ahmet Metin Yilmaz
2958
Ahmet Metin Yilmaz  
//+------------------------------------------------------------------+ 
//| Script program start function                                    | 
//+------------------------------------------------------------------+ 
void OnStart() 
  { 
//--- Name of the company 
   string company=AccountInfoString(ACCOUNT_COMPANY); 
//--- Name of the client 
   string name=AccountInfoString(ACCOUNT_NAME); 
//--- Account number 
   long login=AccountInfoInteger(ACCOUNT_LOGIN); 
//--- Name of the server 
   string server=AccountInfoString(ACCOUNT_SERVER); 
//--- Account currency 
   string currency=AccountInfoString(ACCOUNT_CURRENCY); 
//--- Demo, contest or real account 
   ENUM_ACCOUNT_TRADE_MODE account_type=(ENUM_ACCOUNT_TRADE_MODE)AccountInfoInteger(ACCOUNT_TRADE_MODE); 
//--- Now transform the value of  the enumeration into an understandable form 
   string trade_mode; 
   switch(account_type) 
     { 
      case  ACCOUNT_TRADE_MODE_DEMO: 
         trade_mode="demo"; 
         break; 
      case  ACCOUNT_TRADE_MODE_CONTEST: 
         trade_mode="contest"; 
         break; 
      default: 
         trade_mode="real"; 
         break; 
     } 
//--- Stop Out is set in percentage or money 
   ENUM_ACCOUNT_STOPOUT_MODE stop_out_mode=(ENUM_ACCOUNT_STOPOUT_MODE)AccountInfoInteger(ACCOUNT_MARGIN_SO_MODE); 
//--- Get the value of the levels when Margin Call and Stop Out occur 
   double margin_call=AccountInfoDouble(ACCOUNT_MARGIN_SO_CALL); 
   double stop_out=AccountInfoDouble(ACCOUNT_MARGIN_SO_SO); 
//--- Show brief account information 
   PrintFormat("The account of the client '%s' #%d %s opened in '%s' on the server '%s'", 
               name,login,trade_mode,company,server); 
   PrintFormat("Account currency - %s, MarginCall and StopOut levels are set in %s", 
               currency,(stop_out_mode==ACCOUNT_STOPOUT_MODE_PERCENT)?"percentage":" money"); 
   PrintFormat("MarginCall=%G, StopOut=%G",margin_call,stop_out); 
  }
To add comments, please log in or register