NexusFi: Find Your Edge


Home Menu

 





How to cancel and reorder within 1 min intrabar?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one ericson with 3 posts (0 thanks)
    2. looks_two vvhg 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,587 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 6 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 im trading EURUSD with limit orders and sometimes they are canceled, mostly selling short or selling. I want the best limit order price within the 1 min bar. I want to chase it within the bar say every 5 or 10 seconds and not wait until the end of bar to reorder.

I cant find a way to save the Iorder variable such as for a 1 sec onbarupdate interval to conduct such a method. Every onbarupdate resets all the internal script variables.

Neither using onorderupdate because its not until the next bar is it canceled and then reordered.

There seems no way around this.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Fed Hike Odds at 57% After Warsh: England Surges 12.9%, …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
  #3 (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


Execute your trades on a secondary time/data series such as a 5 or 10 seconds data series.


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

That wont work because i need COBC = true and the small interval in onbarupdate the IOrder variable is lost on each update. Again, im at a loss here.


Started this thread Reply With Quote
  #5 (permalink)
 
vvhg's Avatar
 vvhg 
Northern Germany
 
Experience: Intermediate
Platform: NT
Trading: FDAX, CL
Posts: 1,580 since Mar 2011
Thanks Given: 1,016
Thanks Received: 2,826

You could either use a timer (easy) or write your own custom event (more work, but the elegant way) for this scenario.

vvhg


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

Ive looked into trigger custom event but cant make it work. Can you point me in the right direction to do this? Sample code?


Started this thread Reply With Quote
  #7 (permalink)
 
vvhg's Avatar
 vvhg 
Northern Germany
 
Experience: Intermediate
Platform: NT
Trading: FDAX, CL
Posts: 1,580 since Mar 2011
Thanks Given: 1,016
Thanks Received: 2,826


ericson View Post
Ive looked into trigger custom event but cant make it work. Can you point me in the right direction to do this? Sample code?

Here is one example:https://nexusfi.com/download/vip_elite_circle/1331-download.html?view

There are also 100s of examples when you search via google as it's plain C# stuff.

Vvhg


Hic Rhodos, hic salta.
Reply With Quote




Last Updated on February 19, 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