Please review the LOM WIKI before posting questions to this thread. (
Hi All,
This thread is going to appeal more to Strategy Writers and Programmers. I have been an Elite member for quite some time now and have learned a lot about indicators and strategies for NinjaTrader. One thing that always bothered me about NinjaTrader was the Order Management functions. They are very basic and not very flexible. For example, it will not let you do a Trailing Entry or a Bracketed Entry. Then I started looking and some people started to code ways around these limitations with the use of some of the IORDER functions. I saw these concepts re-coded and modified to handle certain cases/approaches. All great ideas and do what they need to do, only they need to be replicated, modified, and debugged for each strategy.
The LOM (Local Order Manager) is an attempt to encapsulate all this knowledge and let it feed into even more and better improvements to the Order Management class. I have put this UNMANAGED ORDER MANAGE together over the last 6 months and feel it is now in a position where the futures.io (formerly BMT) community can benefit and help improve the features/functions. Before I go any further, let me put this out there:
Legal Stuff: Do not distribute this code compiled or in source format beyond the Elite section of Big Mike Trading. You may not claim this as your own. You may not set or in any way redistribute this code without prior authorization. This project is designed to be a way to collect the knowledge of the futures.io (formerly BMT) community to leverage and improve over time. The hopes is the work to highly profitable Automated Strategies based upon the Entry/Exit/order management provided by this class. Also, use at your own risk, be sure to fully and properly debug any code before trading live.
If you cannot agree to the above, you may not participate or use the Local Order Manager code or derived product/projects. This project is far from perfect and has many bugs! I have only used to trade 1 contract per Position number. I don't think Partial fills has been properly coded or debugged (opportunity for someone out there). Also, documentation tends to bog me down while trying to code new features. It would be great if someone is willing to take up that part of the project.
Here are a few of the features of this initial version:
Up to 10 positions for a strategy will be managed (configurable)
Tick Based Order Manager
Hiding the complexity of some powerful functions
Hooks in place to add more powerful functions and logic
Bracketed Entry (Places STOP orders above and below current Ask/Bid price catch break-away in either direction
Trailing Entry (like a trailing STOP but tries to optimize Enter around a reversal)
Break Even STOP trigger
Setting/updating the exit Stop Loss and/or Profit Target per position number as needed
Very bad programming guide (feature? most features will be demonstrated through sample code)
I hope all you programmers decide to help take a chunk of this project or contribute one of your tricks to make this system very powerful so we can all benefit. Those of you who have contributed concept their your prior work, thank you!
With that, the starting code is attached with a sample strategy showing basic features of the Trailing Entry (latest feature added, not as perfect or as easy as I would like it to be).
A Wiki has been started to handled Documentation: LOM (
The latest stable source can be found here: