Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1555

 
MrBrooklin #:

There is one more option. Post the code of your EA on the Forum and there is a chance that someone will help you, even for free. The code can be posted as a file, but only with the mq5 extension or by copypaste in the text of a new message (to do this, press Alt+S and paste your code). And if you don't want to show the secret code of your EA, then, as Alexey advised, contact Freelance.

Regards, Vladimir.

I tried to import code from another EA, everything compiles without errors, but it doesn't work) The EA is just a regular slave from the codebase. As soon as it hits the news, it starts to get a bit fussy with poses. Maybe someone has a free minute ? I would be very grateful

Files:
Nevalyashka.mq5  17 kb
 
Aleksei Gureev #:

I tried to import code from another EA, everything compiles without errors, but it doesn't work) The EA is just a regular slave from the codebase. As soon as it hits the news, it starts to get a bit fussy with poses. Maybe someone has a free minute ? I would be very grateful

In order not to bother too much with code modification, I introduced a new variable Number_Of_Second in the EA parameters and set the Sleep function before opening long and short positions. The default delay between closing one position and opening another is 600000 milliseconds, which equals 600 seconds or 10 minutes. Set the delay as you need, but do not forget that to set the 1st second in the parameters you need to specify the size of 1000 milliseconds.

Regards, Vladimir.

Files:
 
Aleksei Gureev #:

I tried to import code from another EA, everything compiles without errors, but it doesn't work) The EA is just a regular slave from the codebase. As soon as it hits the news, it starts to get a bit fussy with poses. Maybe someone has a free minute ? I would be very grateful

In addition to Vladimir's variant, I present one more perverted variant of EA redesign)))))

ZЫ. Not checked. If I haven't missed a semicolon anywhere, it should work (but it's not exact).

Files:
 
Aleksandr Slavskii #:

In addition to Vladimir's variant, I present another perverted variant of the EA redesign)))))

ZЫ. I haven't checked it. If I haven't missed a semicolon anywhere, it should work (but it's not exact).

I was watching some film the other day. I wanted to download and cut out one fragment for posting here, but never got round to it. Anyway, there is a dialogue like this:

- Is the programme ready?

- Yeah, it's ready. But it doesn't work. Or rather, it works, but it does not interact with the code of... (another programmer).

 
A thousand thanks! Took both versions. Checked the one from Vladimir, everything works. Yesterday I read in the manual about the slip, but I didn't understand where to put what. Now I looked at the code, it turns out to be so simple =)