Errors, bugs, questions - page 1878

 
Sergey Dzyublik:

What is the name of this operation then?

This operation has no name now (1589+). I think when you understand where Warning is coming from

template <typename T>
T Func(){
  T Res;
  return(Res);
}

template <typename T>
void Func( T Value ){
  T Res = (int)Value; // implicit conversion from 'number' to 'string'
}

void OnStart()
{
  Func<string>(); 

  Func(0);
}

you will understand what problem we are talking about.

 

Please show in the optimiser logs the range and step of the parameters to be optimised.

Also in the logs of agents such strings

NS      0       14:11:00.853    Tester  756 : passed in 0:00:04.789
MJ      0       14:11:03.447    Tester  757 : passed in 0:00:02.574
RM      0       14:11:05.860    Tester  758 : passed in 0:00:02.340

accompany with information on the corresponding run - the name of the Expert Advisor and its input parameters.

 
If we remove the line here
#define  TYPETOBYTES_FULL_SLOW

then new unions are enabled, doubling the compilation time.

'TypeToBytes_ExampleScript.mq5' TypeToBytes_ExampleScript.mq5
'TypeToBytes.mqh'       TypeToBytes.mqh
0 error(s), 0 warning(s), compile time: 3195 msec

Is three seconds for a small code normal?

That said, the debug version

0 error(s), 0 warning(s), compile time: 108 msec

is compiled 30 times faster.

Is it possible to quickly compile into the debug-version without launching the debug itself - just for the sake of self-testing?

 

I don't know how it happened, but it turned out like this:


 
Комбинатор:

I don't know how it happened, but it turned out like this:

You have to write to someone. You just have to, there's no other way)))
 
Andrey Khatimlianskii:
You have to write to someone. You just have to, there's no other way )))
That's not enough. After something like that you have to get married, or else)))
 
In today's realities, is this normal?
void OnStart()
{
  MqlTick Tick;
  
  Tick = (MqlTick)Tick; // cannot cast 'MqlTick' to 'MqlTick'
}
 

Greetings very warmly!

help me solve a problem.

I have this code, i.e. we open a new chart on the market review and draw an object on it.

I can't see any problems while there are only few tickers in the overview.

The more windows are opened, the slower the next window is opened.

when chart open time reaches 3000ms!!! = 3s, ChartOpen returns 0, even though the chart is opened eventually, but !!! we have a condition - draw an object in a new chart, if ChartOpen returns 0, we can not get chart ID, so exactly on it draw an object, even though the chart opened eventually, but we do not know its ID.

Tried to solve the problem vasyanskim way,stupidly turning Sleep 4s, but still, with a set of charts around 60,even it does not work. And it's even I've cut attach template with turkeys, as in the beginning planned.

If you zammenut Sleep, then thrash, mayhem and sodomy, will begin much earlier.

2017.04.29 12:50:12.563 открытие множества чартов с созданием объектов (EURUSD,H1)      Чарт 131379294082473728 открывался = 2480.0
2017.04.29 12:50:12.563 открытие множества чартов с созданием объектов (EURUSD,H1)      Раз тут открылся чарт #Wheat_N7  должен нарисовать объект 
2017.04.29 12:50:12.673 открытие множества чартов с созданием объектов (EURUSD,H1)      На символе номер = 57 #Wheat_N7  создано объектов = 1
2017.04.29 12:50:12.673 открытие множества чартов с созданием объектов (EURUSD,H1)      На символе номер = 57 #Wheat_N7  на самом деле создано объектов = 1
2017.04.29 12:50:19.753 открытие множества чартов с созданием объектов (EURUSD,H1)      Не удалось открыть чарт № = 58 тикер = #AUS200  за время = 3003.0
2017.04.29 12:50:26.623 открытие множества чартов с созданием объектов (EURUSD,H1)      Чарт 131379294223977200 открывался = 2794.0
2017.04.29 12:50:26.623 открытие множества чартов с созданием объектов (EURUSD,H1)      Раз тут открылся чарт #Belgium20  должен нарисовать объект 

Memory gorate terminal about 700mb, another 1300 free, ie it's not in the resources. Kolvo bars on the chart set 5000.

Не удалось открыть чарт № = 58 тикер = #AUS200

However, the chart opened, but its ID is unknown.

//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property strict
#property script_show_inputs
input string nametemplate="zz.tpl";
input int    limit=1000;
int symopen,objquant;
double close[];
datetime time[];
string namesym;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   ArrayInitialize(time,0);
   ArrayInitialize(close,0);
   long chart_id=ChartFirst(),chart_id_prev;
   for(int c2=0; c2<SymbolsTotal(true)-1; c2++)
     {
      int Q=0;
      objquant=0;
      chart_id_prev=chart_id;
      ArrayFree(close);
      ArrayFree(time);
      ArrayResize(close,limit);
      ArrayResize(time,limit);
      int время=CopyTime(namesym,0,1,limit,time);
      int цена=CopyClose(namesym,0,1,limit,close);
      namesym=SymbolName(c2,true);
      ulong start=GetMicrosecondCount();
      chart_id=ChartOpen(namesym,0);
      ulong finish=GetMicrosecondCount();
      Sleep(4000);
      if( chart_id==0 )
        {
         Print("Не удалось открыть чарт № = ",c2," тикер = ",namesym," за время = ",
               NormalizeDouble((finish-start)/1000,3));
         continue;
        }
      Print("Чарт ",chart_id," открывался = ",NormalizeDouble((finish-start)/1000,3));
      symopen=1;
      //      ChartApplyTemplate(chart_id,nametemplate);
      Print("Раз тут открылся чарт ",namesym," должен нарисовать объект ");
      //Sleep(100);
      ResetLastError();
      bool objcreated=ObjectCreate(chart_id,"name"+namesym+string(c2),OBJ_RECTANGLE,0,time[5],close[5],time[15],close[15]);
      if(objcreated==true) objquant++;
      else Print("Ошибка создания объекта = ",GetLastError());
      Print("На символе номер = ",c2," ",namesym," создано объектов = ",objquant);
      int total=ObjectsTotal(chart_id,0,-1);
      Print("На символе номер = ",c2," ",namesym," на самом деле создано объектов = ",total);
     }
   return;
  }

//+------------------------------------------------------------------+
 
kaus_bonus:

help solve a problem.

Write GetNewChartID().
 
fxsaber:
Write GetNewChartID().


ChartOpen is supposed to return a new chart ID, but it doesn't do it

can you help me with this?