Questions from Beginners MQL5 MT5 MetaTrader 5 - page 238

 
forexman77:

It takes a lot of time to optimize compared to MQL4.

In 4 I use new bar check, on it I write the value of custom indicator, and stop and profit trailing bars are calculated all the time.

Due to this design the optimization time is considerably reduced.

In MQL5it is not clear whether it will work .

If I understand correctly, the fifth version has no Close[]arrays , I need to request data and copy it to an array to get the price array, like for an indicator.

2.I will logically assume that first you should request quotes and write them in the buffer, and only then, after checking a new bar, update the value of the indicator?

3.I am attaching the EA that I use as a template. Check it out, maybe I have some obvious errors somewhere that are increasing the testing time.

4.Another thing I noticed with a single run is that the first half goes much faster than the second half. What could this be related to?

5. How else can I reduce the optimization time?

4. I've also noticed that the testing process is very fast at the beginning, then slows down and at the end it's very slow.
 
paladin800:
4. I've also noticed that the testing process is very fast in the beginning, but then slows down and at the end it's very slow.
It's probably related to this.
 
Reshetov:
  1. Right
  2. Also correct.
  3. Have a look at the code. My advice would be to use the standard library.
  4. Who the hell knows? Does it seem to make no difference to me?
  5. Take advantage of cloud computing.
paladin800:
4. I also noticed that the testing process is very fast in the beginning and then slows down and at the end the testing is very slow.
Fleder:
Probably has something to do with it.

Thanks! Here's a good one on this topichttps://www.mql5.com/ru/forum/23162 (second post, two links)

There are a lot of letters and code. I have to think and read a lot).

One more subject matter, there is an Expert Advisor that has about 12 variables for optimization. At the bottom of the steps it turns out two or three million, the optimization will cost

prohibitively expensive in the cloud, even on control points. At about a hundred thousand quid it was. But, only in the fifth metatrader can you get the optimization of the quality you need.

Порционное вычисление в индикаторе
Порционное вычисление в индикаторе
  • www.mql5.com
Индикатор производит вычисление одного значения для бара достаточно длительное время (запрос к БД, вычисление на стороне БД, возврат значения функции).
 

forexman77:

And also on a topic, there is an EA with about 12 variables to optimise. At the bottom of the steps you get two or three million, the optimisation will be

prohibitively expensive in the cloud, even on control points. At about a hundred thousand quid it was. But, only in the fifth metatrader is it possible to get the optimization of that quality.

I have EAs with 20 input parameters of which 18 are optimizable. I optimize without cloud at all because the speed of optimization + forward testing is acceptable. Standard library has been used in the code.
 
Reshetov:
I have EAs with 20 input parameters, of which 18 are optimisable. I optimise without cloud at all, as the speed of optimisation + forward testing is acceptable. I have used the standard library in my code.
Thank you! This is very interesting. I must be doing something wrong. I have to study this subject.
 

Hello.

I want to know the short name of the indicator on the chart. I have made a primitive script. But the compiler swears - 'IndicatorName' - function not defined. How do I get my own?

//+------------------------------------------------------------------+
//|                                                   TestScript.mq5 |
//|                        Copyright 2014, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   string name=IndicatorName(0,0);
   Alert("Короткое имя индикатора - ",name);
  }
 

There is an indicator that wants to draw one of its buffers in the main window chart and the other in an additional window. I do not want to make 2 different indicators. How to explain to the computer what to do or it is not possible in MT5?

 
RedFish:

Hello.

I want to know the short name of the indicator on the chart. I have made a primitive script. But the compiler swears - 'IndicatorName' - function not defined. How do I get my own?

The compiler tells you that there is no such function(IndicatorName). Use theChartIndicatorName() function.
 
YAndrey:

There is an indicator that wants to draw one of its buffers in the main window chart and the other in an additional window. I do not want to make 2 different indicators. How to explain to the computer what to do or it is not possible in MT5?

We can create two separate indicators. And place one of them on the chart from the other using theIndicatorCreate() function.
 
tol64:
The compiler tells you that there is no such function(IndicatorName). Use theChartIndicatorName() function.
Thanks tol64.