Errors, bugs, questions - page 3146

 

There's something not clear in the tester

I ask for 1 month's history, it loads for "100" years.

Why?



 
Vitaly Muzichenko #:

There's something not clear in the tester

I ask for 1 month's history, it loads for "100" years.

What for?

Not a hundred years, just 1 year.

You should always leave the available space before the requested interval for the indicators to calculate correctly, and not to start from zero.

And so that newcomers don't ask questions about missing this or that data.

 
Valeriy Yastremskiy #:
Record the last and penultimate asc and bid and count the difference.
I understand that. What's important to me is consistency. So far my thoughts are as follows: since it is a position, it should be referred to. For this, we start enumerating all positions through the loop, then we get its ticket and after that the position's opening time. Declare array with ticks MqlTick ticks[ ]. Counting some time from the position opening time, write ticks into the tick array through CopyTickRange. Then apply ArraySetAsSeries to the tick array, if possible. And apply the difference between the last and the last but one bid and ask, which you've described, to the last two ticks of that array. But so far this is just a thought, maybe someone has already done this and has an example. Respectfully.
 
MetaQuotes #:

Not a hundred years, but just 1 year.

You should always leave space available before the requested interval, so that indicators are calculated correctly, rather than starting from scratch.

And so that newcomers do not ask questions about the lack of certain data.

How do you " leave space before the requested interval" ? I'm doing Expert Advisor test, that uses custom indicator from 2021, in the real EA this indicator is plotted correctly in this timeframe, but in the test it looks like it's starting from zero and therefore the results are incorrect...

 
Wizard #:
This I understand. Consistency is important to me. So far my thoughts are as follows: since it is a position, we should address it. For this, we start looping through all positions, then we get its ticket and then the time of position opening. Declare array with ticks MqlTick ticks[ ]. Counting some time from the position opening time, write ticks into the tick array through CopyTickRange. Then apply ArraySetAsSeries to the tick array, if possible. And apply the difference between the last and the last but one bid and ask, which you've described, to the last two ticks of that array. But so far this is just a thought, maybe someone has already done this and has an example. Respectfully.

For MT4 it is simple. There, the order opening is tied to a tick, the user does not see how the position is filled. But in 5 it does. He or she sees trades when the position is filled. And a position can be filled more than one tick. This is an example. But the logic is correct. Although, for me, it is more correct to do it based on hot pursuit. After the triggering of a pending order or a market order, at the moment of obtaining an answer on the position with the order ticket, obtain data about price and time of the opening and look for the nearest tick by price and time. The problem is that the response may only come on the next tick or after a tick. There is no guarantee.

 
MetaQuotes #:

Not a hundred years, but just 1 year.

You should always leave space available before the requested interval, so that indicators are calculated correctly, rather than starting from scratch.

And so that newcomers do not ask questions about the lack of certain data.

If you could specify in indicators something like #property indicator_bars_need it would be just fabulously convenient.

and the tester would simply take the biggest value, if this parameter is present in several indicators.

There is an opposite situation when one needs as much history as possible, one year is not enough. That is why my last client was surprised why the tester collected so few historical extrema (according to the indicator algorithm).

 
Andrey Dik #:

If you could specify something like #property indicator_bars_need in indicators, it would be really great.

and the tester would just take the highest value, if this parameter is present in several indicators.

Property can't adjust to the parameters. It's not fabulous anymore )

 
Andrey Khatimlianskii #:

Property can't adjust to the parameters. That's not fabulous anymore ) )

))

The point of my proposal is to allow to indicate how much history is required in the indicator for the calculations.

 
Yerkin Sagandykov #:

how to" leave a space before the requested timeframe" ? I'm testing an Expert Advisor that uses a custom indicator from 2021 , the real indicator is drawn correctly for this timeframe, but in the test it looks like it starts from scratch and therefore its results are not correct .

Do you have a problem with having extra guaranteed data?

Not enough memory?
 
No answer, no word. I'll ask abouthttps://www.mql5.com/ru/forum/383809 here.
Расширение стандартной линейки таймфреймов в сторону более высоких периодов
Расширение стандартной линейки таймфреймов в сторону более высоких периодов
  • 2021.12.11
  • www.mql5.com
Уважаемые MetaQuotes! Давно назрела необходимость в более высоких ТФах в Metatrader и MQL ! Планируется ли повысить линейку периодов за пределы MN...