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

 
SanAlex:

it's like getting in a car and going three ways

\\\\\\\\\\\\\\\\\\\\\\\\\\\

although you could create a multi-currency Expert Advisor - for each of them a separate function

You can't test a multi-currency one in MT4

 
MakarFX:

you cannot test multicurrency in MT4

Yes ! I'm trying to do it right now and it's not working. - it doesn't work like in mt5 for some reason

 
Good afternoon, need help, how can you copy an array of structures, i.e. need an ArrayCopy analogue for an array of structures. Thanks in advance.
 

Please advise, in the strategy tester MT4, when testing owls, you can set the size of the deposit (100, 1000, etc.), as I understand it does the tester itself.

Can you configure the tester to add $100 to the deposited amount, and testing continues till the date specified?

 
законопослушный гражданин:

Please advise, in the strategy tester MT4, when testing owls, you can set the deposit size (100, 1000, etc.), as I understand it does the tester itself.

Can I set it up in some way, so if I withdraw 100$, the tester will add 100$ to my deposit again and testing will continue till the selected date?

no

What for?

 
MakarFX:

no

and for what?

for adjusting the owl settings

 
законопослушный гражданин:

to adjust owl settings

law-abiding citizen:

Can you tell me please, in the strategy tester MT4, when testing owls, you can set the size of the deposit (100,1000, etc.) As I understand it makes the tester itself.

Can you configure the tester to add $100 to the deposit, and testing continued till the date?

Do you want to experiment and find out how much money you need to get by?

For a tester - make a big deposit and not too small lot... Calculate the load, how much free margin you need, add to the Expert Advisor the required statistics and give it to OnTester

 
законопослушный гражданин:

Please advise, in the strategy tester MT4, when testing owls, you can set the deposit size (100, 1000, etc.), as I understand it does the tester itself.

Is it possible to configure the tester to add $100 to the deposit, and testing continued till the date specified?

there is no such function in MT4

but MT5 has it all

to the question "will there be such a functional in MT4?" the developers clearly wrote that development of MT4 terminal was stopped - no


alas, if you want a good and high quality tester - you have to use MT5

 
законопослушный гражданин:

to adjust the owl settings

Take the maximum deposit and the minimum lot and then look at the drawdown at the end of the test.
 

Hello. Please help me to understand.

In the indicator properties, the arrays are declared:

double    ZigZagBuffer[];     
double    HighMapBuffer[];    
double    LowMapBuffer[];     

Then we set what they will be used for.

void OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,ZigZagBuffer,INDICATOR_DATA);
   SetIndexBuffer(1,HighMapBuffer,INDICATOR_CALCULATIONS);
   SetIndexBuffer(2,LowMapBuffer,INDICATOR_CALCULATIONS);
....

  }

Then in int OnCalculate we write the value 0.0

int OnCalculate(const ...

                        )
  {
  ...

   if(prev_calculated==0)
     {
      ArrayInitialize(ZigZagBuffer,0.0);
      ArrayInitialize(HighMapBuffer,0.0);
      ArrayInitialize(LowMapBuffer,0.0);
     } 
  ...
  

Then we write the value of ZigZagBuffer[i] into res when the condition for the last hundred bars is fulfilled,


 ...
while(extreme_counter<ExtRecalc && i>rates_total-100)
        {
         res=ZigZagBuffer[i];
         if(res!=0.0)
            extreme_counter++;
         i--;
        }
      i++;
      start=i;
 ...


The question is where do the other values in ZigZagBuffer[i] come from besides 0.0 ?

When the debugger runs a loop for the last 100 bars, other values except 0.0 are jumped out and therefore extreme_counter is increased?

Reason: