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
mql5 is good because there will be no problems with compatibility and readability of code.
And how are they sent, we don't know what type of data you took as the basis.
Stream, cast, Json.
If the tiering is done in a for loop, I'd forgo loops.
Any loops have processing time, and that's latency.
There are only about 40 price levels in the tumbler, up and down.
Therefore, for each level I would write its own variable with the desired value, eliminating the loop.
mql5 is good, there will be no problems with compatibility and readability of code.
And how they are sent, we don't know what type of data you have taken as the basis.
Stream, cast, Json.
If the tiering is done in a for loop, I'd forgo loops.
Any loops have processing time, and that's latency.
There are only about 40 price levels in the tumbler, up and down.
Therefore, for each level I would write its own variable with the desired value, eliminating the loop.
Look at the code on the previous page.
I centralise the incoming data relative to the centre cell of the cup. The closest price to the ask is put in the cell in the centre and then upwards the rest of the prices in ascending order. The same for bid prices and their bids.
mql5 is good, there will be no problems with compatibility and readability of the code.
And how they are mapped, we don't know what type of data you have.
Stream, cast, Json.
If the tiering is done in a for loop, I'd forgo loops.
Any loops have processing time, and that's latency.
There are only about 40 price levels in the tumbler, up and down.
Therefore, for each level I would write its own variable with the desired value, eliminating the loop.
I don't know how to solve the problem of distributing incoming data without a cycle. Can you give me a hint?
Sometimes there are more than 40 price levels coming in. Some of them don't fit in the cup. So, I made a receiver array of 100 cells. It's impossible to display everything in the picker, but it can be requested from the engine.
...
For this reason I would prescribe for each level a variable with the necessary value, excluding the cycle.
The data comes in an array in order from the highest price to the lowest. There is no limit to the amount of data. There may be 60 prices with bids, 30 for each side, or there may be 30 prices, all with prices higher than the ask or lower than the bid. So, without a cycle there is no way to solve the problem.
The data comes in an array in order from the highest price to the lowest. There is no limit to the amount of data. There may be 60 prices with bids, 30 for each side, or there may be 30 prices, all with prices higher than the ask or lower than the bid. So, it is not possible to solve the problem without a cycle.
If indexing of incoming elements in the array is not broken, we can take each element from the array without the loop and assign it to our variable.
And already assign each variable containing the value to its own cell level.
Or, you can assign each element of the array to a level at once.
Then we exclude variables as well, but uninitialized data is not a good coding practice.
Another idea came up.
After implementing both methods, we can measure the speed of processing.To divide the received array into two arrays Bid and Ask
And think how to use the CopyArray() function.
And which one will give the best result, and leave it.
If indexing of incoming elements in the array is not broken, we can take each element from the array without the loop and assign it into our variable.
And already every variable containing the value is assigned to the cell level.
Or, you can assign each element of the array to a level at once.
Then we exclude variables as well, but uninitialized data is not a good coding practice.
Alas, there are no ordered prices in the array and its indexing does not point to specific cells in the tumbler. The data comes from a higher price to a lower price, but that is where the order ends. There may be one point between the prices, or it may be 10 or 153. The slider shows the last changed order volumes in the whole range on which they are located. If a price over 150 pips from the asc has changed the number of limit orders, it will appear in the array. Therefore, there is no order in the array other than from larger to smaller and the data can't be rearranged otherwise than in a loop.
Alas, there is no indexing in the array. The data comes from a higher price to a lower one, but that is where the order ends. There may be one point between prices, or there may be 10 or 153. The stack shows the last changed order volumes for the whole range on which they are located. If a price over 150 pips from the asc has changed the number of limit orders, it will appear in the array. Therefore, there is no order in the array other than from more to less, and the data cannot be ordered other than in a loop.
There is indexing by array elements in the receiving array.
The data comes from higher to lower price, they are always sequentially ordered, aren't they?
So, choose any necessary element from the array by index, but without the loop.
And if it's impossible to catch better Bid/Ask because of changing size of incoming data,
then maybe we should think about CopyArray()
There is indexing by array elements in the receiving array.
The data comes from a higher price to a lower one, they are always ordered sequentially, aren't they?
So select any desired element from the receiving array by index, but without the loop.
Arranged sequentially. But:
Arranged sequentially. But:
Where do you get such crooked data from? ))
1) Define a clear range of selecting data, for example 20 up, 20 down.
and select only this range, and anything else is not important to us.
2. You say that prices come from higher to lower and they are ordered in descending order.
So what may come higher or lower, it does not matter, look not at the prices but at the indexes in the array.
2. If you mean order by distance between price levels, it doesn't matter at all, we have indexing in the receiving array.