Questions from Beginners MQL4 MT4 MetaTrader 4 - page 65

 
Alexey Kozitsyn:
Woah... why... The man wants to learn...
he asked for a little nudge/help.
 
Alexey Kozitsyn:

OK, here's the challenge. Write an advisor. Is in the market all the time. Opens sell, buy, sell, etc. The type of the first order is arbitrary. There is a SL and TP to each order. It should be placed in the entry parameters. As soon as there are no orders in the market, this EA checks the type of the last closed order and places the opposite order at the current price. When testing in the tester/demo there should be no errors. Lot - minimum for the account.

Write and I will check it. If it doesn't work by code - just even write your thoughts, how would you think, solving this problem. Where would you start, etc.

Thanks Alexey! I definitely can't write the code, but I'll try my thoughts.
 
FOTOGRAF14:
Thank you Alexey! I definitely can't write the code, but I'll try my thoughts.
Yes, with what to start the decision. You can write your thoughts directly in the template, which was given to you above.
 
Alexey Kozitsyn:
Woah... why... The man wants to learn...
Thanks, I will try to fix it now. I did not write this code, I just repeated it in the Kovalev tutorial, and it didn't work.
 
FOTOGRAF14:
This is the answer, boy, do not interfere with my men's work, they are solving serious problems, and you are in the way! How can I write an Expert Advisor that someone else came up with without understanding it? I understand it when I can write more or less, and you take on free orders for training.

No, it's a kind of advice on how to learn. People are so far able to acquire knowledge only through parallel study of theory with application in practice, there is no such thing or trinket that you push a button or swallow a pill and you know everything.

If you have zero knowledge in programming, you don't know any language, it is better to start with C++, there are so many tutorials, webinars and other courses on the Internet, that you can't listen to them all even 24/7. The main thing is the basics. Since MQL and C++ are very similar, the programming of algorithms for MT4 or 5 will also be easier.

You just need to start studying instead of whining.

 
FOTOGRAF14:
Thanks, I'll try to fix it now. I didn't write this code, I just repeated it in a Kovalev tutorial, but it didn't work.
Create a separate branch for your training, so that posts related to your training are not lost in the general branch. It will be easier to help you.
 
Vitaly Muzichenko:

OnInit() has no closing parenthesis.

Please post the code instead of a picture, because it's not convenient to compile a picture)

Excuse me, how do I paste the code?
 
Sergey Gritsay:
Create a separate thread for your training so that posts related to your training are not lost in the general thread. It'll be easier to help you.
Thanks! That's a great idea! I'll just have to see how to do that.
 
FOTOGRAF14:
Sorry, how do I set the code?

Ctrl+C, open a new forum message, Ctrl+Alt+M, Ctrl+V.

 
FOTOGRAF14:
Thank you! That's a great idea! I'll just have to see how to do it. this branch
Reason: