Questions from Beginners MQL5 MT5 MetaTrader 5 - page 29

 
marketeer:
induk_real1 is supposed to be an array.

Thank you very much! Very helpful.

Just an hour error on CopyBuffer "possible loss of data due to type conversion" Do you know what it could be because of?

Документация по MQL5: Основы языка / Типы данных / Приведение типов
Документация по MQL5: Основы языка / Типы данных / Приведение типов
  • www.mql5.com
Основы языка / Типы данных / Приведение типов - Документация по MQL5
 
Aid:

Just an hour error on CopyBuffer "possible loss of data due to type conversion". Do you know what could be causing it?

It's not an error but a warning. It appears when a value of a variable of one type is assigned to a variable of another type. For example,

int i;
double d=0.005;
i=d; 
 
Yedelkin:

This is not an error, but a warning. It appears when the value of a variable of one type is assigned to a variable of another type. For example,

I get it now. Thank you very much!
 

Can you please tell me how to specify a timeframe via a variable? Doing so, but the error...

input string TF_work="PERIOD_MN1"; 
string TF_signal="PERIOD_MN1";


if(TF_work=="PERIOD_D1")
     {
      TF_signal="PERIOD_H4";
      Alert("Рабочий ТФ = ", TF_work, "Сигнальный ТФ = ",  TF_signal);
     }
// А в следующей строке компилятор выдает ошибку
 if(Bars(_Symbol,TF_signal)<60) // общее количество баров на графике меньше 60?
     {
      Alert("На графике меньше 60 баров, советник не будет работать!!");
      return;
     }
 
ENUM_TIMEFRAMES tf=PERIOD_H1;   // Рабочий ТФ
 
Good evening! I've just bluntly pyrized the function from four to five, compiled it. No errors!!! I distinctly remember that there's something wrong, some handles... Please tell me, if you're not too lazy, what will it say in this form? I'm curious...
double parab(string symb)
{
double parabolic = iSAR(symb,TF_Price,Step,MaxS,0);

if(iClose(symb,TF_Price,0)>parabolic) return(1);
if(iClose(symb,TF_Price,0)<parabolic) return(-1);
return(0);
 
Karlson:

Thank you.

But I understand that you can't re-set it in the process, only the initially selected constant?

 
Dimka-novitsek:
Good evening! I've just bluntly pyrized the function from four to five, compiled it. No errors!!! I distinctly remember that there's something wrong, some handles... Please tell me, if you're not too lazy, what will it say in this form? I'm curious...
-1
 
Thank you!
 

Did a run on the tool on H1.

about 10% was done using the genetic algorithm.

Pressed stop and changed the parameters.

Now on startup - there is an "authorisation" in the agents.

If I change the instrument or period, everything starts to work.

I reset the terminal and restarted the agents - does not help.

I can't reboot.)

Please advise what for trouble?

Генетические алгоритмы - это просто!
Генетические алгоритмы - это просто!
  • 2010.05.25
  • Andrey Dik
  • www.mql5.com
В статье автор расскажет об эволюционных вычислениях с использованием генетического алгоритма собственной реализации. Будет показано на примерах функционирование алгоритма, даны практические рекомендации по его использованию.