Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1013
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
How can I control pending orders in MQL5?
The problem is that I need the following functions: "Do not confuse positions and pending orders".
Then how do I get information about those pending orders?
How can I control pending orders in MQL5?
The problem is that I need the following functions: "Do not confuse positions and pending orders".
Then how should I get information about these pending orders?
I just need to read the pending orders. For instance, this function is only for pending stop orders:
You just need to read the pending orders. For example this function is only for pending stop orders:
Thank you very much!
I was just looking at the example and it's all through Position...
Thank you very much!
It's just that I looked at the example and it's all through Position...
Here's an example that compiles:
How can I control pending orders in MQL5?
The problem is that I need the following functions: "Do not confuse positions and pending orders".
Then how do I get information about those pending orders?
The difference is that in mql4 function OrdersTotal() returns the total number of market and pending orders. And in mql5 it returns the number of pending orders only. And to get the number of positions, in terms of mql4 market orders, function PositionsTotal()
Haven't seen the thread on the forum, but after looking at a few instructions, I find this one more understandable. Tried it, it worked, but I don't see the need to apply it yet. Although I do think it would be a good idea to combine the history from all terminals in one folder.
I read the article at the link. It's brilliant. And it's a super solution, for those who have many terminals. Now there can be one mql4 folder for different terminals, without having to constantly copy files back and forth.
thank you very much!!!
I read the article at the link. It's brilliant. And it's a super solution, for those who have many terminals. Now there can be one mql4 folder for different terminals, without having to constantly copy files back and forth.
thank you so much!!!
I'm not the one to thank. I paid attention to Sergei Tabolin's posts and matched some of the words in them with Seric29's wish, well I looked it up myself.
Hello.
Please help me sort out the code.
I tried to put the grid on the market and they started swearing at me:2016.04.01 00:02:00 1111111113241135454356146 EURUSD,H1: invalid lots amount for FreeMarginCheckfunction
attached Expert Advisor file.
Thank you in advance.
Hello.
Please help me sort out the code.
I tried to put the grid in the market and they started swearing at me:2016.04.01 00:02:00 1111111113241135454356146 EURUSD,H1: invalid lots amount for FreeMarginCheck function
attached Expert Advisor file.
Thank you in advance.
It says too: invalid lots amount
The FreeMarginCheck function does not check Expert Advisor arguments and does not add a normalized lot size.
PS - well, do not put everything in a row in the market, the more thing that they themselves do not use. I'm not sure what to do with it.
I wanted to make a video, but I don't have a camera, and my phone is an old one, that was under the Tsar Pea. So I created an expert and called it 111.mq4
Here's its primitive code.
and then I created a library and named it 111b.mq4 with the primitive code
. I declared a string array inside the library, but it turned out later, the developers didn't provide the possibility to export and import arrays and variables. It turns out, there is no way to get a global array that would remember the information. But never mind, I took another way. I createdFuni() function. Then I created hard links by key H terminals are set like this
The original files are in Forex4you, and links in Forex4you1 I threw the robot original and link to the chart, the first calculations were obtained, but when the ticks went only original Forex4you updated the information and arrayst_mas increased in size, but when ticks went to Forex4you1 nothing happens only when the file manually gets to the chart. Then I took another way. I made an Expert Advisor called 333.mq4 and installed it in MT4 Forex4you1 and connected the library 111b.mq4 to it and threw the program on a chart. The robot 333.mq4 was able to connect to the library link and this thing started working online but as it turned out later the library was a prototype and the array declared in it works within a single chart
The example shows that even though the robot is connected to a library with a global array, that array works as an image and still can't provide communication, we need to create shared variables that will be available from all sides. Who knows if it's possible to export arrays and variables. I think the second option is to write the information to a file, because the file will not be a proxy and will be read from both sides and thus terminals and robots will be able to communicate with each other. Who knows how to work with files check this theory as I don't have that experience yet.
Do you guys know if you can export arrays and variables?