To confirm, you received this error when testing the script I have provided you in post # 44?
I am not referring to the limit price, I am referring to the quantity which cannot be 0. I guarantee this. You cannot submit an order with 0 quantity. Set the quantity to 1.
Regarding the limitPrice, you can use 0 as the limit price for stop orders which do not have a limit price and thus the value is irrelevant. For a limit order is necessary to provide a value.
"Alas, tried it and didn't change things."
What did you try? What are you referring to as "it"?
Are you referring to following the exact steps as shown in the video from post # 44?
Regarding the OCOID error, it's very likely you are confused by what code is actually causing that error. If you remove the line of code to submit the order, does the error stop?
I would expect this error for any limit order that was paired with a stop order that was rejected as the OCOID would not be valid for the limit. Meaning that error could be from the Atm Strategy and not from this new order you are submitting with <Account>.Submit().

Comment