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 Quick Summary with 1 posts (0 thanks)
    3. looks_3 Adamus with 1 posts (0 thanks)
    4. looks_4 Fat Tails with 1 posts (2 thanks)
    1. trending_up 2,484 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Latency in Ninjatrader

  #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?
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
Adamus's Avatar
 Adamus 
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
Posts: 1,085 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 Twitter 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,583 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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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


© 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