Errors, bugs, questions - page 2605

 

I apologise for the little offtop

Igor Makanu:

It is impossible for a processor to drop the 12v line of a PSU

if your PSU is faulty, it won't deliver all the ratings (12.5, 3.3), then the memory will fail, then the cpu, and only then the hard drives, fans.... If you have a video card, it may start to fail if the 12 V sag, but the first sag at 12 V will feel the SSD, and other devices work without problems ... imho, it doesn't happen that way...although.... thought it was the hard drive when the memory failed, even win7 couldn't install to the hard drive under suspicion, at 30% of the installation it wrote can't copy the file... the problem was caused by faulty memory

ZS: wrote about AIDA64 - did you do it?

I have now replaced the power supply and I don't recognise my computer. Even the internet is faster. It's a miracle.
 
Alexey Viktorov:

I apologise for the little offtop

I've now replaced the power supply and don't recognise my computer. Even the internet is faster now. It's a miracle.

That's great.
But it's no surprise, power supplies don't last forever,
especially without a regulator, capacitors can sag quickly,
depending on the quality of the power supply, it can easily go dead in a year of active use.

 

The source(Math\Stat\Math.mqh) should be adjusted to the latest build, the MathArctan2 function with these parameters is already redundant:


 
Aliaksandr Hryshyn:

It is necessary to correct source(Math\Stat\Math.mqh) for last build, function MathArctan2 with given parameters is already superfluous:


Fixed.

A new beta with fixes will be available in 2 hours.

 
When calling CopyTicksRange for history, which doesn't exist locally yet, the function "hangs" for indefinite time in terms of MQL5 calling code, during which the files are downloaded to the folder of working database ticks, while MQL5 program "waits". When all of the requested history is received, the "hanging" subsides by itself, but how to let the user know for this period that the program actually works? Is there a way to get the percentage of completion of the download process? I have several years of history downloaded for a few minutes. Without clear feedback, the average user will spit and scrap the program without waiting for the result. I don't want to roll a stupid clock either and have no confirmation in MQL that the download is really happening.
 
Stanislav Korotky:
When calling CopyTicksRange for the history, which locally is not available yet, the function from the caller MQL5 code "hangs" for indefinite time, during which the files are downloaded to the folder of ticks of the working database and the MQL5 program at the same time "waits". When all of the requested history is received, the "hanging" subsides by itself, but how to let the user know for this period that the program actually works? Is there a way to get the percentage of completion of the download process? I have several years of history downloaded for a few minutes. Without clear feedback, the average user will spit and scrap the program without waiting for the result.

In the KB solution Tester did, I think, something like this. I don't remember the essence, the code should be clear. You can also try it with the indicator. It doesn't seem to wait for execution if the story is not ready.

 
fxsaber:

The KB solution Tester used to do something like this. I don't remember the essence, the code should be clear. You can also try it with the indicator. It seems that it doesn't wait for execution there, if the history is not ready.

Can you more precisely show the place, because there are several Tester's? ;-)

Indicators don't give progress of quotes calculation for them - well, the CopyBuffer will return the same error code all the time - it doesn't clarify the situation.

 
Stanislav Korotky:

Can you be more specific about the location, because there are a few Tester's? ;-)

In this file

  static bool HistoryIsReady( const datetime tBeginTime, MqlTick &BeginTick )
  {
    MqlTick Ticks[1];
  
    ::ResetLastError();
  
    if (::CopyTicks(_Symbol, Ticks, COPY_TICKS_ALL, (ulong)tBeginTime * 1000, 1) == 1)
      BeginTick = Ticks[0];
  
    return(!::GetLastError() ||
           (!::TerminalInfoInteger(TERMINAL_CONNECTED) && 
           ((::CopyTicks(_Symbol, Ticks, COPY_TICKS_ALL, (ulong)(tBeginTime - 7 * 24 * 3600) * 1000, 1)) == 1) &&
           (Ticks[0].time < tBeginTime)));
  }

Indicators don't provide progress of quotes calculation for them - well the same error code will be returned by CopyBuffer all the time - it doesn't make the situation any clearer.

I meant something else, but it's not important.

 

I don't understand what's going on at all.

   struct myPositionPrepare
   {
      ENUM_ORDER_TYPE      order_type;          // тип устанавливаемого ордера
      ENUM_POSITION_TYPE   position_type;       // тип устанавливаемого ордера
.................
   };
   myPositionPrepare       structPosPrep;       // подготовительная структура для открытия позиции/ордера
.
.
      structPosPrep.position_type         = PositionGetInteger(POSITION_TYPE); // implicit enum conversion

What's wrong?

 
Сергей Таболин:

I don't understand what's going on at all.

What's wrong?

longPositionGetInteger()

I also find this point inconvenient: I could translate from enum to integer types and back automatically, without having to

structPosPrep.position_type = (ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE);