Errors, bugs, questions - page 2123

 

To summarise the question. What is the point of CAccountInfo, COrderInfo, CSymbolInfo, CPositionInfo and CTerminalInfo?

Looked at their source code. What is the good of using them?


CDealInfo andCHistoryOrderInfo - these are also written with logical errors. What is the purpose of using them?


Well, we have CTrade. Everything is clear with it; it can be useful where and so on. But what about Info-classes?

 
Almost all methods in Info-classes should be static. For what reason is this not the case?
 
Does anyone think about this while writing code?

Forum on trading, automated trading systems and testing trading strategies

Expert Advisors: TrailingTakeProfit

fxsaber, 2018.02.07 16:17

Imagine a simple optimization for 100,000 passes of 10,000,000 ticks. Then OnTick would be called one TRILLION times. Any extra action called a trillion times would require extra seconds/minutes/hours. Appreciate your time and the time of others.

 
fxsaber:
Does anyone think about this when writing code?

I think...

 
Vladimir Pastushak:

I think...

Then it's better not to write like that

   Comment(
           "\n","DayLimit ",DoubleToStr(DayLimit,2),               // Выводит на экран установленный лимит
           "\n","DayProfit ",DoubleToStr(DayProfit,2),             // Выводит на экран текущий профит за день
           "\n","Dostupno",DoubleToStr(DayProfit+DayLimit,2),      // Выводит на экран остаток от лимита
           "\n","Trade ",text                                      // Выводит на экран сообщение о разрешении торговать или нет
           );
 
Guys! Help) a week ago came out updated my 10. I've decided to save a screenshot of the terminal's workspace. I've been trying to save a screenshot, I've been pressing file-save as image-active chart and pressing OK, the window closes and that's it......... I've got the same problem on two terminals at different brokers (re-installation does not help)
 
fxsaber:

Then it's better not to write like that.

It is often difficult to understand what you mean. It requires sitting next to you and seeing everything you read, check, write.

There is a lack of context.

 
Rashid Umarov:

It is often difficult to understand what you mean. It requires sitting next to you and seeing everything you read, check, write.

There is not enough context.

Because DoubleToStr alone will be called three trillion times for nothing. Let's see how long it takes.

double Func( const string )
{
  return(1);
}

void OnStart()
{  
  double d = 0;

  for (long i = 0; i < 3 e12; i++)
    d += Func(DoubleToString(d, 2));
  
  Print(d);  
}

On my not-weak machine, it's 50 hours. I.e., an empty Expert Advisor with such a Comment (the Comment itself will not be called in the optimization mode, but the input parameters will be calculated) will add 50 hours to the waiting time. Who is thinking about this when writing code?

 
2018/02/08 00:21:15 Completed #2151967 Stardust11
Особенности языка mql5, тонкости и приёмы работы
Особенности языка mql5, тонкости и приёмы работы
  • 2017.11.20
  • www.mql5.com
В данной теме будут обсуждаться недокументированные приёмы работы с языком mql5, примеры решения тех, или иных задач...
 

From remote.

Думаю, все сильно зависит от кодера. Испытываю неприятное ощущение от отсутствия каких-либо попыток что-либо написать не медленно.

Only honed the speed in my tester when I needed to quickly (hundreds of times faster than MT) optimise a complete overshoot. Took a few hours to Optimize in a weekend, instead of a month.

And in MT4Orders, when you wanted to finally put a reasonable point to MT5.

It's not like we're talking about combat execution, but in the Tester. The mere fact that the Cloud is available shows that speed is a bottleneck. In sum, Cloud users have spent a huge amount to pay for the incompetence of the coders.

Forum on trading, automated trading systems and strategy testing

Advisors: TimeEA

fxsaber, 2018.02.07 04:01

Not a single EA from MQ in KB (haven't looked at the standard delivery). Strange situation. MQ keep emphasising the good MT5 speeds, but don't seem to have measured them. Perhaps that's why they allow slow code to be posted for training purposes.


I would like to see a benchmark code from MQ. When there are no logical errors, no algorithmic acceleration is possible, the code is laid out, different order types are involved (not only market orders), asynchronous order sending and processing is shown, trading history and ticks are involved. At least for one symbol.

Reason: