NexusFi: Find Your Edge


Home Menu

 





Programming another limit order if order isn't filled?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one ericson with 2 posts (0 thanks)
    2. looks_two gregid with 2 posts (2 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 MrYou with 1 posts (0 thanks)
    1. trending_up 2,523 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19

So i am doing limit orders for cash forex and sometimes it isn't filled. So how do i program or what do i use to check if it was cancelled and then send a new limit order to get the next best fill?

I've been looking at IOrder and and OrderState.Accepted and OrderState.Cancelled. Has anyone run into this?


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Third Circuit Backs Kalshi in Landmark Ruling -- Predict …
Prediction Markets & Event Contracts
Cboe Launches BITVX Bitcoin Volatility Index and Unveils …
Prediction Markets & Event Contracts
TradingView Opens Volume Footprint Data to Pine Script - …
TradingView
BofA Projects $1.1 Trillion in Sports Event Contracts -- …
Prediction Markets & Event Contracts
Q1 2026 Shatters All Derivatives Volume Records -- CME H …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks
  #3 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 649 since Aug 2009
Thanks Given: 320
Thanks Received: 623


Yes, you will have to use IOrders for this. Check the reference sample from NT forums:
Strategy: Using OnOrderUpdate() and OnExecution() methods to submit protective orders - NinjaTrader Support Forum

This should give you a place to start.


Reply With Quote
Thanked by:
  #4 (permalink)
 
MrYou's Avatar
 MrYou 
NC, USA
 
Experience: None
Platform: None Yet
Trading: Guitar
Posts: 402 since Jun 2011
Thanks Given: 618
Thanks Received: 196


ericson View Post
So i am doing limit orders for cash forex and sometimes it isn't filled. So how do i program or what do i use to check if it was cancelled and then send a new limit order to get the next best fill?

I've been looking at IOrder and and OrderState.Accepted and OrderState.Cancelled. Has anyone run into this?

If you're using managed orders doesn't it submit a new order on the next bar if the rules are still valid?


Reply With Quote
  #5 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19

Good question which I dont have the answer to but would like to know also.


Started this thread Reply With Quote
  #6 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 649 since Aug 2009
Thanks Given: 320
Thanks Received: 623


MrYou View Post
If you're using managed orders doesn't it submit a new order on the next bar if the rules are still valid?

It depends on what parameters you use:

EnterLongLimit(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double limitPrice, string signalName)

If liveUntilCancelled == true, then it will keep submitting the order until CancelOrder() is called untill reaching TimeInForce condition

NinjaTrader Version 7


Reply With Quote
Thanked by:




Last Updated on January 28, 2014


© 2026 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 - Downloads - Top
no new posts