Errors, bugs, questions - page 503

 
snookeredman:

Good afternoon!

Please help me to understand ....

void OnStart()
  {
    int h;
    int    m_integer  = 23;
    string m_string   = "EURUSD";
    double m_double   = 1.2345678;    
    
    h=FileOpen("TEST_CSV_FILE.CSV",FILE_CSV|FILE_WRITE,";");
    FileWrite(h,  
              m_integer, 
              m_string, 
              DoubleToString(NormalizeDouble(m_double,5),5));
    FileWrite(h,  
              m_integer, 
              m_string, 
              DoubleToString(NormalizeDouble(m_double,5),5));
    FileClose(h);
  }

Appropriately, the file size is 2 times the intended size.

Try it like this :

void OnStart()
  {
    int h;
    int    m_integer  = 23;
    string m_string   = "EURUSD";
    double m_double   = 1.2345678;    
    
    h=FileOpen("TEST_CSV_FILE.CSV",FILE_CSV|FILE_WRITE|FILE_ANSI,";");                     // Добавлен флаг FILE_ANSI
    FileWrite(h, m_integer, m_string, DoubleToString(NormalizeDouble(m_double,5),5));
    FileWrite(h, m_integer, m_string, DoubleToString(NormalizeDouble(m_double,5),5));
    FileClose(h);
  }
I think this is exactly what you were looking for.
 
What is going on? How long will these server disconnects and failures continue? Now the site is back online after three days of downtime, but the servers are down again and the terminal is not connecting
 
Bene_Nota:

What is going on? How long will these server disconnects and failures continue? Now the site is back online after three days of downtime, but the servers are down again and the terminal is not connecting
My terminal is connected since yesterday evening. Access Point: USA, Europe, Hong Kong
 

Thanks to TheXpert, MetaDriver for the help.

The FILE_ANSI flag helped, and trying to play with code pages without this flag was unsuccessful.

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов - Документация по MQL5
 

Gentlemen, how do you know the total number of elements on a form in C++?

 

Good afternoon, I would like to contact the developers, but first a littlebackground...

Since it is now impossible to hold several positions, I see the most sensible way out for myself is to set pending orders. But there is a problem with setting orders one by one. We have to set three orders (one of immediate execution and two pending orders instead of TP and SL). What if I place one order and cannot place two? What if my brokerage company goes to lunch? My deposit may not like it. Do you plan to open several orders (all or nothing)?

 
220Volt:

Do you plan to make it possible to set multiple orders (either all or nothing)?

Unfortunately, no.

This is practically impossible, especially within exchange gateways, where such complex orders are not supported in principle.

 

I am trying to ask for the start date of the history and I get zeros.

The test is in visualization mode, all ticks are on H1.

Checking test code

int DS[];
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   int total=SymbolsTotal(false);
   ArrayResize(DS,total);
   for(int i=0;i<total;i++)
   {
    DS[i]=0;
    string symbol=SymbolName(i,false);
    
    while(!SymbolIsSynchronized(symbol)) 
    {
     DS[i]=(int)SeriesInfoInteger(symbol,0,SERIES_SERVER_FIRSTDATE);
     Sleep(30);
    }
    DS[i]=(int)SeriesInfoInteger(symbol,0,SERIES_SERVER_FIRSTDATE);
    Print("История по символу ",symbol," Синхронизирована. дата начала истории ",TimeToString(DS[i])," = ",DS[i]);
   }
//---
   return(0);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   
  }
//+------------------------------------------------------------------+

Attachment is a log.

 

Does the code optimizer have limitations on the size of the object tree?

I get a "tree optimization error" at compile stage when I increase the number of objects.

P.S. In debug mode, the compilation goes through.

 
sergey1294:

I am trying to request the start date of the history and I get zeros.

The test is in visualization mode, all ticks are on H1.

Checking test code

Attachment is a log.

First, what is the sense of forcefully downloading the history in the tester? The tester itself will download the necessary and available history from the server, if there are requests in the code or trade operations with the necessary symbols. Since your code is empty, the tester doesn't need to simulate ticks for other symbols, except for the symbol, on which the testing is performed. And that's what the tester downloaded its history. And since there isn't a history (in the tester), we end up with 0.

Second, even if you augment the code by calling the entire history for all symbols, it is unlikely that the downloading of all of the available history for all symbols will be successful, and a failure will occur somewhere. Since the tester uses the base of terminal quotes, it needs to download the necessary history.