First one is in AtmStrategyChangeStopTarget()
I can change both Stop and Target orders sucessfully however when changing a Target order "TARGET1" it never returns true. The calling method is a delegate ive attached to a custom barupdate event (HINT: where are ninjas events at?), but it cant unsubscribe if true is not returned.
Second is your code example from the help for GetAtmStrategyStopTargetOrderStatus generates an index out of range error. (after you fix the entryOrder syntax error)
protected override void OnBarUpdate() { string[,] orders = GetAtmStrategyStopTargetOrderStatus("TARGET1", "idValue"); // Check length to ensure that returned array holds order information if (orders.Length > 0) { for (int i = 0; i < orders.Length - 1; i++) { Print("Average fill price is " + entryOrder[i, 0].ToString()); Print("Filled amount is " + entryOrder[i, 1].ToString()); Print("Current state is " + entryOrder[i, 2].ToString()); } } }
in code above the for statement needs to be replaced with
string[,] orders = GetAtmStrategyStopTargetOrderStatus("TARGET1", entryATMs[level].AtmID); // Check length to ensure that returned array holds order information if (orders.Length > 0) { for (int i = 0; i < orders.GetLength(0); i++) { Print("Average fill price is " + orders[i, 0].ToString()); Print("Filled amount is " + orders[i, 1].ToString()); Print("Current state is " + orders[i, 2].ToString()); } }
Comment