If i use an array to manage my orders by position it seems to work great for stoplosses, because it uses the whole order. If, however, I close part of the order it doesn't seem to flag it - as if the elements are shifting index positions within the array.
For example, using an array as a boolean grid to flag order changes:
static bool my_array[][2];
ArrayResize(my_array,OrdersTotal()); //sets array size according to orders count
/*my_array[order#][]
my_array[][0] = set stoploss 1?
my_array[][1] = set stoploss 2?
my_array[][2] = profit taken? */
Anyone experience this? BTW, with my broker I have to use OrderClose() to take partial profit - don't know if this is contributing to my issue or not.
Thanx in advance.
For example, using an array as a boolean grid to flag order changes:
static bool my_array[][2];
ArrayResize(my_array,OrdersTotal()); //sets array size according to orders count
/*my_array[order#][]
my_array[][0] = set stoploss 1?
my_array[][1] = set stoploss 2?
my_array[][2] = profit taken? */
Anyone experience this? BTW, with my broker I have to use OrderClose() to take partial profit - don't know if this is contributing to my issue or not.
Thanx in advance.