Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1834

 

with Console.ReadKey is particularly nice...

the console still needs to be opened because it's not in MT, it's closed

 
Maxim Kuznetsov #:

with Console.ReadKey is particularly nice...

Console still needs to be opened because it is not in MT, it is closed

This is for testing from the application

 
Igor Makanu #:

if MT5, start small, first connect the test code from Metacquothttps://www.mql5.com/ru/forum/285631

If doing as in the help

then
.

Gentlemen, can you tell me how to do it?

Or maybe someone has an example how to do?

 
Andrey Sokolov #:

If you do as in the help

then
.

Gentlemen, can you tell me how to do this?

Or maybe someone has an example of how to do it?

#import"file_name"
...
#import

The function descriptions follow directly after the #import "module name"directive .

Thenew #importcommand completes the block of function descriptions to be imported.

 
Tretyakov Rostyslav #:

#import"file_name"
...
#import

The function descriptions follow immediately after the #import "module name"directive .

The new #importcommand completes the block of function descriptions to be imported.

Does anyone know why this is so in the help?

Thanks. One less error. Any advice on the rest?


 
Andrey Sokolov #:

Does anyone know why the help is like this?

Thank you. One less thing to worry about. Can you tell me the rest?


Andrey, you have a very strange approach to the study of programming. I've never tried to work with .dll files, but looking through the documentation, I noticed that

#import "имя_файла" 
    func1 define; 
    func2 define; 
    ... 
    funcN define; 
#import

Where's the function declaration in your code?

And then in the example

#import "ExpertSample.dll" 
int    GetIntValue(int); 
double GetDoubleValue(double); 
string GetStringValue(string); 
double GetArrayItemValue(double &arr[],int,int); 
bool   SetArrayItemValue(double &arr[],int,int,double); 
double GetRatesItemValue(double &rates[][6],int,int,int); 
#import

the functions that are supposed to be called from the code are listed...

Where are the functions in your code?

 
Alexey Viktorov #:

Andrey, you have a very strange approach to learning programming. I've never tried to work with .dll files, but after looking at the documentation I noticed

Where's the function declaration in your code?

And then in the example

the functions that are supposed to be called from the code are listed...

Where are the functions in your code?

I haven't got any luck with import of functions, the problem is described in the first post on the previous page.

I tried to do it in another way, like in

https://www.mql5.com/ru/docs/basis/preprosessor/import

I cannot decide yet if I am doing it correctly by the given example or the example is wrong.

 
Greetings. Can anyone advise how to add time trading function to mt4 EA. I want my EA to work from say 00.00 to 23.00 and do nothing for the rest of an hour. Maybe somebody has a piece of code and how to implement it. I have a good idea how to implement this in my EA.
 
Иван Макаров time-trading function to mt4 Expert Advisor? If I want my EA to work from 00.00 to 23.00 and do nothing for the next hour. Maybe somebody has a piece of code and how to implement it. I have a good idea how to implement this in my EA.

Have you even tried it yourself? What didn't work for you? It's easy to do the comparison in lowercase or time format.

 
Andrey Sokolov #:

I haven't been able to import the functions yet, I described the problem in the first post on the previous page.

I'm trying to do it in a different way, as in the help

https://www.mql5.com/ru/docs/basis/preprosessor/import

I cannot decide yet if I am doing it incorrectly by the above example or the example is wrong.

This example is wrong!

I started with these articles

https://www.mql5.com/ru/articles/249

https://www.mql5.com/ru/articles/5563