Errors, bugs, questions - page 55

 
ddd06:

Well...

I don't think it should be like this, do you?

Why shouldn't it be? If there hasn't been a single tick in one minute, then no corresponding minute bar will be formed either. This has been discussed so many times before.
 
stringo:
Why wouldn't it be? If there hasn't been a single tick within one minute, then the corresponding one-minute bar won't be formed either. This has already been discussed many times.

I take the price of a closed minute and write it in the log.

And here's the picture, the bar is formed.

 
stringo:
Why not? If there hasn't been a single tick during one minute, the corresponding one-minute bar will not be formed either. This has been discussed many times.

Wouldn't it be more logical to generate a bar in which all prices are equal to the previous bar's closing price?

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы - Документация по MQL5
 

And on this, I would like to hear a reaction

 
Interesting:

Wouldn't it be more logical to generate a bar in which all prices are equal to the closing price of the previous bar?

And for users for whom such bars are skipped, make a checkmark in settings! I don't want them to be shown.

After all, the indicators are distorted.

 

No ticks, no bars. Before attempting a discussion, look for similar discussions onhttps://www.mql5.com/ru/forum and on our original forum https://www.mql5.com/ru/forum

We have spoken out on this issue many times, our opinion will not change. No ticks - no bars.

MQL4: форум по механическим торговым системам и тестированию стратегий
  • www.mql5.com
MQL4: форум по механическим торговым системам и тестированию стратегий
 
stringo:

No ticks, no bars. Before attempting a discussion, look for similar discussions at https://www.mql4.com/ and on our original forum https://www.mql5.com/ru/forum

We have spoken out on this issue many times, our opinion will not change. No ticks, no bars.

OK, that's really not what we're talking about here.

And on the subject of "No ticks, no bars" we could start a separate thread.

 

I could not get the value of the indicator on the current bar in my multicurrency tester at all (although I don't need it, but still). Here is the construction:

 double Buf[2];  // в начале программы


 Hnd=CopyBuffer(M_Handl[In][AO_D],0,0,2,Buf); // В теле функции OnTimer
 if(Hnd <= 0) {Print("Не удалось скопировать индикатор Ac_D. Error = ", _LastError); PlaySound("alert.wav"); return(-1);}
 Indik[In][AO_D][0] = Buf[1]; // На самом деле это бар № 1
 Indik[In][AO_D][1] = Buf[0]; // А это бар № 2

And I still could not get the 0th bar!?

If you need to copy a predefined amount of data, it's better to do it in astatically allocated buffer to avoid unnecessary memory over-allocation.

No matter what property the receiving array has - as_series=true or as_series=false, the data will be copied so that the oldest element in time will be at the beginning of the physical memory allocated to the array.

According to the documentation, Buf[1] should be the 0th, but it's still the 1st, and Buf[0] is the 2nd.

I was running Multicurrency on EURUSD H1, while I was reading data from AO on EURUSD D1.

 

So you run it on one instrument and try to take the price of the current bar on the other one?

It seems to me that the tick for the second instrument comes later, which is why there is a problem with the current bar.

I see the log mostly does not coincide, but it has coincided once (first and last line).

2010.07.19 15:50:02 Core 1 Time EURUSD2010.07.01 01:34 mas1(EURUSD)-1.22251 mas2(GBPUSD)-1.49516
2010.07.19 15:50:02 Core 1 Time EURUSD2010.07.01 01:33 Time GBPUSD2010.07.01 01:32 mas1(EURUSD)-1.22264 mas2(GBPUSD)-1.49512
2010.07.19 15:50:02 Core 1 Time EURUSD2010.07.01 01:32 Time GBPUSD2010.07.01 01:31 mas1(EURUSD)-1.22241 mas2(GBPUSD)-1.49515
2010.07.19 15:50:02 Core 1 Time EURUSD2010.07.01 01:31 Time GBPUSD2010.07.01 01:30 mas1(EURUSD)-1.22248 mas2(GBPUSD)-1.49523
2010.07.19 15:50:02 Core 1 Time EURUSD2010.07.01 01:30 Time GBPUSD2010.07.01 01:29 mas1(EURUSD)-1.22245 mas2(GBPUSD)-1.4951
2010.07.19 15:50:02 Core 1 Time EURUSD2010.07.01 01:29 Time GBPUSD2010.07.01 01:28 mas1(EURUSD)-1.22257 mas2(GBPUSD)-1.4948
2010.07.19 15:50:02 Core 1 Time EURUSD2010.07.01 01:28 Time GBPUSD2010.07.01 01:28 mas1(EURUSD)-1.2224 mas2(GBPUSD)-1.49467

 

Keyword OnTimer