NexusFi: Find Your Edge


Home Menu

 





How bad is NT lag?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one shortski with 17 posts (2 thanks)
    2. looks_two chipwitch with 16 posts (20 thanks)
    3. looks_3 phantomtrader with 7 posts (6 thanks)
    4. looks_4 iq200 with 3 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 8 thanks per post
    2. looks_two glennts with 4.5 thanks per post
    3. looks_3 Miesto with 4 thanks per post
    4. looks_4 chipwitch with 1.3 thanks per post
    1. trending_up 32,348 views
    2. thumb_up 142 thanks given
    3. group 745 followers
    1. forum 137 posts
    2. attach_file 4 attachments




 
Search this Thread

How bad is NT lag?

  #41 (permalink)
moneymarkets
USA
 
Posts: 3 since Jul 2009
Thanks Given: 0
Thanks Received: 0

How good is your internet connection?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #42 (permalink)
 Magdin 
Milan Italy
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: ES
Posts: 2 since Mar 2018
Thanks Given: 2
Thanks Received: 3


chipwitch View Post
I had 16 points in MES trade nearing the close. The chart showed 16pt, but the PnL marker showed I had a profit of $2.50. So, I flattened everything. I lost over 10 points! How do you all deal with the lag? I have a 6 core i-7 with an ssd, 16gb ram an Nvidea 1050ti with 2gb ram. I had several charts up but only one instrument with different timeframes and indicators.

Hi, I had a similar issue. I fixed it reducing the amount of historical data to max 5 days (tick data) loaded and closing all not necessary workspaces.

Reply With Quote
Thanked by:
  #43 (permalink)
 sbgtrading 
Chicago
 
Experience: Advanced
Platform: NinjaTrader, MT4, TS
Posts: 17 since Mar 2010
Thanks Given: 3
Thanks Received: 9



chipwitch View Post
I had 16 points in MES trade nearing the close. The chart showed 16pt, but the PnL marker showed I had a profit of $2.50. So, I flattened everything. I lost over 10 points! How do you all deal with the lag? I have a 6 core i-7 with an ssd, 16gb ram an Nvidea 1050ti with 2gb ram. I had several charts up but only one instrument with different timeframes and indicators.

I tech support hundreds of NT users...and the problem is likely related to your CPU model (if it was released more than 3-yrs ago, I suggest an update). To find out what was the release date of your CPU model, visit this site: https://www.intel.com/content/www/us/en/search.html?ws=text#sort=relevancy

Also, your ram is a bit light...I'm recommending 32gb. But much of this is dependent on how many indicators you're running, and if those indicators are programmed correctly.

Reply With Quote
  #44 (permalink)
 jengland 
Melbourne/Australia
 
Experience: Intermediate
Platform: Ninjatrader
Trading: Oil
Posts: 5 since Feb 2014
Thanks Given: 1
Thanks Received: 1

Hi I am a heavy user of NT.

The trick is to set your data series /time frame/ to load data based on bars instead of days. I usually set mine to 5000. That should do it.

If it still happens then find your indicators that are calculating by tick and change them to price change.

That?s should help but I would do step one before step 2.

Hope that helps. This was on Es when it was going nuts. Took me ages to work it out. I have a semi decent machine but until I did that nothing mattered.

Reply With Quote
  #45 (permalink)
trader15
Vadodara/Gujarat
 
Posts: 6 since Nov 2017
Thanks Given: 3
Thanks Received: 4

first thing, practically these days PC specs does not have anything to do with net speed, they are much over powered to trasnmit market order data.

reson for lag is due to order execution and there are many reasons for this, such as,
> most obvious is, reaction time. once you see the price and hit the order (assuming that you have already entered right price before hand!)
> second most obvious is sudden gap/jump in price, which can happen anytime, no reaction speed can overcome this
> then comes, as most will comment here, is your internet lag (mostly random). you might hav high BW net but if there are other devices such as IPTV or PC/phone background updates etc are most common to introduce random short lags of few hundred milliseconds.
> combo of random lags and price jumps can also be a source of problem.
> poor internet, but I dont think this could be the reason in your case !! My 30mbps net works with reasonably good order exec speed

now, how to avoid this,
> most obvious, again, is to place bracket or single target orders with most likely prices
> avoid parallel use of internet, such as using IPTV or set-top boxes or disable PC/phone updates during market hours
> avoid trading positions during market opening/closing times (approx 30min) or around govt announcement events

Reply With Quote
Thanked by:
  #46 (permalink)
GinTrader
San Francisco USA
 
Posts: 15 since May 2018
Thanks Given: 4
Thanks Received: 30

Hi,
I have had similar problems in the past. With everyone pointing the finger at the other parties.
I'd first establish if the issue is being caused by your PC, trading software, execution software or your internet connection.
First thing I would do is ping the exchange location from your location, if you are getting more than 200ms ping from your location to the exchange location then it's not ideal to be trading the shorter time frames and you will get major slippage in fast markets.

Reply With Quote
  #47 (permalink)
 TradeWithTrend 
El Paso, TX
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 4 since Dec 2021
Thanks Given: 1
Thanks Received: 1

