Errors, bugs, questions - page 1671

 
A100:
It's too primitive to not work - we're talking about a more complex call like here https://www.mql5.com/ru/forum/1111/page1687#comment_2792721 but with a different type of error

There was just a mistake in your code, so I pointed it out. And in the example on the link there really is something wrong with the compilation.

Upd.

And that your example works if the class object is not only declared, but also used:

void OnStart()
{
   A b;
   Print(b.f1());
}
 
Sergei Vladimirov:

There was just a mistake in your code, so I pointed it out.

Yes, thank you.
 
On the Metaquotes-Demo EURUSD M1 bars have a non-zero volume field. Where do these values come from?
 

The cross-platform becomes more and more important, so the need to unite MQL4 and MQL5 folders into one, so that each terminal thinks that it is working with its own MQL4/5 folder has arisen.

How to do it in portable mode?

 
fxsaber:

The cross-platform becomes more and more important, so the need arises to merge MQL4 and MQL5 folders into one, so that each terminal thinks that it is working with its own MQL4/5 folder.

How to do it?

Stop sitting on two chairs and finally switch completely to MQL5.
 
Karputov Vladimir:
Stop sitting on two chairs and finally switch completely to MQL5.

You tell that to the freelancers. They'll support it! True, your bread will be an order of magnitude smaller.

Do you have an answer to this question?

 
fxsaber:

The cross-platform becomes more and more important, so the need to unite MQL4 and MQL5 folders into one, so that each terminal thinks that it is working with its own MQL4/5 folder has arisen.

How to do it in portable mode?

I've solved it with "mklink /j".
 
Stanislav Korotky:

Please explain why the code below:

?

?

The first date pair contains two different days. IMHO, it should return number of bars equal to 2.

Handling dates in Bars function is absolutely the same as in Copy-functions.

When requesting data in the specified date range, only data falling within the requested interval will be returned, and the interval is specified and taken into account to the nearest second. This means that the opening time of any bar for which a value is returned (volume, spread, value in the indicator buffer, Open, High, Low, Close or Time) is always within the requested interval.

So,if the current day of the week is Saturday, then at an attempt to copy the data on a weekly timeframe with start_time=Last Tuesday and stop_time=Last Friday the function will return 0, because opening time on a weekly timeframe always falls on Sunday, but none of the weekly bars falls into the specified range.

Bar open time on the daily timeframe is 0:00, respectively in the request

time1=2016.09.02 23:55:00 time2=2016.09.05 00:00:00 n=1

On the daily timeframe, the Friday bar is not included into the selection, and only the Monday bar is included into the selection.

 
Alexey Da:

The date handling in the Bars function is exactly the same as in the Copy functions.

The opening time of the bar on the day timeframe is 0:00, respectively, in the query

time1=2016.09.02 23:55:00 time2=2016.09.05 00:00:00 n=1

on the day timeframe the Friday bar is not selected, and only the Monday bar is selected.

It turns out that the last five-minute Friday bar does not belong to the day bar of the same Friday?
 

Where was it going? I didn't notice the change, but I get to the newsfeed in the profile too.