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

 

Why when I create an arrow.Create(0, "ArrowCheck",0,TimeCurrent(),1.14565) fromMQL5Standard Library the object is created and immediately deleted.

 

Good day to all. I have a ClusterDelta_VolumeProfile_3.5 indicator The data it receives is written to an array, not a buffer. If I understand correctly, these are different things.

So, how can I pull this data from the array to my EA and work with it?

 
voron_026:

Good day to all. I have a ClusterDelta_VolumeProfile_3.5 indicator The data it receives is written to an array, not a buffer. If I understand correctly, these are different things.

So, how can I pull this data from the array to my EA and work with it?

If you have the source, then create a new buffer and write them in this buffer in the indicator, and in the EA take the data from it.

 
Artyom Trishkin:

If you have the source code, create a new buffer and write them in this buffer in the indicator and take the data from it in the EA.


Unfortunately, there is no source code. And the author, of course, will not give it. So, it is a difficult task. I have the source code of the same indicator, but it is in the form of an Expert Advisor. We will try to develop it as an Expert Advisor and then use it.

What can you say about the code?

 

The OnTimer() function in MQL4 does not work in the tester? I read the documentation that "OnTimer() function in tester" should work in MQL5.

 
Nauris Zukas:

The OnTimer() function in MQL4 does not work in the tester? I read the documentation, that "OnTimer() function in tester" should work in MQL5.

In the tester you can do this

OnTick() 
 {
  if(IsTesting()) OnTimer();
  // ...
 } 
 
Vitaly Muzichenko:

In the tester, you can do this

Thank you!

 
Victor Nikolaev:


A small script



Forum on trading, automated trading systems & strategy testing

Any questions from newbies on MQL4, help and discussion on algorithms and codes

Victor Nikolaev, 2017.05.09 13:10


A small script

//+------------------------------------------------------------------+
//|                                                       Decode.mq4 |
//|                                            Copyright 2017, Vinin |
//|                                             http://vinin.ucoz.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, Vinin"
#property link      "http://vinin.ucoz.ru"
#property version   "1.00"
#property strict
#property script_show_inputs
//--- input parameters
input int N=162;  //0..162
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   for (int n=0;n<N;n++)
   {
      int tmp=n;
      int a=MathMod(tmp,3);
      tmp=(tmp-a)/3;
      int b=MathMod(tmp,3);
      tmp=(tmp-b)/3;
      int c=MathMod(tmp,2);
      tmp=(tmp-c)/2;
      int d=tmp;
   
      Print("N=",n,"; A=", 2+2*a, "; B=", b+1,"; C=",c,"; D=", 16+4*d);
   }
  }
//+------------------------------------------------------------------+


Back to this topic again - can't figure out the algorithm how to do this with any numbers.

Please help!!!

I have variables and their range of variation - I get them by calculation:

Vektor -1 или 1

Situation от 1 до 5

N_Etalon от 1 и больше 1


I also have variables for direct actions:

   bool SellPrIMA //запрет на покупку

   bool BuyPrIMA//запрет на продажу

The combination of variables above, should affect them so that the two variables will take different values - I think they can just be included in the counter, but maybe there is a way not to include them so that the overshoot is smaller.

The goal is to make a counter that will go through all combinations during optimization, then identify the bad options, make a list of such combinations, which should result in a filter.

 
Aleksey Vyazmikin:


Back to this topic again - I can't figure out the algorithm to do this with any numbers.

Please help me!

I have variables and their range of variation - I get them by calculation:

Vektor -1 или 1

Situation от 1 до 5

N_Etalon от 1 и больше 1


I also have variables for direct actions:

   bool SellPrIMA //запрет на покупку

   bool BuyPrIMA//запрет на продажу

The combination of variables above, should affect them so that the two variables will take different values - I think they can just be included in the counter, but maybe there is a way not to include them so that the overshoot is smaller.

The goal is to make a counter that goes through all variants of combinations during optimization, then identify bad variants, make a list of such combinations, which should result in a filter.


Use the onTester() function and save the results to a file. And then analyze

 
Victor Nikolaev:

Use the onTester() function and write the results to a file. And then analyse it


Yes, that's clear :) I can't figure out the counter! How do I organise it to do this kind of enumeration?