Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Some properties of an order can not be updated
Collapse
X
-
Hello,
In general a major modification to an order such as the orders type, OCO, Name, ID etc.. would need to be a new order as these properties are no longer changeable after the order has been submitted. The callback or OnOrderUpdate is relaying the information back through the orders update events. To change the values that are readonly, you would need to cancel and resubmit the order with the values needed.
To perform the actions you are trying, you would need to cancel any orders that need edited and resubmit all of the orders with needed OCO's at once per the standard order submission methods.
I look forward to being of further assistance.
-
hi again
I am still looking to understand why OCO and name of working order in the market can not be update , while other properties can be updated
Can this be fixed ?
Leave a comment:
-
when i update the limit price of an order or the qty of an order
the new values are submitted to the broker
so why the update process wont work in case of OCO or NAME ?
This sounds to me as limitation which exist at this moment at ninja and can be corrected
Leave a comment:
-
Hello,
Thank you for the inquiry.
The OCO and Name are set when you initially create the order by using the standard methods of creating orders in NinjaScript. After the fact these are read only as they should not be changed after the order has already been submitted. If a property was changed on this object, this would not be reflected on the brokers side because the platform would not have been aware of that change to provide that to the broker.
The state OnOrderUpdate would indicate the order is already working though its states or has been created so it will have properties that are Read Only to persist the correct values being reported about that order from the various events. Only by calling supported methods the order can be updated, such as the methods to Cancel orders or resubmit an order using the same name to update its price.
I am unsure of the logic that needs to occur for what you are trying to do, but manually assigning an OCO to an already existing order would not work as the order already exists and is not editable in this way.
I look forward to being of further assistance.
Leave a comment:
-
Some properties of an order can not be updated
HiI am connected to CQG and working with NT8I have a Superdom column indicator which generates target and stop orders according to logic I developed. To those orders i assign OCO and Name during the generation process of that order.
This indicator which reacts to changes in my position works fine.
However in case a manual target order is entered by the user I have to identify it in OnOrderUpdate(OrderEventArgs orderUpdate)
set OCO to that manual order so that I will be able to attach to it stop loss order with the same OCOHowever the property OCO can not be updated , also the property Name can not be updated . Please enable both properties to be accessed.Attached error messageTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by foxtrott21, Today, 08:27 AM
|
0 responses
1 view
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
1 view
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
||
Started by linkcou, Today, 07:01 AM
|
2 responses
18 views
0 likes
|
Last Post
by bltdavid
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:25 AM
|
0 responses
1 view
0 likes
|
Last Post
by jaypelle3
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:22 AM
|
0 responses
2 views
0 likes
|
Last Post
by jaypelle3
Today, 08:22 AM
|
Leave a comment: