[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 996

 
It's always like this, first answer a question, then write an advisor, and then endlessly change it as a new idea arrives, poor artmedia, so soon all the programmers will be gone, there will be no one to help)
 

Techno totally agree with you, but I'm asking you to come from a thread and not somewhere else.

Any question from a beginner, so as not to clutter up the forum. Professionals do not go by. There is nowhere without you.

moderators may leave it on a separate thread if the discussion does not fit into the main thread.

And then the case is purely voluntary, I'm not asking to write for me all the work, and as I said above, I'm learning, and I think that those newcomers who are just joining, too, learn a lot,

 
ex_kalibur:

Techno totally agree with you, but...

Well, so far, judging from the above written ToR you suggest that everything should be written for you. The theme is designed specifically for questions that arise in beginners during the programming and training, and not for the fulfillment of all their desires)
 
So if everyone agrees with the terms of reference and all clear, then proceed. First, I attach all the template files
Files:
 
Techno:
So far, judging from the above written ToR, you propose to have everything written for you. The topic is designed for questions that beginners have during programming and training, not for fulfilling all their desires)
I asked questions at first, but then it became very complicated, and since the program has a complex structure with incoming files, it is not possible to show the code, and so I will start all over again and pick up where I left off
 

I want to rewrite my EA from mq4 to mq5. Can you advise how much faster the EA will be tested and optimized in mq5?

 
ex_kalibur:
So if everyone agrees with the terms of reference and all clear, then proceed. First I attach all the template files

Why so complicated?
 
Vinin:

Why so complicated?
Because I'm so stumped that I can't even ask a competent question
 

Let's start with the Criterion function

To determine the channel we will use the ZigZag indicator, respectively, let's set its parameters,

//--------------------------------------------------------------------

// Criterion.mqh

//--------------------------------------------------------------- 1 --

// Функция вычисления торговых критериев.

// Возвращаемые значения:

// 10 - открытие Buy

// 20 - открытие Sell

// 11 - закрытие Buy

// 21 - закрытие Sell

// 0 - значимых критериев нет

// -1 - используется другой финансовый инструмент

//--------------------------------------------------------------- 2 --

// Внешние переменные:

eextern int ExtDepth=12;

extern int ExtDeviation=5;

extern int ExtBackstep=3;

//-----------------------------------------------------------------------

int Criterion() // Пользовательская функция

{

string Sym="EURGBR";

if (Sym!=Symbol()) // Если не наш фин. инструмент

{

Inform(16); // Сообщение..

return(-1);

} // .. и выход

double

High,

Low ;

//------------------- Параметры технич. индикат: -------------------

High =iCustom (NULL,0, "Zigzag",ExtDepth,ExtDeviation, ExtBackstep,1,bar);

Low = iCustom (NULL,0, "Zigzag",ExtDepth,ExtDeviation, ExtBackstep,2,bar);

int TicSpred=100;

double Spread[1000];

if (Spread[0]==0) {ArrayInitialize(Spread,(Ask-Bid)/delta);}

for (int q=TicSpred;q>0;q--){

if (Spread[q]==0) Spread[q]=(Ask-Bid)/delta;}

for (q=TicSpred;q>0;q--) {Spread[p]=Spread[p-1];}

Spread[0]=(Ask-Bid)/delta;

double CountedSpred;

for (q=0;q<bars;q++){CountedSpred=CountedSpred+Spread[p];}

//--------------------------------------------------------------- 5 --

// Вычисление торговых критериев

if (Bid <= Low && Ask< High -CountedSpred/2*delta )

return(10);

if ( Bid>= High )

return(20);

 

// Calculation of trading criteria

if (Bid <= Low && Ask< High -CountedSpred/2*delta)

return(10);

if ( Bid>= High )

return(20);

Here I got stuck. According to the task we should first obtain the history of average spread, how should I do that?

I want my 100 cell array to be filled completely