mql4 賬戶信息1

//+------------------------------------------------------------------+
//|                                                         test.mq4 |
//|                        Copyright 2015, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict


//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

double Lots = 0.9;
   string symbol = Symbol();
   Print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
   Print("Server name is ", AccountServer());
   Print("Account number = ", AccountNumber());
   Print("Account Credit = ", AccountCredit());
   Print("Account Balance = ",AccountBalance( )/10 );
   Print("StopOut level = ", AccountStopoutLevel());
   Print("Account Margin = ",AccountMargin( ) );
   Print("Account Currency: ", AccountCurrency() );
   Print("Account equity = ",AccountEquity());
   Print("Account free margin = ",AccountFreeMargin());
   Print("Account Free Margin Check = ",AccountFreeMarginCheck(Symbol(),OP_BUY,Lots));
   if(AccountFreeMarginCheck(symbol,OP_BUY,Lots)<=0 || GetLastError()==134) 
      return(0);
   Print("========================================================="); 


//---
   return(INIT_SUCCEEDED);
  }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章