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

 
I have not changed anything, before with the old version of MQL there were no errors, EA did not load the system, but now it does, so I noticed the errors. The tester and online are different things (it's like knowing the way and going through it). I myself tried to remove something from the language and it got worse.
 
bbrisk:

good afternoon all! my construction giving an error when working on the data:

for(int trade = OrdersTotal() - 1; trade >= 0; trade--)

{

if(OrderSelect(trade, SELECT_BY_POS, MODE_TRADES))

{

if(OrderSymbol() == Symbol() && OrderMagicNumber()==1 && (OrderType() == OP_BUYSTOP)

....


Nopending Buyorders, there is one open and in if. Has anyone encountered this problem?

You guys see the function

Print();

Type in your parameters and see what happens, so you know where the error is. The information is printed in the Expert Advisor journal (Expert tab of MT4) and you can also open the file


and copy the data for comparison (file name 20200621 deciphered as 2020.06.21). You can also use DeskPins to have an open file and code or chart visible. Also note file 20200621 must not exceed 4mb, if it is equal or more delete the file the expert will create a new one.

 
Hi all, can you tell me how to bind an EA to a name ?
 
DENYS KOSHCHAVETS:
Hi all , tell me how to bind an EA to a name ?

This is a difficult task, or rather I can't guess who should rename the EA, in general I have no ideas and no solution


I can only try to use WindowExpertName() function, maybe it will help:

Returns name of running EA, script, custom indicator or library.

UPD: you can also get EA name this way

MQLInfoString(MQL_PROGRAM_NAME)
 
Igor Makanu:

This is a tricky task, or rather I can't guess who has to rename the EA, so I'm out of ideas and solutions.


I can only try to use WindowExpertName() function, maybe it will help:

UPD: you can also find out EA's name this way

I once had a customer who tortured me, "but remember the version was xxx and before that there was also..." I asked her where were those versions from? Well, I renamed them. And she didn't have the source. And how was I supposed to know and remember what was there? That's when I decided to prohibit work if the EA name was changed. It helped. I did not save any more different versions, which had errors or imperfections.

 
Alexey Viktorov:

I once had a customer ask me, "Remember the version that was xxx and before that there was...". I asked her where those versions came from? Well, I renamed them. And she didn't have the source. And how was I supposed to know and remember what was there? That's when I decided to prohibit work if the EA name was changed. It helped. I have not saved any more different versions, which had errors or defects.

That's probably a good thing.

If I'm working with someone, I edit the file name xxx_1.01.mql4.

and try not to forget to edit it.

#property version   "1.01"

Usually this is enough for work and communication is faster if you need to roll back to a previous version, the only inconvenience is storing all versions while working

If there will be time to refine, I'll put version 2.00


I thought he needed some kind of protection, I just do not know how to change the name of EA programmatically - that's why I was surprised by such a binding ))))

 
Alexey Viktorov:

I once had a customer ask me, "Remember the version that was xxx and before that there was...". I asked her where those versions came from? Well, I renamed them. And she didn't have the source. And how was I supposed to know and remember what was there? That's when I decided to prohibit work if the EA name was changed. It helped. I have not saved any more different versions, which had errors or defects.

A person may have a specific task, for example a robot that monitors the robot and records what it does and changes some global variables that are available in who knows where. I certainly hope this is not the case. Because it's very difficult to implement such tasks. But yes you are right.

 
Igor Makanu:

then it's probably the right thing to do.

If I'm working with someone, I edit the file name xxx_1.01.mql4

and try not to forget to change it.

Usually this is enough for work and communication is faster if you need to roll back to a previous version, the only inconvenience is storing all versions while working

If there will be time to refine, I'll put version 2.00


I thought he needed some kind of protection, I just do not know how to change the name of EA programmatically - that's why I was surprised by such a binding ))))

git to help)
 
Vladimir Simakov:
git to the rescue)

I take it from the git, which is interesting, no problem

But the problem with users is that they are as far from the git as the moon ))))

In 4 out of 5 cases they do not know how to test TC in the tester, they just push the "test/optimize" button and that's it ... here we go and here we go.... I don't know how to download the history in MT4, or fantasize that EA doesn't keep up with indicator because they don't understand that in visual testing you can put an indicator on a chart and see how EA works ...


ugh, and you're talking about the git, here MT would be a user to deal with ;)

 
Igor Makanu:

I take it from the git, which is interesting, no problem

But the problem with users is that they are as far from the git as the moon ))))

In 4 out of 5 cases they do not know how to test TC in the tester, they just push the "test/optimize" button and that's it ... here we go and here we go.... I don't know how to download the history in MT4, or fantasize that EA doesn't keep up with indicator because they don't understand that in visual testing you can put an indicator on a chart and see how EA works ...


ugh, and you're talking about the git, here MT would be a user to deal with ;)

I'm not talking about customers)))) I mean the version control project. Says the customer that I want to roll back to this, and you have not only the ability to roll back, but to create a new branch, plus, do not clog the directory a bunch of versions.