I wonder if someone might help me with this problem
I understand how to make a 1 dimensional counter array to count the amount of something like
would count the amount of orders of each type there are while in a order_by_pos checking loop
is it possible to make a 2 dimensional array where only the second index counts the frequence of something ?
where there are several orders which may have different magic numbers between 1 and 9
and I want to list in the array how many orders of each type have the same magic number at first I thought i could do it something like this
then i realised although it would count how many orders of each type there are at the same time it would also increase the magic number index every time a new order is found
how would i create a counter that would work on the second index independantly from the first ?
Really ? Thanks Gordon I thought I had it wrong, there wouldnt be any entry in the zero index because my lowest magic number will be 1 that could be any order type though
so if I use:
If I had 3 open buy orders all with magic number 4
and 2 pending Sell Limit orders both with the magic number 6
array[4,0] would hold the value 3 and array[6,3] would hold the value 2 ?
[...] there wouldnt be any entry in the zero index
because my lowest magic number will be 1 [...]
You can do this:
Awesome !! thanks for your help Gordon I've been puzzling over that one for the past 2 hours I'll implement it like you said with the -1 I wouldnt have thought of that, now Ill be able to finish my order accounting function tonight.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.