Sparring on MetaQuotes-Demo demo accounts - page 7

 
Server Muradasilov:

1:100 all

printf("ACCOUNT_LEVERAGE = %d",AccountInfoInteger(ACCOUNT_LEVERAGE));

2017.03.24 15:21:56.659 111 (AUDUSD,M15) Client 'MetaTrader 5 Demo' account #5477214 demo opened with 'MetaQuotes Software Corp.' on 'MetaQuotes-Demo' server
2017.03.24 15:21:56.659,111 (AUDUSD,M15) Account currency is USD, MarginCall and StopOut level is set in percentage
2017.03.24 15:21:56659 111 (AUDUSD,M15) MarginCall level=50, StopOut level=30
2017.03.24 15:21:56.659 111 (AUDUSD,M15) ACCOUNT_LEVERAGE = 100


//+------------------------------------------------------------------+
//|                                                          111.mq5 |
//|                        Copyright 2017, MetaQuotes Software Corp. |
//|                              https://www.mql5.com/ru/users/yuraz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, MetaQuotes Software Corp."
#property link      "https://www.mql5.com/ru/users/yuraz"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- create timer
   EventSetTimer(60);
//--- имя компании 
   string company=AccountInfoString(ACCOUNT_COMPANY); 
//--- имя клиента 
   string name=AccountInfoString(ACCOUNT_NAME); 
//--- номер счета 
   long login=AccountInfoInteger(ACCOUNT_LOGIN); 
//--- имя сервера 
   string server=AccountInfoString(ACCOUNT_SERVER); 
//--- валюта счета 
   string currency=AccountInfoString(ACCOUNT_CURRENCY); 
//--- демо, конкурсный или реальный счет 
   ENUM_ACCOUNT_TRADE_MODE account_type=(ENUM_ACCOUNT_TRADE_MODE)AccountInfoInteger(ACCOUNT_TRADE_MODE); 
//--- теперь превратим значение перечисления в понятный вид 
   string trade_mode; 
   switch(account_type) 
     { 
      case  ACCOUNT_TRADE_MODE_DEMO: 
         trade_mode="demo"; 
         break; 
      case  ACCOUNT_TRADE_MODE_CONTEST: 
         trade_mode="конкурсный"; 
         break; 
      default: 
         trade_mode="реальный"; 
         break; 
     } 
//--- в процентах или в денежном выражении задается уровень Stop Out 
   ENUM_ACCOUNT_STOPOUT_MODE stop_out_mode=(ENUM_ACCOUNT_STOPOUT_MODE)AccountInfoInteger(ACCOUNT_MARGIN_SO_MODE); 
//--- получим значения уровней, при которых наступает Margin Call и Stop Out 
   double margin_call=AccountInfoDouble(ACCOUNT_MARGIN_SO_CALL); 
   double stop_out=AccountInfoDouble(ACCOUNT_MARGIN_SO_SO); 
//--- выведем краткую информацию по счету 
   PrintFormat("Счет клиента '%s' #%d %s открыт в '%s' на сервере '%s'", 
               name,login,trade_mode,company,server); 
   PrintFormat("Валюта счета - %s, уровень MarginCall и StopOut задается в %s", 
               currency,(stop_out_mode==ACCOUNT_STOPOUT_MODE_PERCENT)?"процентах":" в деньгах"); 
   PrintFormat("Уровень MarginCall=%G, уровень StopOut=%G",margin_call,stop_out); 
   
     printf("ACCOUNT_LEVERAGE =  %d",AccountInfoInteger(ACCOUNT_LEVERAGE)); 
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//--- destroy timer
   EventKillTimer();
      
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Trade function                                                   |
//+------------------------------------------------------------------+
void OnTrade()
  {
//---
   
  }
//+------------------------------------------------------------------+
//| TradeTransaction function                                        |
//+------------------------------------------------------------------+
void OnTradeTransaction(const MqlTradeTransaction& trans,
                        const MqlTradeRequest& request,
                        const MqlTradeResult& result)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Tester function                                                  |
//+------------------------------------------------------------------+
double OnTester()
  {
//---
   double ret=0.0;
//---

//---
   return(ret);
  }
//+------------------------------------------------------------------+
//| TesterInit function                                              |
//+------------------------------------------------------------------+
void OnTesterInit()
  {
//---
   
  }
//+------------------------------------------------------------------+
//| TesterPass function                                              |
//+------------------------------------------------------------------+
void OnTesterPass()
  {
//---
   
  }
//+------------------------------------------------------------------+
//| TesterDeinit function                                            |
//+------------------------------------------------------------------+
void OnTesterDeinit()
  {
//---
   
  }
//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| BookEvent function                                               |
//+------------------------------------------------------------------+
void OnBookEvent(const string &symbol)
  {
//---
   
  }
//+------------------------------------------------------------------+
 
Participants of the championship
Sparring signals, please do not subscribe to this signal
Server Muradasilov is organizer and supervisor
https://www.mql5.com/ru/signals/282893
YURAZhttps://www.mql5.com/ru/signals/282872
Evgeny Belyaevhttps://www.mql5.com/ru/signals/283098
Andrey Dikwaiting for registration










 
I created an mt4 account, you all have mt5 accounts.
 
Evgeny Belyaev:
I created an mt4 account, you all have mt5 accounts.

I think in a championship like this, it doesn't really matter.

 
Vladimir Gribachev:


No, not an option at all. Sorry.


Maybe someone has an idle vps?

Who has a non-MQ vps?

 
Evgeny Belyaev:


Maybe someone has an idle vps?

Who has a non-MQ vps?

My machine is 24/7, I still have VPS from MQ which is very reliable, awesome fast - like SHANHAI BARS! with the price of some $10 a month
 
Yuriy Zaytsev:
Own machine 24/7 , I also have a VPS from MQ, which is very reliable, amazingly fast - as SHANHAI BARS! with the price of some 10$ per month
If someone does not feel sorry for the source - I can put on my machine!
 
Yuriy Zaytsev:

I think in a championship like this, it's not crucial.


It doesn't matter.
 
Yuriy Zaytsev:
If anyone cares about the source code, I can put it on my machine!

Why not trust the source? .ex4-5?
 
Evgeny Belyaev:

Why not trust the source? .ex4-5?

:-))))) nnuu - interesting question - no problem EX(4/5)