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 Quick Summary with 1 posts (0 thanks)
    4. looks_4 MrYou with 1 posts (0 thanks)
    1. trending_up 2,466 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?
Post-Summit Scorecard: $36M in May 15 Bets Settle Near-Z …
Prediction Markets & Event Contracts
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
April Jobs Beat Flips Fed Hike Odds Past 52% for First T …
Traders Hideout
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
Khamenei Vetoes Uranium Transfer as Peace Odds Surge to …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
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