Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Getting expiry of Contract
Collapse
X
-
Getting expiry of Contract
How can I access the expiry information of a contact that is not the primary contract in a multi series script. For the primary contract I am using Instrument.Expiry.Month.Last edited by GKonheiser; 01-09-2014, 03:08 AM.Tags: None
-
would that be the same for Position
ie if I have a added FGBL with index location 3, can I use Position[3].MarketPosition == MarketPosition.Flat?
Comment
-
Correct, that would provided access to the Positons array for your script - this is also fully documented with an example here in our helpguide - http://www.ninjatrader.com/support/h.../positions.htm
Comment
-
Hi Bertrand,
Thanks for your help on this this morning.
Is there anything I need to take into account when writing the OnOrderUpdate for the second contract
ie if (order.OrderState == OrderState.Cancelled && order.Filled == 0),
will there be any confusion with the primary contracts orders, ie what if both contracts get a fill at the same time?
Same for OnExecution when checking for executions what if there are two fills at the same time, what happens to execution.Order.OrderState ?Last edited by GKonheiser; 01-09-2014, 07:40 AM.
Comment
-
OK, Sorry for my ignorance, but if I have a multi series script and I get two fills at the same time for two different contracts say two iOrders, longBund and longBobl , and I do a check for longBund == execution.order and longBobl == execution.order would they both come back as true, ie can execution.order be for more then one order?? does that make sense?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
646 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
367 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment