[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 292

 
Urain >> :

This directive requires that the file to be included must also be located on another computer in directory include, and in general, do not rack your brains when writing everything on one sheet, allocate a piece of code in the form of a function, bury it at the end of the sheet to make it work and no enabling/disabling should complicate your life. Directives #include and #import are necessary (imho) for writing a program complex with more than 1000 lines and consisting of several dozens of separate programs, otherwise they are more confusing than helpful.

Of course you're right, there's no question. But I do need it.

But it is written that "...I can also add that ex4 file is self-sufficient - for it to work,
does not require include the source codes of custom functions.
The ex4 file can be copied, shared with other traders and used there.

It is complete regardless of the technology of its obtaining."

Or am I misunderstanding something?

 
so pass the ex4, why pass the mq4 and compile?
 
alsu >> :
so pass the ex4, why pass mq4 and compile it?

As I understood from the tutorial, the Expert Advisor is passed in mg4 and the include file with it is in ex4. Thus, the Expert Advisor code is visible, while the include file is not, but it should work.

 
gvi2504 >> :

As I understood from the tutorial, the Expert Advisor is transferred to mg4, and the included file with it is attached to ex4. It turns out, that the code of the Expert Advisor is visible, but the include file is not, though it should work.

No inclusion or import is attached to mg4 at compile time and only to compile the whole file, so no matter how many files you call through import or inclusion bilio or declarations they will be in every compiled ex4. So I say to you, don't bother any space saving by including files you will not get all on one sheet and frequently used, at least exported to library and copied from there through Ctrl-C Ctrl-V and it is already on your sheet without any steaming and calls. Good luck.

 
No, you got it wrong. You have to understand it as it is explained to you. If you want to pass the source code, pass it with all the included files (mqh). If you want to protect the code but keep the functionality, pass the compiled ex4 file
 
eh ooh-hem:)
 
alsu >> :
eh ooh-nem:)

I get it, I've baffled everyone with my question. >> thank you very much. I'll leave you to it. Good night, then.

 

Good morning, goodnight Dear Many-experienced forum users, I have 2 questions for you so far=)

1) I made a trading system and am testing it in an Alpari demo account... The accuracy of the testing says 25% but everything is set to the max ... is there a way to increase the accuracy to at least 99%=)

2) How can I close an open position in mql before the swap close?

and what is the best time before 00.00 (I take it this is the server time?) to close the position?



THANK YOU ALL!!!

 
artem.b.123 писал(а) >>

Good morning, goodnight Dear Many-experienced forum users, I have 2 questions for you so far=)

1) I made a trading system and am testing it in an Alpari demo account... The accuracy of the testing says 25% but everything is set to the max ... is there any way to increase the accuracy to at least 99%=)

2) How can I close an open position in mql before the swap close?

and what is the best time before 00.00 (I understand this is the server time?) to close the position?

THANK YOU ALL!!!

On the minutes 25% is the maximum. On other timeframes you might get higher.

 

How do I add up datetime variables? Suppose I write it like this:


if (Period() == 60)
  {
   datetime OpenH1 = iTime(Symbol(),Period(),0);
   datetime NextOpenH1 = OpenH1 + '01:00:00'; // Как парвильно???
  }
Reason: