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
... people here are trying to help newcomers for once.
Good day and good mood everyone!
Thanks to everyone who is trying to help me! The result of your help is already there. Now I am consciously finding the information I need (tutorials, website documentation, etc.), which helps me to continue self-study. I would like to emphasize that I used only MQL5 Reference to write this script code!
Today, I am pasting the code of the New7.mq5 script which is an improved version of the New6.mq5 script. The new script has the ability to set Stop Loss (stop loss) and Take Profit (take profit) levels. I tried to describe everything in this script as I promised earlier, in an understandable form for a first grade programmer.
Regards, Vladimir.
Good day and good mood everyone!
Thank you to everyone who is trying to help me! There is already a result from your help. Now consciously find the information I need (tutorial, website documentation, etc.), with the help of which I continue self-study. I would like to emphasize that I used only MQL5 Reference to write this script code!
Today, I am pasting the code of the New7.mq5 script which is an improved version of the New6.mq5 script. The new script has the ability to set Stop Loss (stop loss) and Take Profit (take profit) levels. I tried to describe everything in this script as I promised earlier, in an understandable form for a first grade programmer.
Regards, Vladimir.
There is a line in your code:
It means that when there is 'orderType1' in the code, it will be replaced with "BUY_STOP".
That is, instead of the following line:
"BUY_STOP" will be replaced with the following string:
Is that what you really want?
There is a line in your code:
It means that when 'orderType1' is encountered in the code, it will be replaced by 'BUY_STOP'.
So, instead of the following line:
It will be the string:
Is this what you really want?
I'll study the documentation once again and answer you later.
Sincerely, Vladimir.
Koldun Zloy:
... Is that really what you want?
For the moment, yes.
Respectfully, Vladimir.
For the moment, yes.
Here we go...
Here we are...
For the time being, yes.
Respectfully, Vladimir.
This is the point I should have written in more detail. It's certainly a working option, but too unexpected))))
It is better to start by giving a description of what the script will do, an algorithm schematically. There will be fewer questions and more specific remarks)
For the time being, yes.
Respectfully, Vladimir.
Well, what did I tell you about?))) There must be a base and a base again. First read/review a textbook for 3-4 months and then write something. After a year you can start OOP.
It's not even about the base. The man's mind is a mess. The ship has gone down, but the sails (take-profit, stop-loss, trailing in the future) are being carefully shaped to it.
In fact, the condition above is always true, like 2 = 2. So if (condition operator) doesn't work here, and the compiler will give a warning on such code.
Now the author of the branch should follow your advice Peter, and say "I see it that way, I'm an artist!".
Here we go...
I must have misunderstood something, since I got such a reaction.
I wrote the following condition in the script New6.mq5: "For pending orders Buy Stop and Sell Stop, apply the #define directive instead of input. It will allow us to specify in the script code the necessary types of pending orders, but they will not be displayed in the input parameters of the script when it runs. Let's set variables defining the types of pending orders orderType1 and orderType2. Let's name these variables "BUY_STOP" and "SELL_STOP".
Please advise me what I have done wrong in the implementation of this condition.
Regards, Vladimir.