Errors, bugs, questions - page 64

 

By the way, a great search function has recently appeared in the editor for articles, codebase and the entire MQL5.com site:


 

Doing the calculation on all the bars and seeing the malfunctions, checked the data at the end of the chart and found that on the hourly chart the bars go once a day(shock),

all the stats are fucked up.


Maybe some way to update the chart or something ???

 
Can you tell me, when I compile a function library I get the following error
No exported function or entry point found               1       1
What's the reason? The eh5 file will not be created.
 
sergey1294:
Please advise, when compiling a function library, it generates this error, what is the reason?

This is roughly what the contents of the library should look like

//Function FunctionName
bool FunctionName() export
{
//----------------------------------------------------------------------------//
//Work variables
bool Reset;
//----------------------------------------------------------------------------//

//----------------------------------------------------------------------------//
return(Reset);
//----------------------------------------------------------------------------//
}
The use of"export" is obligatory in mq5, but it should not be in mqh.
 
Interesting:

This is what the contents of the library should look like

The use of "export" is obligatory in mq5 but it should not be in mqh.

Thank you, I couldn't find it in the help, it's not in the help at all and I don't think it was in Quaternary either, how mqh and function libraries should be designed to compile correctly.

P.S found a description in the help.

 
sergey1294:
Thanks, I didn't find this information in the help, it's not available at all and it seems that in Quaternary there was no proper layout of mqh and function libraries for their normal compilation.

When I was making the migration library I also struggled, I had to contact the developers...

PS

I will have to say that it was almost 7 months ago and not everything was working properly yet...

 
sergey1294:

Thank you, I couldn't find this information in the help, it's not there at all and I don't think it was mentioned in Quaternary either, how mqh and function libraries should be properly designed for their normal compilation.

P.S found a description in help.

It's good that you found it, but I will still give you the link to the section Exporting functions:

Description of external functions

The type of external functions defined in another module must be explicitly described. Failure to do so may result in errors during compilation, linking, or program execution. When describing an external object, use the #importkeyword with the module specification.

Examples:

#import"user32.dll".
int MessageBoxW(int hWnd ,string szText,string szCaption,int nType);
int SendMessageW(int hWnd,int Msg,int wParam,int lParam);
#import"lib.ex5".
double round(double value);
#import

Import can be used to very easily describe functions called from external DLLs or compiled EX5 libraries. EX5 libraries are compiled ex5 files that have the library property. Only functions described with the export modifier can be imported from EX5 libraries.

See also

Overloading, Virtual Functions, Polymorphism

 
Urain:

Doing the calculation on all the bars and seeing the malfunctions, checked the data at the end of the chart and found that on the hourly chart the bars go once a day(shock),

all the stats go to hell.


Maybe you need to update the chart or something?


If you dig a little deeper, you will find that the minute bars on that data interval are also stored "strangely" - each day consists of one minute bar, and the High and Close prices of that minute correspond to the High and Close prices of the day bar.

This is due to the fact that minute data is the basic building block for all timeframes in MetaTrader 5. Read more about this in section Organizing data access

 
Rosh:

If you dig a little deeper, you will find that the minutes on that data interval are also stored "strangely" - each day consists of one minute bar, and the High and Close prices of that minute bar correspond to the High and Close prices of the day bar.

This is due to the fact that minute data is the basic building block for all timeframes in MetaTrader 5. You can read more about this in section Organizing data access

Yes, there are no minutes older than 1999 on the demo server. From 1993 to 1999 there are minute bases replacing days.
 
Renat:
Yes, there are no minutes older than 1999 on the demo server. From 1993 to 1999 the minute bases are substituted for days.

Something similar I thought, thanks for the clarification.

It's just a matter of prescribing a function that determines from which bar the full story starts,

Otherwise the expectation for the size of the bar may be severely error.

You can of course make a custom one, but if it's built in (imho) it will help a lot.

Reason: