@fxgjg said in How/what blocks can i use the blocks to structure this problem?:
Thanks @roar
I'll give it a try now.
I think i have to explain a bit more...
As you can see above, once the sell order (red arrow) was closed (yellow arrow) then all 3 pending buy orders (blue arrows) were instantly closed (pink arrows)
What i would wish to happen is for the last/lowest (closest) pending buy (blue arrow) to be closed when the sell is closed leaving the other 2 pending buys open until their sell orders are closed.
So, in a nutshell: buys and sells are done in pairs. This is why I would use some specific group number for each pair.
I wouldn't care to keep such a precise track myself, though.
I would just limit the number of pending orders, using the "check pending orders count" block.