Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1772
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
But the second bot needs a timeframe, you didn't read it carefully.
This you have written incorrectly. The second Expert Advisor needs the timeframe at which the signal to enter (or open an order) was received. Then, use a global variable to save the timeframe (in the first robot). And read it with the second robot.
This you have written incorrectly. The second Expert Advisor needs the timeframe at which the signal to enter (or open an order) was received. Then, use a global variable to save the timeframe (in the first robot). And read it with the second robot.
It doesn't work that way, because the bot is running on a remote server, so I write the TF in the comment, that would be fine, but it is overwritten by the ticket when you close part of the volume.
So it's a bot, not the point.
How is that not the point?! Any programmer will tell you that the indicator does not make trades. Study the documentation carefully before you start developing applications.
You can't do that because the bot is running on a remote server, so I write the TF in the comment, it would be OK, but it is overwritten by the ticket when you close part of the volume.
Then, let the 1st robot in parallel opens a market or pending order with minimum volume and it will be possible to write a comment there, which will not change.
This option is even easier than I suggested.
Create an array of pointers to objects: ticket - order info. When the order is closed, delete the object and delete the pointer from the array. There is nothing difficult. But you will have to learn how to work with dynamic arrays, pointers and classes. I must have said something frightening for you. :)How is that not the point?! Any programmer will tell you that the indicator does not make trades. Study the documentation carefully before you start developing applications.
Then let the 1st robot simultaneously open a market or a pending order with a minimum volume and you can write there a comment that will not change.
<<Then let the 1st robot in parallel open a market or a pending order with minimal volume, and it will be possible to write there a comment, that will not change. >>
oh no thanks :) save Bill Gates from such maneuvers.
it doesn't work that way, because the bot is running on a remote server, so I write the TF in the comment, that would be fine, but it is overwritten by the ticket when you close part of the volume.
To write the information about TF into the order we need to use its magic number. But this attribute never changes. We should conditionally number all TFs in order and generate a magic number considering this number + leave some space for the ID function, bitwise operations are better.
I may say I made a typo.
No. It's not a typo. You just don't understand the difference between a robot and an indicator. And it's obvious to any programmer. Read the documentation:https://www.mql5.com/ru/docs/runtime/running.
Quote from the article:
This option is even easier than I suggested.
Create an array of pointers to objects: tikets - order information. When the order is closed, delete the object, and delete the pointer from the array. There is nothing difficult. But you will have to learn how to work with dynamic arrays, pointers and classes. I must have said something frightening for you. :)Very much so. I imagined creating a structure with two din. arrays tikets and timeframes, where the values are placed according to their names.
No. It's not a typo. You just don't understand the difference between a robot and an indicator. And it's obvious to any programmer. Read the documentation:https://www.mql5.com/ru/docs/runtime/running.
Quote from the article: