MT4 tester does not give information from other timeframes - page 5

 
avatara писал(а) >>

Would you be so kind as to correct the code. Just output the correct data from M1.

Testing on m15.
Thanks in advance!


And read the article that Roche advised.

 
Rosh >>:
Вы что, проверяете этот код в режиме визуального тестирования? Почитайте статью Тестер в терминале MetaTrader 4: Это необходимо знать

I read it and not only this article, that's why I'm puzzled - it is written that you can see any TF in test mode,
But in fact iHigh(NULL,PERIOD_D1,0) and similar functions in the tester are only from the current TF.
Perhaps something is wrong with my tester, but it seems I am not the only one, judging by the feedback of people.
Have you checked yourself?

 
Vinin >>:


А статью прочитал, что Рош советовал.

More than once.

Just don't give advice of a similar kind

double arr1[][6];

int init()
  {
   ArrayCopyRates(arr1,Symbol(), tf); // tf - необходимый таймфрейм
   return(0);
  }
or spells - it's all counting for the wrong hands.
I gave you the code - fix it.
A lesson for me and others.
;)
 
vladv002 писал(а) >>

I read it and not only this article, that's why I'm puzzled - it is written that you can see any TF in test mode,
But in fact iHigh(NULL,PERIOD_D1,0) and similar functions in the tester are only from the current TF.
Perhaps something is wrong with my tester, but it seems I am not the only one, judging by the feedback of people.
Have you checked yourself?



Seeing means getting values in the EA.
And in visual testing mode, the sketched indicators get values from real data, not from simulated data.
 
Vinin >>:


Видеть, значит получать значения в советнике.
А в режиме визульного тестирования наброшенные индикаторы получают значения с реальных данных, а не с моделированных.

Yep. from an off-line schedule. ;)

 
avatara писал(а) >>

Yep. from an off-line schedule. ;)

From real data. For correct display of the indicator in this mode it is necessary to overcomplicate it. To check the possibility of obtaining data from different timeframes, it is enough to do in the Expert Advisor Print() of the required values, and then look in the logs.
 
Is that weird? It's working just fine for me. In any tester mode.

//+------------------------------------------------------------------+
//|                                                     test_acr.mq4 |
//+------------------------------------------------------------------+

double arr1[][6];
double arr5[][6];
double arr15[][6];
double arr30[][6];
double arr60[][6];
double arr240[][6];
double arr1440[][6];
double arr10080[][6];
double arr43200[][6];

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
ArrayCopyRates(arr1,Symbol(), 1);   
ArrayCopyRates(arr5,Symbol(), 5);   
ArrayCopyRates(arr15,Symbol(), 15);   
ArrayCopyRates(arr30,Symbol(), 30);   
ArrayCopyRates(arr60,Symbol(), 60);   
ArrayCopyRates(arr240,Symbol(), 240);   
ArrayCopyRates(arr1440,Symbol(), 1440);   
ArrayCopyRates(arr10080,Symbol(), 10080);   
ArrayCopyRates(arr43200,Symbol(), 43200);   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
Comment (
"\n", " -----------1------ = ",arr1[0][1]," - ", arr1[0][4],
"\n", " -----------2------ = ",arr5[0][1]," - ", arr5[0][4],
"\n", " -----------3------ = ",arr15[0][1]," - ", arr15[0][4],
"\n", " -----------4------ = ",arr30[0][1]," - ", arr30[0][4],
"\n", " -----------5------ = ",arr60[0][1]," - ", arr60[0][4],
"\n", " -----------6------ = ",arr240[0][1]," - ", arr240[0][4],
"\n", " -----------7------ = ",arr1440[0][1]," - ", arr1440[0][4],
"\n", " -----------8------ = ",arr10080[0][1]," - ", arr10080[0][4],
"\n", " -----------9------ = ",arr43200[0][1]," - ", arr43200[0][4]);   
//----
   return(0);
  }
//+------------------------------------------------------------------+
 
Vinin >>:

С реальных данных. Для корректного отображения индикатора в таком режиме нужна излишнее его усложнение. Для проверки возможности получения данных с разных таймфреймов достаточно сделать в советнике Print() нужных значений, а потом в логах смотреть.

What are you talking about? We're talking about the tester in general.

 
avatara писал(а) >>

What are you talking about? We're talking about the tester in general.


I'm talking about the tester too. Apparently you didn't read the article very well.
 
Once again to you and Sych.

Can you tell me how to write a correct multitimeframe indicator so that it works correctly in the tester.

The test results would be the same.
For example you can try Tikovsky;)
Run it in a reputable tester for example...