How to identify the order that was just executed. - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

How to identify the order that was just executed.
Started:October 23rd, 2011 (03:30 PM) by hcoffin1941 Views / Replies:461 / 2
Last Reply:October 23rd, 2011 (07:12 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

How to identify the order that was just executed.

Old October 23rd, 2011, 03:30 PM   #1 (permalink)
Elite Member
Fresno, CA USA
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: ES
Posts: 4 since Oct 2011
Thanks: 4 given, 1 received

How to identify the order that was just executed.

I am building a strategy that enters two limit orders. How can I determine which of the two limit orders was executed when the OnExecution() method is triggered? The purpose here is to identify the limit order that was not executed and cancel it. Please provide the answer in sample code.

Reply With Quote

Old October 23rd, 2011, 07:02 PM   #2 (permalink)
Site Administrator
Manta, Ecuador
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
Big Mike's Avatar
Posts: 45,432 since Jun 2009
Thanks: 28,836 given, 79,556 received

Thread Moved

Moved to NinjaTrader Programming

When creating a new thread, note which subforum you are in. Here is a short list of suggestions:

- Topic: Anything to do with an Elite indicator -> Subforum: The Elite Circle
- Topic: Looking for an existing indicator, or how-to use an indicator -> Subforum: (the platform)
- Topic: Programmer needing help with non-Elite indicator -> Subforum: (the platform) - Programming
- Topic: Want an indicator created/modified -> Reply to "Want indicator created free" in Elite Circle
- Topic: Vendors (trading rooms, commercial indicators) -> Subforum: Vendors/Product Reviews
- Topic: Discussion of Forex or Currency trading -> Subforum: Forex and Currency Trading
- Topic: Journals of your trading -> Subforum: Trading Journals or Elite Trading Journals
- Topic: General trading related discussions -> Subforum: Traders Hideout
- Topic: Discussion of a trading method -> Subforum: Traders Hideout
- Topic: Automated Trading -> Subforum: Elite Automated Trading

Last, any Elite Member may create more or less any of these topics in The Elite Circle at your own discretion (your support is appreciated).

This is just a short general list and doesn't cover everything. If you are unsure where to create your new thread, just create it in Traders Hideout and a moderator will move it if necessary.

-- Big Mike Trading

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote

Old October 23rd, 2011, 07:12 PM   #3 (permalink)
Elite Member
Austin, TX
Futures Experience: Beginner
Platform: NinjaTrader, TOS
Favorite Futures: Stocks
Posts: 4 since Sep 2011
Thanks: 2 given, 0 received

Hcoffin1941, I am new to NinjaTrader, but I think, you would be having two names for the two limit orders, so you should be able to check the status of the order with something like "if (order.OrderState == OrderState.Filled)".
Like I said, I am new to NT and this forum. I am still learning, so please excuse me if I am wrong.

Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > How to identify the order that was just executed.

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get the name of the order filled? skan EasyLanguage Programming 12 September 16th, 2011 05:32 PM
How to identify large trades? PeterOhlson The Elite Circle 9 September 7th, 2011 10:50 AM
Which indicators do you use to identify sentiment? Fat Tails The Elite Circle 11 May 9th, 2011 04:17 AM
Order Management togier Traders Hideout 4 April 10th, 2011 12:25 PM
Stop Order Big Mike Terms (Glossary) 0 June 28th, 2010 12:25 AM

All times are GMT -4. The time now is 09:42 AM.

Copyright © 2016 by All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts

Page generated 2016-10-22 in 0.08 seconds with 25 queries on phoenix via your IP