NexusFi: Find Your Edge


Home Menu

 





Latency in Ninjatrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one elitetradernyc with 2 posts (0 thanks)
    2. looks_two Fat Tails with 1 posts (2 thanks)
    3. looks_3 vvhg with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,476 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 elitetradernyc 
new york, ny
 
Experience: Intermediate
Platform: ninjatrader
Trading: stocks, options
Posts: 80 since Nov 2012
Thanks Given: 6
Thanks Received: 4

Hey guys I am no expert in trading systems development, but was wondering if there was a way to test latency in NT to make sure that #1 the data is not lagging behind and also that NT is not hung up and is still monitoring the trades.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
The Confluence Meter: A Multi-Layered Signal Framework B …
The Elite Circle
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
NinjaTrader Parent Payward Acquires Bitnomial for $550M …
Platforms and Indicators
Post-Summit Scorecard: $36M in May 15 Bets Settle Near-Z …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Adamus's Avatar
 Adamus 
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
Posts: 1,064 since Dec 2010
Thanks Given: 471
Thanks Received: 789


You can set up a timer to run an event and do stuff in your event.

 
Code
// in your OnStartUp():
					if (timer == null)
					{
						timer = new System.Windows.Forms.Timer();
						timer.Interval = 100;
						timer.Tick += new EventHandler(OnTimerTick);
						timer.Enabled = true;
					}
I've been thinking about the best way to approach the same problem but never settled on a solution. Part of the solution would be to monitor the quality of your internet connection somehow, since that is more likely to cause you problems than the actual price feed, assuming you have a reliable quote provider.


You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #4 (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,824


elitetradernyc View Post
Hey guys I am no expert in trading systems development, but was wondering if there was a way to test latency in NT to make sure that #1 the data is not lagging behind and also that NT is not hung up and is still monitoring the trades.

Data will always be lagging, the further you are away from the exchange the more lag you will experience.
You could, however measure the lag and warn on higher than usual lag, one issue here is that your computer clock might not be accurate enough.

Regarding checking NT, you would have to monitor that from a different process, as NT will not be able to respond to any internal checking when hung up...

As @Adamus suggested, checking things (internet connection, feed updates coming in) on timer tick might be the most practical way to monitor some of the stuff...

The best thing to ensure NT stability is to only have well coded indicators/strategies in NT (running or not).

vvhg


Hic Rhodos, hic salta.
Reply With Quote
  #5 (permalink)
 elitetradernyc 
new york, ny
 
Experience: Intermediate
Platform: ninjatrader
Trading: stocks, options
Posts: 80 since Nov 2012
Thanks Given: 6
Thanks Received: 4

Cool, thanks for the advice, yes I'm only really concerned with serious lags, since I've got a swing trading system, so say like 20 mins late, that sort of thing.


Started this thread Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


elitetradernyc View Post
Cool, thanks for the advice, yes I'm only really concerned with serious lags, since I've got a swing trading system, so say like 20 mins late, that sort of thing.

You will not get serious lags, if you use proper indicators and strategies. For swing trading you should be able to trade thousands of instruments simultaneously without getting any lag.

Just make sure that you have a real-time data feed.


Reply With Quote
Thanked by:




Last Updated on April 4, 2013


© 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