So, what is the difference between NinjaTrader.Cbi.Order and NinjaTrader.Cbi.IOrder? Is the Order class implementing the interface IOrder?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
NinjaTrader.Cbi.Order vs. NinjaTrader.Cbi.IOrder
Collapse
X
-
NinjaTrader.Cbi.Order vs. NinjaTrader.Cbi.IOrder
I am getting an error "Unable to cast object of type 'NinjaTrader.Cbi.Order' to type 'NinjaTrader.Cbi.IOrder'"
So, what is the difference between NinjaTrader.Cbi.Order and NinjaTrader.Cbi.IOrder? Is the Order class implementing the interface IOrder? -
The main issue here is that when a strategy ninjascript is running it create the order in the type of NinjaTrader.Cbi.IOrder, which is fine as long as this order turns into a position. However, if a strategy ninjascript is re-started after it exits or clashes or is down due to whatever reasons, the existing order can be identified in the account order collection, with the type of NinjaTrader.Cbi.Order.
Why do we have two class types of order if it means the same thing but lives in the different phase of its life cycle?
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DanielSanMartin, Yesterday, 02:37 PM
|
2 responses
12 views
0 likes
|
Last Post Today, 05:26 PM | ||
Started by DJ888, 04-16-2024, 06:09 PM
|
4 responses
12 views
0 likes
|
Last Post
by DJ888
Today, 04:28 PM
|
||
Started by terofs, Today, 04:18 PM
|
0 responses
11 views
0 likes
|
Last Post
by terofs
Today, 04:18 PM
|
||
Started by nandhumca, Today, 03:41 PM
|
0 responses
7 views
0 likes
|
Last Post
by nandhumca
Today, 03:41 PM
|
||
Started by The_Sec, Today, 03:37 PM
|
0 responses
3 views
0 likes
|
Last Post
by The_Sec
Today, 03:37 PM
|
Comment