Please explain what could be wrong with this function? - page 3

 
I placed it on EURUSD, USDJPY, NZDUSD charts - all M15. The Expert Advisor has the following condition: if((int)mqlDateTime.hour==12)...
 
Karputov Vladimir:
Are you trying to get data from an OTHER character? Without checking?(Organisation of data access)
What alien symbol? It is written that there are two copies of the Expert Advisor on different symbols.
 

This discussion was a long time ago and it was about MQL4:

Forum on trading, automated trading systems and trading strategy testing

Service Desk. Complaints, suggestions.

Alexey Kozitsyn, 2015.10.29 14:27

...

Support Team2015.10.29 10:41
In order to get actual data from someone else's symbol-period you need to access this data more often than once every 10 seconds. Or to access this data from an Expert Advisor, e.g. using iTime (then the data can be accessed at least once every 3 minutes)
...

Probably the same story here: advisor on M15 chart, trying to get data from H1 and D1 period.

 
Karputov Vladimir:

The discussion was a long time ago and it was about MQL4:


Probably the same story here: EA on M15 chart, trying to get data from H1 and D1 period.

I read the whole post and did not see anything similar. I think there is a different problem there, despite the similarity.
 
Alexey Viktorov:

In your code you are getting information from someone else's period. You need to update the information via CopyTime().
 
Karputov Vladimir:
Relevant, please.

All that has been written and is on point.

How did the experiment with three copies of the EA on different currencies end?

 
Alexey Viktorov:

All that has been written and is on point.

How did the experiment with three copies of the EA on different currencies end?

In one terminal (on M15) on one symbol did not work - I'm 99% sure that the problem is that using someone else's timeframe we have to keep "jerking" the history. I think it's better to do it through CopyTime().
 
Karputov Vladimir:
In your code you get information from another period. You need to update it via CopyTime().

So SeriesInfoInteger(_Symbol, PERIOD_D1, SERIES_LASTBAR_DATE) may not give a valid date? Isn't it an error in mql5? If not, the SDs could have announced it immediately and not frayed nerves. And if there is still an error, I think you have to must muster enough courage to say that you are still unable to fix it and at least offer this way to circumvent the problem.

What am I wrong about? Because according to the documentation, the function should return the time of the requested period. And there are no reservations in documentation.

Why do you delete posts that contain evaluations of SD? Let everyone think that everyone there is white and fluffy? The reviews of Stalin have also been suppressed, but only in a tougher way.

 
Alexey Viktorov:

So SeriesInfoInteger(_Symbol, PERIOD_D1, SERIES_LASTBAR_DATE) may not give a valid date? Isn't it an error in mql5? If not, the SDs could have announced it immediately and not frayed nerves. And if there is still an error, I think we must must muster enough courage to say that we are still unable to fix it and at least offer this way of handling the problem.

What am I wrong about? Because, according to the documentation, fnction should return the time of the requested period. And there are no reservations in the documentation.

...

It is not a mistake. You have been working on someone else's timeframe. In such a case, you have to take care of that the data on someone else's timeframe is up-to-date.

I do not see any alternative, personally.

 
Karputov Vladimir:
In one terminal (on M15 timeframe there were EAs) it didn't work on one symbol - I'm 99% sure that the problem is that when using someone else's timeframe you need to "jerk" the history all the time. I think it's better to do it via CopyTime().

Vladimir, this problem doesn't occur in the Strategy Tester... Why such a trouble? Or because there is only one Expert Advisor in the Strategy Tester?

I also suggested in the SD that the only change was that I put the second EA on a different pair...

Reason: