Hello,
I'm trying to work on a script dealing with hedging and would like to keep a relation between an order and it's hedge order. I thought a multidimensional array would be ideal for this: for example, HedgeRelations[25][1] would give me the ticket numbers for the 26th order and the one hedge order associated with it. (This would help me to track multiple orders that are hedged).
However, I don't know how to calculate the size of the array (there will only be 1 hedge per order, but there could be numerous orders hedged) or how to resize the array - do those functions (ArraySize() and ArrayResize()) only work for single dimension arrays?
Any work arounds. I was starting to setup a routine that would put the order and it's hedge in a string like "ticket#-hedgeticket#" and store in a single array, then work to split and search these to manage them as needed - but thought a multidimensional array might be more efficient.
Any thoughts? Thanks!
I'm trying to work on a script dealing with hedging and would like to keep a relation between an order and it's hedge order. I thought a multidimensional array would be ideal for this: for example, HedgeRelations[25][1] would give me the ticket numbers for the 26th order and the one hedge order associated with it. (This would help me to track multiple orders that are hedged).
However, I don't know how to calculate the size of the array (there will only be 1 hedge per order, but there could be numerous orders hedged) or how to resize the array - do those functions (ArraySize() and ArrayResize()) only work for single dimension arrays?
Any work arounds. I was starting to setup a routine that would put the order and it's hedge in a string like "ticket#-hedgeticket#" and store in a single array, then work to split and search these to manage them as needed - but thought a multidimensional array might be more efficient.
Any thoughts? Thanks!