NexusFi: Find Your Edge


Home Menu

 





order cancellation


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one mrticks with 4 posts (2 thanks)
    2. looks_two baruchs with 4 posts (0 thanks)
    3. looks_3 monpere with 2 posts (0 thanks)
    4. looks_4 kaywai with 2 posts (0 thanks)
    1. trending_up 7,364 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 11 posts
    2. attach_file 0 attachments




 
Search this Thread

order cancellation

  #11 (permalink)
 
mrticks's Avatar
 mrticks 
Dublin, Ireland.
 
Experience: Advanced
Platform: NinjaTrader, TOS, Multicharts, Open Source various
Trading: FDAX, cable/yen, FX, options on commodities
Posts: 67 since Jun 2009
Thanks Given: 16
Thanks Received: 10


baruchs View Post
EnterLongLimit(Price);
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?
Baruch

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.

 
Code
/* 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))
                ExitLong();
Sample strat from the NT site:

Strategy: Keeping orders alive - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quantum physics & Trading dynamics
The Elite Circle
What broker to use for trading palladium futures
Commodities
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
  #12 (permalink)
 baruchs 
Israel
 
Experience: Intermediate
Platform: NinjaTrader
Broker: pfg
Trading: eminis
Posts: 323 since Jun 2009

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.

Baruch

Reply With Quote




Last Updated on December 9, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts