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
Alexei, are you kidding? Yes, I'd like to learn the basics first!
Respectfully, Vladimir.
If your immediate goal is to implement a simple trailing stop, continue writing the script by adding the for and while loops.
Thank you, Peter, for supporting my intention to equip New7.mq5 script with trailing stops, especially now, when I have started studying cycles. By the way, I have already tried the Sleep function in the script. It was recommended to use this function when writing the trailing stop. Where do I start? Probably, it would be better to describe the entire trailing stop algorithm in words first, and then proceed to writing the code?
Sincerely, Vladimir.
Thank you, Alexey, for your faith in me. All that remains is not to pump!
Sincerely, Vladimir.
Thank you, Peter, for supporting my desire to equip New7.mq5 script with trailing stops, especially now, when I started studying cycles. By the way, I have already tried the Sleep function in the script. It was recommended to use this function when writing the trailing stop. Where do I start? Probably, it would be better to describe the entire trailing stop algorithm in words first, and then proceed to writing the code?
Sincerely, Vladimir.
Programmers are afraid to use global variables because of errors occurring when changing their values. It creates a situation when an error is difficult to localize because each function can change them. Of course, only those variables must exist in the global scope which all the program functions must see. It cannot be otherwise.
There's an observation that once you start crutching, it's hard to stop, and as a consequence, the project code turns into what they call dre...code.
Let me explain:
I hope you paid attention to the fact, that the counter of implemented features, increases time of implementation of the next feature, but when implemented correctly, it resets to zero?
This is a very exaggerated idea, but that's how it works in real life.
What I mean is if you don't rewrite the project after you implement all the features it will go into production as an unreadable spoiler. And then, the life cycle of any project leads to a headache for the management: either to put the entire team on a global refactoring of all those things that were spun (and the competitors don't sleep, they, evil guys, write new features), or keep writing crutches and patching bugs, leaking in torrents.
Objectively speaking, a simple trailing stop will not work in the script. Let me explain: trailing stops do not exist by themselves, in a "vacuum", they are "bound" to an open position, which is in turn "bound" to the strategy, and the strategy is implemented only in an Expert Advisor.
Peter, do we create trailing code in the script? Perfect! Now I take what you've listed as basic sections and begin to describe them in words, so it's clear how I should write functions, loops, etc. later. Is this correct?
Regards, Vladimir.
Peter, so we create the trailing code in the script? Great! What you have listed I now take as basic sections and start to describe them in words, so that it is clear how to write functions, loops, etc. later. Is this correct?
Regards, Vladimir.
There's an observation that once you start crunching, it's hard to stop, and as a consequence, the project code turns into what's known as d.c.
Let me explain:
I hope you paid attention to the fact, that the counter of implemented features, increases time of implementation of the next feature, but when implemented correctly, it resets to zero?
This is very exaggerated, but that's how it works in real life.
What I mean is if you don't rewrite the project after you implement all the features it will go into production as an unreadable spoiler. And then, the life cycle of any project leads to a headache for the management: either to put the entire team on a global refactoring of all those things they have spun (and competitors don't sleep, they, evil sons of bitches, write new features), or keep writing crutches and patching bugs, leaking in torrents.
Even though this message is mainly addressed to Peter, I ask you to write it without any slang, in order to fully understand your messages, in a language accessible to the 1st year pupil of programming school, as the topic is for beginners from scratch.
Regards, Vladimir.