Hi Chipwitch. You've gotten a chain of solid replies and suggestions. So I have little to add.

I have an older laptop with Win7 and NT7 on it 8 GB Ram, never any delays even in fast markets that I can tell. 6 windows open with a number of indicators. When trading on it, NT7 is all I used to open, no other pgms. It's now become obsolete due to a new laptop, but it still runs fine with no lag when I turn it on with NT7.

Now I use a ROG Zephyrus gaming laptop, 16 GB using NT8. I also never have any other pgms open when I'm trading. I don't mention all the computer specs here as I don't think actually that's your problem. This is a fast off-the-rack laptop, I made no upgrades to it. I have 13 windows open, 7 are connected to the same futures contract,the rest each a different futures. All windows have indicators.

My 3 base charts are on the laptop, one monitor has 7 charts of 7 different futures and indicators including a custom indicator I had built. A 2nd monitor has 3 charts with their own indicators, things that have their purpose at particular times. Point is, running far more load than what you appear to, and never have any lag.

My internet speed test comes in at 215 Mbps. The wireless router is a few feet from where I trade. I have no other use of the internet going while trading. There are others in the house but I can't speak to their use. Just no issues. I should say, this hasn't always been the case living at other places with other internet providers and other levels of service, so I've experienced lag issues here and there in the past but with this service I can absolutely say, those problems must have been internet related. I'm using the same equipment.

Re: the custom indicator strategy I had built, since I've been using it I had a few problems with NT8 which I never experienced before. On my laptop, my middle screen froze on which I have chart trader and where I place my trades. The other charts were still fine, just that one froze. It happened 3 times. Been fine now for a month, no issues. Still haven't figured out what the problem is, but I'm 99% sure it has to do with that custom script. I contacted NT8 and they looked into my log files, they saw the problem but they didn't see it being an issue with NT8.

Hope this helps in some way.

Reply With Quote
Thanked by:
  #48 (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

NinjaTrader lets you do all sorts of things, and if one does not pay attention and let it do all sorts of things and at the same time, this may cause a problem. A CPU only has a limited amount of capacity, and it is also the responsibility of the user to make sure that there is no overload. I am writing this, because I have already helped a few users to bring down the CPU load.
Of course, there are limits of what NinjaTrader can do. If you are watching 20 different symbols on 40 different charts, and all with complex indicators, NinjaTrader will bog down.

In case charts freeze or in case that the datafeed appears to be lagging on the chart, it may be

- an issue with the CPU (frequent)
- an issue with RAM (depending on PC and other applications)
- an issue with the graphics adapter (only with high resolution screens)
- an issue with the internet connection (depending on your location)

Here are some of the typical causes for freezes:

Using badly coded indicators that have not been tested

NinjaTrader lets you import and use all sorts of indicators. 80% of the free indicators you will find are not properly coded. A badly coded indicator may easily consume 100 times more CPU capacity than one which is well coded.

Running indicators in Calculate.OnEachTick

For each indicator which you apply to a chart think twice before you set it to Calculate.OnEachTick or Calculate.OnPriceChange. NEVER use the setting Calculate.OnEachTick, unless you have a volume indicator! But pay attention that you NEVER use a volume indicator with the setting Calculate.OnPriceChange, because volume will not be counted correctly.

Wherever possible, set the indicators to Calculate.OnBarClose. If you use minute charts, this may reduce the CPU load by a factor 1000 during a news release. When set to Calculate.OnEachTick indicators recalculate with every tick, when set to Calculate.OnBarClose, the indicators recalculate once every x minutes.

Not dealing with hidden charts

Does a hidden indicator which is on an inactive chart need to recalculate and consume resources? You cannot see it anyhow. So why let it run? The answer is that you may want to use it for generating for alerts. If your indicator is supposed to trigger alerts it must also run on the hidden chart, because otherwise you will not get them. If it does not trigger alerts, there is no need to recalculate the hidden indicator. The actual behavior depends on the indicator and how it has been coded. If you look at the indicators that ship with NinjaTrader, they do not have inbuilt alerts, and they are simply suspended when running on a hidden chart. Suspended indicators create zero load for the CPU, as both OnBarUpdate() and OnRender() are no more running. Do you know whether the indicators you use are suspended on inactive charts? Check whether "IsSuspendedWhileInactive" is set to "True" or "False" in the Initialize section of the indicator. You may change the code.

Not dealing with hidden workspaces

Make sure that you are not running any hidden workspaces in the background that contribute to CPU load.

Use of many high resolution monitors

Basically, NinjaTrader only requires a 2D graphic card. If you are running 3 monitors with a low resolution of 1920 x 1200, possibly every graphics adapter with more than 2 GB of RAM can handle it.
Now, if there are many large high resolution screens, the graphics adapter may run into a RAM problem. In such a case the monitor resolution should be reduced. I have been using passive graphic adapters with up to 3 monitors some time ago. No problem during years.

Bottlenecks for internet connection

