order cancellation (Page 2) - NinjaTrader Programming | futures.io
futures.io futures trading

Go Back   futures.io

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

order cancellation
Started:December 15th, 2009 (09:42 AM) by kaywai Views / Replies:3,308 / 11
Last Reply:December 9th, 2010 (03:33 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

order cancellation

Old December 8th, 2010, 03:19 PM   #11 (permalink)
Elite Member
Dublin, Ireland.
Futures Experience: Advanced
Platform: NinjaTrader, TOS, Multicharts, Open Source various
Favorite Futures: FDAX, cable/yen, FX, options on commodities
mrticks's Avatar
Posts: 67 since Jun 2009
Thanks: 16 given, 9 received

baruchs View Post
Will be valid for 1 bar. Of course if you issue this order on each bar then until you stop doing it the order will exist.

How do you want me to respond to it?

No need. I just looked over the sample live until cancelled strategy and you have to set false in the enter limit section in order for the order to cancel after one bar close.

If set to true then the order is kept alive until cancelled.

/* CrossAbove/Below conditions usually do not evaluate to true for several bars in a row.
               If we submitted with liveUntilCancelled = false our order would be cancelled on the next bar as the condition is no longer true.
               If we wanted to persist our order we would want to use liveUntilCancelled = true. */
            if (CrossAbove(SMA(Fast), SMA(Slow), 1))
            /*     This order is kept alive until explicitly cancelled. For information on how to explicitly cancel this order please see this reference sample:
                http://www.ninjatrader-support2.com/vb/showthread.php?t=18890 */
                EnterLongLimit(0, true, DefaultQuantity, entryPrice, "live until cancelled long");
            if (Close[0] > Open[0])
                // This EnterLongLimit is cancelled if the conditions that caused it are no longer true. It is then resubmitted upon the conditions being true again.
                EnterLongLimit(0, false, DefaultQuantity, entryPrice, "long order to be resubmitted");
            if (CrossBelow(SMA(Fast), SMA(Slow), 1))
Sample strat from the NT site:

Strategy: Keeping orders alive - NinjaTrader Support Forum

Reply With Quote

Old December 9th, 2010, 03:33 AM   #12 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
Posts: 322 since Jun 2009
Thanks: 6 given, 200 received

Limit orders have 6 overloads. Only one has "live until cancel true/false". All other are valid for only one bar unless you renew it on the next bar. The one that has LUC you only need if you have more than one time frame in your strategy. So why use it if you don't have more TF's.


Reply With Quote


futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > order cancellation

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Corey Rosenbloom: Tips, Tactics, and Real Trades: Trading Intraday Trend Reversals

Elite only

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
Multi Time Frame Strategy Cancellation jthom NinjaTrader Programming 2 October 9th, 2014 11:00 AM
Order Ticker Default User The Elite Circle 30 July 20th, 2011 10:58 AM
Limit Order LukeGeniol Terms (Glossary) 0 June 29th, 2010 01:38 AM
Stop Order Big Mike Terms (Glossary) 0 June 28th, 2010 12:25 AM
Z-Order Programmically DavidHP NinjaTrader Programming 3 April 30th, 2010 06:54 PM

All times are GMT -4. The time now is 05:12 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-21 in 0.07 seconds with 19 queries on phoenix via your IP