nadiawicket:
I need the 10 last opened order prices in an array, however I'm starting by first gathering the Bid ticks as it seems easier.
The previous code does not allot the values correctly. I need it to update every array element with the previous ticks so there are the last 10 ticks in the array so I can then compare to another one. Super late tried everything. Any ideas ?
I would start with the following idea. Optionally look for ArrayCopy to make the coding easier.
for(int x=10; x>=1; x--)
Ex Ovo Omnia:
Thx. Anything else?
I would start with the following idea. Optionally look for ArrayCopy to make the coding easier.
nadiawicket:
Thx. Anything else?
Ovo's suggestion of ArrayCopy presumably means something like https://www.mql5.com/en/forum/192882#comment_5070878. Such a use of ArrayCopy isn't guaranteed to work according to the documentation - see notes following link - but does seem to work in practice.
Thx. Anything else?
nadiawicket:
Thx. Anything else?
Thx. Anything else?
You may cycle the array without swapping its values. This is what I would do. But I would suggest to finish the simple idea first.
Got it down, just needed to stick to basics.
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
I need the 10 last opened order prices in an array, however I'm starting by first gathering the Bid ticks as it seems easier.
The previous code does not allot the values correctly. I need it to update every array element with the previous ticks so there are the last 10 ticks in the array so I can then compare to another one. Super late tried everything. Any ideas ?