Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1083

 
I want to fully learn C++. But, as I understand it, Visual Studio has its own standards (sort of by standards), but some resources say that it's better not to use their development environment, but use gcc to compile and something to write source code (for example, eclipse for this case I'm looking at).

What would you advise? Learn from Visual?
 
Yevhenii Levchenko:
I want to fully learn C++. But, as I understand, Visual Studio has its own standards (sort of standards), but some resources say it's better not to use their development environment, but to use gcc to compile and something to write source code (for example, I look at eclipse for this case).

What would you advise? Learn from Visual?

There's nothing more convenient thanVisual Studio. And Stroustrup's tutorial.

 
Koldun Zloy:

There's nothing more convenient thanVisual Studio. And Stroustrup's tutorial.

Straustrup, in my opinion, writes very dryly. Or maybe it's the translation ("C++ programming language. Special edition")... All in all, it's very soporific. It'll be hard :)
 
Yevhenii Levchenko:
Stroustrup, in my opinion, writes very dryly. Or maybe it's the translation ("C++ Programming Language. Special Edition")... All in all, it's soporific. It's going to be difficult :)

Hard in training, easy in battle.

 

I would like to be able to limit the number of bars for calculation in MT4 indicator. I have guessed that such a line should be added.

extern int BarsCount = 50;

And if BarsCount = 0, it should calculate all the bars.


But it is difficult to go further. I think some changes should be made in this block, but I am not sure which ones. Please advise me, if it's not too difficult.

int start() 
{
   int counted_bars = IndicatorCounted();
   if (counted_bars < 0)
      return (-1);
   if (Bars <= LPeriod + Filter + 2)
      return (0);
   int limit = Bars - counted_bars - 1;
   if (limit > Bars - (LPeriod + Filter + 1))
      limit = Bars - (LPeriod + Filter + 1);
   for (int i = limit; i >= 0; i--)
       GlCalcul(i);
   return (0);
}
 
colleagues - please comment... my question in terms of answering it...
Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
  • 2020.02.25
  • www.mql5.com
В этой ветке я хочу начать свою помощь тем, кто действительно хочет разобраться и научиться программированию на новом MQL4 и желает легко перейти н...
 
Roman Shiredchenko:
Colleagues - please comment... my question as far as the answer is concerned...

Roman, tried to understand, but failed a little, try to reword it to be clearer and more unambiguous. and my questions a little earlier apparently no one here knows(

 
Koldun Zloy:

Hard in training, easy in battle.

That's right! I downloaded the Visual Studio manual from Microsoft... 14,000 pages... o_o
 
Aleksey Mavrin:

Roman, tried to understand, but a little failed, try to reword it to be clearer and more unambiguous. and my questions a little earlier apparently no one here knows(

Does it matter which of these things to select, if the checkbox GENETICS is unchecked (here, this checkbox is hidden behind the drop-down list), because when unchecked - ALL values of optimized parameters will be passed anyway?


 
Roman Shiredchenko:

Does it matter which of these things is selected if the GENETICS checkbox is unchecked (here the checkbox is hidden behind the drop-down list), because with the checkbox unchecked - ALL values of the optimised parameters will be passed anyway?


It doesn't. The results will be obtained for all combinations of EA's parameters. And you can sort them any way you want.