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
In my opinion, is there a faster and more efficient algorithm for adding a new position (and its 6 properties) to the position structure? At me it works like this - I use brute force to make sure the position is really new, get the values of required parameters, increase the array by 1 and write a new element. I've read in the article that enlarge and write can and should be done differently. I haven't found the function specified there in my terminal and I don't know how to fill it.
In my opinion, is there a faster and more efficient algorithm for adding a new position (and its 6 properties) to the position structure? At me it works like this - I use brute force to make sure the position is really new, get the values of required parameters, increase the array by 1 and write a new element. I've read in the article that enlarge and write can and should be done differently. I haven't found the function specified there in my terminal and I don't know how to fill it.
Do not try to search for positions to determine "that the position is really new". Find another way. For example in OnTradeTransaction. And try to use ArrayRemove function instead of array overflow
Do not try to search for positions to determine "that the position is really new". Find another way. For example in OnTradeTransaction. And try to use ArrayRemove function instead of array overflow
Respect, thanks for your prompt support and helpful advice, I'll get started. And how to add to the tail of the array data without +1 to size, formula from ready-made classes terminal throw over ??? Well, now for the general development, so as not to leave gaps in my head, please?
And how to add to the tail of the array data without +1 to size, formula from ready-made classes terminal throw up ??? Well, now for general development, so as not to leave gaps in my head, please?
I found the method myself, but how to attach it, I do not understand, not enough experience. It's hard to master a foreign language when you don't even know it exists. This is a digression.
How do I screw it on? Where do you put what kind of array you want to grow? What if the array is a structure?
Respect, thanks for your prompt support and helpful advice, I'll get started. And how to add to the tail of the array data without +1 to size, formula from ready-made classes terminal throw over ??? Well, now for the general development, so as not to leave gaps in my head, please?
I found the method itself, but I can't figure out how to apply it, because I'm not experienced enough. It's hard to master a foreign language when you don't even know it exists. This is a digression.
So how do I screw it on ???
To your array of structures - no way.
I found the method itself, but I can't figure out how to apply it, because I'm not experienced enough. It's hard to master a foreign language when you don't even know it exists. This is a digression.
So how do I screw it on ???
And this, if I understand correctly, is more for OOP object arrays.
Not "more", but from-there.
I try not to use ready-made classes. I use CTrade only for creating trading panels. I'm too lazy to rewrite CTrade for my own needs, while the panels are too complicated for me and I'm reluctant to understand them. That's why I'm sure +1 to an array and filling structure elements is not that much of a delay compared to three loops.
The idea is clear, it is unclear why we should not use ready-proven algorithms, but about "three loops" - very understandable, thank you. When you get high-quality simple solutions, I always wonder why I have not figured it out myself, because it is so obvious. Thank you.
Not "more", but from-here.
Please tell me, the articlehttps://www.mql5.com/ru/articles/567 has the following code and mentions
But I couldn't find it in the standard package. Didn't look hard enough or is the article out of date ???