Once an update is detected, another method is called to calculate the volume increment:
In the previous code, I obtain the previous volume using the price received in the update as the key, and I compare the previous volume with the current one to calculate the increment. The strange thing is that increments are constantly occurring at certain price levels, and these seem to follow an unnatural pattern. This happens throughout the day, and these limit orders never seem to get executed since they always remain at the same distance, which also doesn't make sense as it would be odd to place orders just to cancel and move them continuously. Here is a visual test of the generated liquidity map; the circles represent the big trades of liquidity caused by these large contract movements:
I printed the volume increments to the console along with other related data to see the specific volume numbers that we receive:
As you can see, the volume increments/decrements occur constantly, and the amounts are almost always the same: 100, 150, and 250. Sometimes I do get more normal readings outside of this pattern. I have included the "tick diff" in the logs, which is the tick difference between the current price and the price where the limit order is placed, and as you can see, the distance remains around 20 ticks approximately. I would like to know if the error is being made by me when reading the data, which is why I attached code screenshots, but if that's not the case, I don't understand how such a large number of contracts can be moved without them ever getting executed, or if the problem lies with the data provider.

Comment