NexusFi: Find Your Edge


Home Menu

 





Programming another limit order if order isn't filled?


Discussion in NinjaTrader

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




 
Search this Thread

Programming another limit order if order isn't filled?

  #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?
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
NexusFi Journal Challenge - May 2024
Feedback and Announcements
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
35 thanks
Tao te Trade: way of the WLD
25 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #3 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 650 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 - [AUTOLINK]NinjaTrader[/AUTOLINK] 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: 403 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: 650 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


© 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