Discussion of article "Step-by-Step Guide to Writing an Expert Advisor in MQL5 for Beginners" - page 27

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Dear Vladimir ! I got to your titanic work for dummies, my priorities are changing, demo trading will be its own way, and the main thing now is your school for beginners, I chew valuable squeezes of your experience, it is invaluable, there are no words. If I get to how to insert a trailing stop into this EA, I will probably do it as a priority, because as a result of forward optimisation, the EA creates long takeprofits, their safety net has become screaming. And in the course of training in your school I will probably learn to see mistakes, without which there are no working programmes, and correct them. THANK YOU.
Sincerely, Rustam.
You are welcome, Rustam!
With respect, Vladimir.
Reply or New Comment, at the bottom Attach a file.
THANK YOU for the ingenious simplicity) And a question, how would you, with your trailing experience, insert one of these into this EA ?
Please, Rustam!
Regards, Vladimir.
I found a unique, simple to genius, "trailing method" of the Expert Advisor, the author himself, which, as is traditional for this development, is not executed as the author commented. He, like me, is probably also a dummy, but a big one) He promised that when the price reverses, the previously opened position is closed, well, yes, it would be great if it were... but only two open positions are hanging, in both directions, and are not closed. Earlier, before your first advice, there were a hail of open positions in both directions, which were not closed. Try to squeeze this cherry on the cake?
THANK YOU for the ingenious simplicity) And a question, how would you, with your trailing experience, insert one into this EA ?
If the result with trailing is better than without it, then leave it.
If the result is better with the trawl than without it, then leave it.
It's not difficult to insert, but what to insert? To test and evaluate.
It's not hard to put it in, but what is it to put in? To test it out.
trawl code into your EA without trawl. It is better to put the trawl code into a function. And call the trawl by condition, if there is an order.
I found a unique, simple to genius, "trailing method" of the Expert Advisor, the author himself, which, as is traditional for this development, is not executed as the author commented. He, like me, is probably also a dummy, but a big one) He promised that when the price reverses, the previously opened position is closed, well, yes, it would be great if it were... but only two open positions are hanging, in both directions, and are not closed. Earlier, before your first advice, there were a hail of open positions in both directions, which were not closed. Try to squeeze this cherry on the cake?
Hello, Rustam! In order for us to continue to cooperate productively, you first need to learn how to attach the EA code with problems to your message. If you have problems while testing the EA, you need to save this code under a new name, compile it and then attach it to the message. You must save the EA under a new name and compile it !!! Otherwise, we will get confused in different variants when communicating with you.
If for some reason you cannot attach the code of the EA, you can use another way:
If you do not learn to attach or place in your posts the code of the EA with problems, then further dialogue with you becomes useless.
Regards, Vladimir.
Hello, Rustam! In order for us to continue to cooperate productively, you first need to learn how to attach the EA code with problems to a message. If you have problems while testing the EA, you need to save this code under a new name, compile it and then attach it to the message. You must save the EA under a new name and compile it !!! Otherwise, you and I will get confused in different variants when communicating with you.
If for some reason you cannot attach the code of the EA, you can use another way:
If you do not learn how to attach or post the EA code with problems in your posts, then further dialogue with you becomes useless.
Regards, Vladimir.
Sorry for the delay, I burned out over the weekend, but found the cause of the last problem, as it turned out the broker FXopen, just did not grow up to MT5. Well and taught me the simplicity of file selection, to send. The first two are your optimisation of the author's work, where you stopped the author's inattention in the code, with massive opening of positions, instead of one, a single, the second two are his declaration of closing a position when the price reverses. The second is worth working on, after all, the author, if not finished, but wanted to profitably).
Sorry for the delay, over the weekend burned out, 24 hours, but found the cause of the last problem, as it turned out the broker FXopen, just did not grow up to MT5. Well and taught me the simplicity of file selection, to send. The first two are your optimisation of the author's work, where you stopped the author's inattention in the code, with massive opening of positions, instead of one, a single, the second two are his declaration of closing a position when the price reverses. The second is worth working on, after all, the author, if not finished, but wanted to profitably).
Well with this, the last one, I'm still sorting it out, trying to understand something and start to navigate in it, while to the insurance of long takeprofits. I am already ready for the author's surprises in the future, the road will be travelled by the one who walks).
Well with this last one, I am still trying to understand something and start to orientate myself in it, for the time being to hedge long takeprofits. I am already ready for the author's surprises in the future, the road will be travelled by the one who walks).
Hello, Rustam! I attach the working version of this Expert Advisor at the bottom of the message. The changes have been made to this section of the code:
What is highlighted in yellow was added:
&& PositionsTotal()==0
and also removed the condition related to Buy_opened and Sell_opened:
Regards, Vladimir.