My internet provider, a large European telecommunications company, controls the last mile and provides for good connections throughout Europe. However, to connect to my US data provider, I need to logon to a server located near Chicago. For this purpose, my data provider has rented underwater cable capacities from NTT. Sometimes in the European afternoon, there are too many cat videos and too much war propagada passing through the lines, and I may have a latency problem. Although this is a pretty rare occurence, I do have a second backup connection with another internet provider. THe second provider usually does not use the same underwater cable. I am regularly checking connections to the US with PingPlotter. How do you know that your datafeed is not delayed?

Just set indicators to Calculate.OnBarClose and make sure that indicators are suspended on inactive charts if possible!

I have seen some PCs that had freeze problems during news releases, and the most common problems were

- too many open charts and workspaces
- use of badly coded indicators
- too many indicators set to Calculate.OnEachTick or Calculate.OnPrice change
- too many indicators running on hidden charts and not suspended
- running complex indicators on high resolution charts built from fast bars

One really needs to go through your charts and make them lean. If you set all your indicators to Calculate.OnBarClose, it is next to impossible to have a freeze during a new release. Suspended indicators on hidden charts are not generating any CPU load at all.

Just writing this, because it already helped in a few cases.

Reply With Quote
  #49 (permalink)
miche
Orlando, FL
 
Posts: 6 since Jun 2020
Thanks Given: 27
Thanks Received: 0


chtulhu View Post
Wrong question! NT lag may be a problem, but FLATTEN is your main problem and always will be.
Flatten closes using market price, and in a high volatile situation that always occurs at the close, what you see is not always what you get when you use Flatten.
Best thing to do: get used to using limit orders for your trades: opening or close!
Hope I've been of use to you. is not the reason you lost so much.

Nice said

Reply With Quote
  #50 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,168 since Jan 2013
Thanks Given: 57,452
Thanks Received: 26,278



socaltrader View Post
sounds like it's time to transition to Sierra Chart


chipwitch View Post
Funny you should mention that. I just downloaded it and activated my free trial.

It looks like their dom has all the same features available that Jigsaw does. I was going to buy Jigsaw until I saw I had to shell out $600 PLUS $50 a month for something that may not fit with my trading style and doesn't even include data. SC is less than $50/month all in! If I don't like it, I cancel it. No harm, no foul.

I'm not crazy about the interface, but once it's setup I expect it will be great.

Heh, heh. I wasn't going to mention Sierra Chart, but since the subject has been raised....

I left NT8 some years ago, to Sierra Chart. To be fair to NT, that was near the end of the rollout period for NT8 (which was a very, very long period as they dealt with various issues -- probably it's much better now.) But I was and am using an old laptop to trade on. It gassed out on NT8 very quickly if I asked it to do much at all. It runs SC without a problem, and I am asking a lot of it. Again, this is not NT's recommended hardware platform, but SC isn't bothered by it.

One reason is simply that SC is entirely written in C++. NT is actually written in C#, and for NT8 they went to WPF. So NT is inherently slower and takes more resources. (If you know any C languages, such as C#, writing your own indicators in C++ for SC is an easy transition.)

On the other hand, many are using NT8 with no issues. I suggest you take a good hard look at @Fat Tails' post in this thread. He is probably the best, certainly one of the best, NT coders on the forum. His suggestions should be given weight, and he lists quite a few that have addressed problems for other people:


Fat Tails View Post
NinjaTrader lets you do all sorts of things, and if one does not pay attention and let it do all sorts of things and at the same time, this may cause a problem. A CPU only has a limited amount of capacity, and it is also the responsibility of the user to make sure that there is no overload. I am writing this, because I have already helped a few users to bring down the CPU load.

------------------------

As to Sierra Chart, which I remain with and am happy with, there are always going to be pluses and minuses to anything:

One Minus: the interface is truly clunky and hard to figure out. So is the online "Help".

But, a Plus: if you can find out how to do it, it probably will do everything you can think of, including washing your car and walking your dog. But the best way to find something is to use Google to search, rather than their own Search function, or trying to find something via the menus. It's all there, but let's just say that it's not necessarily laid out as you expect.

Another Minus: they have a support board to report bugs and other issues, but they also have a chip on their shoulder about users wasting their time (their words.) They will get very cross with users they think are wasting their time.

But Another Plus: I have always had good responses from support, probably because I had real bugs that I had researched and replicated before reporting. They had new versions with a fix out the next day. I was impressed.

Another Minus: if you go with them, you'll need to change brokers. But there are several who use them.

One could go on.

My bottom line is that it is technically very powerful, very fast, very full-featured, and the downside is that they care not very much about customer service, and seemingly not about customers at all. Their attitude is famous, and always has been. Technical excellence is their thing. They will tolerate and accept you if you are technical too. Less so, if you're just a user.

They will also sometimes go on very fringy right-wing political rants, but it doesn't impact me so I tune it out.

I have absolutely no idea if they have anything that is any good for DOM or order flow, since I don't use it and never have tried. I assume they do.

There is big learning curve, but it is worth a trial. I don't know if it will provide what you need, but I don't think you'll see any huge lags, either.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote




Last Updated on October 23, 2022


© 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