OnOrderUpdate questions - NinjaTrader Programming | futures.io
futures.io futures trading

Go Back   futures.io

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

OnOrderUpdate questions
Started:January 31st, 2014 (08:06 PM) by ericson Views / Replies:437 / 2
Last Reply:February 1st, 2014 (10:57 AM) Attachments:0

Welcome to futures.io.

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

OnOrderUpdate questions

Old January 31st, 2014, 08:06 PM   #1 (permalink)
Winning Is What I do
Los Angeles, CA
Futures Experience: Beginner
Platform: NinjaTrader, IB
Favorite Futures: Stocks, Forex
Posts: 25 since Nov 2013
Thanks: 2 given, 3 received

OnOrderUpdate questions

Ok so this is for forex 1 minute bars. I want to trigger a market order if my limit order doesn't trigger after 30 seconds into the 1 minute bar.

Will the below code trigger correctly or is only called once and isn't called again after the elapsed 30 seconds?

I was originally just going to use
OrderState.Cancelled == order.OrderState,
but thats not until the next bar

protected override void OnOrderUpdate(IOrder order)
if ( (order.Time.AddSeconds(30) == Time[0]) && (OrderState.Filled != order.OrderState) && (order.OrderState == OrderState.Working) ) { market order logic here}

Reply With Quote

Old January 31st, 2014, 08:06 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Old February 1st, 2014, 10:57 AM   #3 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
sam028's Avatar
Posts: 3,187 since Jun 2009
Thanks: 3,429 given, 3,727 received

OnOrderUpdate is called when an order status is updated, not every X seconds.
In your case, I think you should use TriggerCustomEvent() with an EventHandler(), so you can have "something" called exactly every X seconds.

Usually in trading, those who know don't talk, and those who talk don't know. (Al Brooks)
success requires no deodorant! (Sun Tzu)
Reply With Quote
The following 2 users say Thank You to sam028 for this post:


futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > OnOrderUpdate questions

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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
Beginners Questions (let the silly questions flow) Hiohn Traders Hideout 2 October 27th, 2013 11:07 PM
Questions from an up-and-comer DWyldeside Beginners and Introductions 4 October 25th, 2013 02:20 PM
ADXVMA Questions max-td NinjaTrader Programming 52 October 2nd, 2013 05:24 AM
Multicharts questions blurobot MultiCharts 28 March 22nd, 2013 06:10 AM
CL Questions jonc Commodities Futures Trading 13 February 24th, 2011 06:22 PM

All times are GMT -4. The time now is 01:56 AM.

Copyright © 2016 by futures.io. 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-26 in 0.07 seconds with 19 queries on phoenix via your IP