MT4 tester does not give information from other timeframes

 
In the process of learning MQL4 I found out that at least my tester does not give information
from other TFs. Here is the check code, it can be attached to any Expert Advisor. In my tester
only the indications of the TF are changing, others stay at the same place.
Comment (
"\n", " -----------1------ = ",iOpen(Symbol(),1,1)," - ", iClose(Symbol(),1,1),
"\n", " -----------2------ = ",iOpen(Symbol(),5,1)," - ", iClose(Symbol(),5,1),
"\n", " -----------3------ = ",iOpen(Symbol(),15,1)," - ",iClose(Symbol(),15,1),
"\n", " -----------4------ = ",iOpen(Symbol(),30,1)," - ", iClose(Symbol(),30,1),
"\n", " -----------5------ = ",iOpen(Symbol(),60,1)," - ", iClose(Symbol(),60,1),
"\n", " -----------6------ = ", iOpen(Symbol(),240,1)," - ", iClose(Symbol(),240,1),
"\n", " -----------7------ = ",iOpen(Symbol(),1440,1)," - ", iClose(Symbol(),1440,1),
"\n", " -----------8------ = ",iOpen(Symbol(),10080,1)," - ", iClose(Symbol(),10080,1),
"\n", " -----------9------ = ",iOpen(Symbol(),43200,1)," - ", iClose(Symbol(),43200,1));
Tried each on every TF, same story - readings change only for that TF
on which is tested. The Internet is not clearing the situation.
Please advise, is it a fix or i am asking not there.
thanks for attention!
 
it is a fact. :(
And the current values are standing, i.e. from real time.
And when testing on formed bars with a new bar, the previous one changes... :О)
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_style1 0
#property indicator_color1 Orange
#property indicator_width1 2
#property indicator_style2 0
#property indicator_color2 BlueViolet
#property indicator_width2 2
extern bool Test=false;
//03/04/10
//SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);

//---- buffers
double DMA[];string PARA;int hFile;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,DMA);
SetIndexShift(0,0);
SetIndexLabel(0,"inv");
PARA=Symbol();
if (Test) hFile=FileOpen("Dt"+Symbol()+Period()+".csv",FILE_CSV |FILE_WRITE,";");


//if (iClose(PARA,0,0)<0.00001) {Alert (PARA," - not presents...");deinit();
// return (-1);}
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
if (Test) FileClose(hFile);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{

//----
int counted_bars=IndicatorCounted();
int i,N;double Value;
N=Bars-counted_bars;

if(counted_bars<0) return(-1);
//---- last counted bar will be recounted

if (N==0) return(0);

if (Test){ FileWrite(hFile,"--1 ",StrTime(iTime(Symbol(),Period(),1)),iClose(PARA,0,1));
FileWrite(hFile,"--0 ",StrTime(iTime(Symbol(),Period(),0)),iClose(PARA,0,0));
}
for (i=N-1; i>=0; i--)
{
Value=iClose(PARA,0,i);

// Print (i,"=",Value);
DMA[i]=Value;
}

return(0);
}
//+------------------------------------------------------------------+
string StrTime(datetime IT){
return(StringConcatenate(TimeYear(IT),".",TimeMonth(IT),".",TimeDay(IT)
, "-",TimeHour(IT),"^",TimeMinute(IT),"^",TimeSeconds(IT)));
}
As a result, we have in the tester
0
2009.2.3-10^15^0
1.2849

1
2009.2.3-10^15^0
1.2844

0
2009.2.3-10^30^0
1.2845

1 2009.2.3-10^30^0 1.2852
0 2009.2.3-10^45^0 1.2852
1 2009.2.3-10^45^0 1.2841
0 2009.2.3-11^0^0 1.2841
1 2009.2.3-11^0^0 1.2834
0 2009.2.3-11^15^0 1.2833
1 2009.2.3-11^15^0 1.2814
0 2009.2.3-11^30^0 1.2814
1 2009.2.3-11^30^0 1.2813
0 2009.2.3-11^45^0 1.2813
1 2009.2.3-11^45^0 1.2823
0 2009.2.3-12^0^0 1.2822
1 2009.2.3-12^0^0 1.281
0 2009.2.3-12^15^0 1.281
1 2009.2.3-12^15^0 1.2824
0 2009.2.3-12^30^0 1.2823
1 2009.2.3-12^30^0 1.2829
0 2009.2.3-12^45^0 1.2829
1 2009.2.3-12^45^0 1.2824
0 2009.2.3-13^0^0 1.2824
1 2009.2.3-13^0^0 1.2835
0 2009.2.3-13^15^0 1.2835
1 2009.2.3-13^15^0 1.2838
0 2009.2.3-13^30^0 1.2838
1 2009.2.3-13^30^0 1.2836
0 2009.2.3-13^45^0 1.2836
 
vladv002 писал(а) >>
In the process of learning MQL4 I found out that at least my tester does not give information
from other TFs. Here's the check code, it may be attached to any Expert Advisor.
It may be hanged on any Expert Advisor, in my tester only indications of the TF are changing.
Comment (
"\n", " -----------1------ = ",iOpen(Symbol(),1,1)," - ", iClose(Symbol(),1,1),
"\n", " -----------2------ = ",iOpen(Symbol(),5,1)," - ", iClose(Symbol(),5,1),
"\n", " -----------3------ = ",iOpen(Symbol(),15,1)," - ", iClose(Symbol(),15,1),
"\n", " -----------4------ = ",iOpen(Symbol(),30,1)," - ", iClose(Symbol(),30,1),
"\n", " -----------5------ = ",iOpen(Symbol(),60,1)," - ", iClose(Symbol(),60,1),
"\n", " -----------6------ = ",iOpen(Symbol(),240,1)," - ", iClose(Symbol(),240,1),
"\n", " -----------7------ = ",iOpen(Symbol(),1440,1)," - ", iClose(Symbol(),1440,1),
"\n", " -----------8------ = ",iOpen(Symbol(),10080,1)," - ", iClose(Symbol(),10080,1),
"\n", " -----------9------ = ",iOpen(Symbol(),43200,1)," - ", iClose(Symbol(),43200,1))
I tried it on every TF, the same story - readings change only for the TF
on which it is tested. In-network hasn't cleared the situation.
Please advise, is it a subject for treatment or I'm asking not there.
Thank you for your feedback!


With the right approach, everything works fine.
 
Vinin >>:


При правильном подходе все работает нормально.


I'm sorry, could you go into more detail here?
 
vladv002 писал(а) >>


Excuse me, could you go into more detail here?


And what is the problem to be solved?

 
Vinin >>:


А какую задачу нужно решить?

Here's what we get

1 2009.7.10-22^45^0 1.39478
0 2009.7.10-23^0^0 1.39476
--0M 2009.7.10-23^0^0 1.3488
1 2009.7.10-23^0^0 1.39476
0 2009.7.10-23^15^0 1.39475
--0M 2009.7.10-23^15^0 1.3488
1 2009.7.10-23^15^0 1.39475
0 2009.7.10-23^30^0 1.39472
--0M 2009.7.10-23^30^0 1.3488
1 2009.7.10-23^30^0 1.39409
0 2009.7.10-23^45^0 1.39409
--0M 2009.7.10-23^45^0 1.3488
1 2009.7.10-23^45^0 1.39353
0 2009.7.13-1^0^0 1.39461
--0M 2009.7.13-1^0^0 1.3488
If in the code above we change the output block to

if (Test){ FileWrite(hFile,"--1 ",StrTime(iTime(Symbol(),Period(),1)),iClose(PARA,0,1));
FileWrite(hFile,"--0 ",StrTime(iTime(Symbol(),Period(),0)),iClose(PARA,0,0));
FileWrite(hFile,"--0M ",StrTime(iTime(Symbol(),Period(),0)),iClose(PARA,1,0));
}

 
Vinin писал(а) >>


>>What problem do you have to solve?


Yes, I'm curious too. Customers often order multi-timeframe crafts, and you can only test them live...
And have to wait weeks for payment.

Enlighten me how to make iClose-iOpen functions work with timeframe other than zero and the timeframe being tested. And to make the code for the tester coincide with the code for the real one.
 
api >>:


Да, мне тоже интересно. Заказчики часто заказывают мультитаймфреймовые поделки, а тестировать можно только вживую...
И приходится ждать оплаты неделями.

Просветите, как заставить работать функции iClose-iOpen и пр. с таймфреймом отличным от нуля и от тестируемого таймфрейма. и чтобы код для тестера совпадал с кодом для реала.

And an expert cannot be tested as a matter of principle.

It's not enough that a multi-currency zass...

 
Vinin >>:


А какую задачу нужно решить?

Quite simple - we draw 9 squares in a line on the chart - we will shade according to the indicator readings
which we'll use for the test - green or red.
I am trying to understand in details what moves by ticks, but there is a trap.
There is some information on the Internet, but not at https://www.mql5.com/ru/articles/1385. There is a lot of water in other articles but
not the same. I tried to substitute variables and put them in an array, but the result is zero, or rather
The result is zero, or to be more precise, there is no result because there is no data.
In order to correctly assess the situation, let alone write a program, I need to know exactly
Now it turns out that one thing is real and the other is wrong in the tester.
Remains to check the demo in ON-Line - have not checked yet!
Yesterday I noticed something wrong.

 

The tester only sees the last 1000 bars at the start of testing. If you set an Expert Advisor on M1, you will not see more than 1000 minutes ago (at the moment of testing start).

I solve this problem by setting the tester's start date much earlier, and in the Expert Advisor I prescribe the required date.

 
sak120 >>:

Тестер видит только 1000 последних баров в начале тестирования. Если поставил эксперт на M1, то дальше 1000 минут назад не увидишь (в момент старта тестирования).

Решаю эту проблему постановкой даты старта тестера намного раньше, а в самом эксперте прописываю нужную дату.

It has been claimed that minute data is used to generate the ticks.

But the minute value itself, as seen in my example - the current value - has nothing to do with the minute history.

And where did you get the information about 1000 bars?

Maybe you configured the history properties that way?

But it's not so in my case...

----

It is a fact that there is no more than 100 bars of data before the start of the test period.

This is also a fact. :(

Reason: