NinjaTrader users: have you encountered this?

Discussion in 'Trading Software' started by ArcticTrader, Jun 8, 2009.

  1. ArcticTrader

    ArcticTrader Guest

    I am not getting a lot of help with this right now on the NT support forums, so I thought I would ask here to see what other people have experienced with NinjaTrader, and if anyone has seen this behavior before.

    Right now I am just running it in simulation mode, which is where the issue is occurring.

    I have recently completely wiped my PC, installed a clean copy of 32-bit XP Home, and tweaked it to be completely set up for performance (i.e, no extra graphics, indexing disabled, etc.). I have even launched NT as a realtime priority process, and used a CPU affinity program to assign anything else that might be running to one of the other cores on my quad-core CPU (so NT has 3 cores all to itself, not that it's taking advantage of that anyways). I also created a 1 Gig RAM Drive and put my pagefile.sys on there to reduce disk swapping.

    My system is a Core i7 920 with 12 gigs of RAM, although at the moment obviously only 3 Gigs are addressable with a 32 bit OS on there. Currently Windows reports 1 Gig of ram still free with the above-mentioned settings.

    Here is my issue, which occurs with the simulator:

    Whenever the volume is very heavy, the actual processing of trades is usually delayed by a sometimes significant margin. For example, today in heavy volume I pressed the market buy key, and while the Red X appeared immediately in the SuperDOM, the system just hung for about 5 full seconds before I finally heard the "order filled" message - at whatever the price had already spiked to.

    I have the following charts open:

    A 1-minute candle chart with bollinger bands, volume, stochastics, and inverse fisher transform. (CalculateOnBarClose is set to false for volume/stochs/fisher, true for bollinger. The look-back period is set to 100 bars.)

    A 3-minute candle chart with exactly the same settings as above.

    A 4-Range chart with no indicators at all (price only), set to 1-day lookback period.

    A 4-Range chart with 3 moving averages and CalculateOnBarClose = true, lookback period of 1000 bars (around 1 day or so on YM which is what I was trading)

    A 2-Range chart with a double MA and bollinger bands, CalcOnBarClose = true, lookback period of 350 bars.

    A 20-second chart with bollinger bands, set to calcOnBarClose = true, simple volume indicator with calcOnBarClose = false, lookback period = 200 bars.

    Time and Sales window (91 rows)


    That's it. 6 relatively simple charts, with very small lookback periods, using mostly off-the-shelf indicators, plus one T&S and one DOM... I do have a bit of custom code in an indicator that uses about 4-5 very simple if/then statements in C# to decide which color to paint the bars, but that can't be causing this issue since the processing time for that is negligible.

    Also, my database file is brand-new, as I just renamed the old one this morning - so that's not the issue either. I have set Enforce Immediate Fills in the simulator options section to true, although the issue happens whether that is checked or not.

    This is the most simple setup I can come up with that allows me to trade my style, and basically at the moment NT is making it very hard for me to do that, at least in demo mode.... I need to be sure that when I click the market order button that my order gets sent to the exchange right then, and not after NT is finished doing something else first.

    So here are my questions:

    1. Does the setup I described sound like it should be causing NT this many problems on my machine? (The 6 charts are pretty simple and my CPU is powerful... this shouldn't be happening, no matter what.)

    2. Have you ever heard of a situation where an order can take up to 5 seconds to be placed for real at the exchange, even if the system is overburdened with too many charts? I can't imagine that this would be the case, or else nobody would be using NT.

    3. Is anyone running with a setup that is at least as complicated or more complicated than this, and what is your real-world performance like? How long between the time you click the market order button and the time you hear the confirmation come back, best-case and worst-case? How many charts do you have open, and what type of calculations are being done?

    My main concern obviously is that this doesn't occur during live trading - I would like an answer to this before I attempt to try it out with real trades...

    Thanks a lot in advance!
  2. IB and API with a little Visual C will solve all your problems.
  3. I would not use IB with NT for scalping. You wrote a lot of words, but I don't see the mentioning of your broker and datafeed.

    Try NT / Zenfire broker - they are not hard to find. They should be able to give you a datafeed trial without opening an account. Report back if you are still having the same problem.
  4. ArcticTrader

    ArcticTrader Guest

    Sorry, I forgot to mention - I am already using Zen-Fire with an account at Mirus futures.

    Just to be clear, this is not an issue with the broker or the feed. The data is coming in just fine over the time & sales window (I verified that it's accurate and timely)... it's just a question of NT hogging CPU resources with whatever it is doing before it places the simulation trade.

    From NT's help guide:

    "NinjaTrader provides a state of the art internal simulation engine that you can use to test trading ideas and hone your skills. The simulation engine is not a simple algorithm that fills your order once the market trades at your order price. The engine uses a scientific approach to determine fill probability by including a number of variables including ask/bid volume, trade volume, time (to simulate order queue position) and random time delay for switching between order states."

    This tells me that it is doing some relatively complex calculations before it places the trade... and when the volume spikes it can't keep up, therefore placement of simulated trades is delayed.

    Now, this is just my THEORY on what is going on, because so far I can't get anyone at NT to confirm this.

    What I really want to know, for those of you that are trading live with NT + Zen-Fire, is whether or not having a bunch of charts open can significantly degrade REAL-WORLD trade placement. In other words, are you running with more than 6 charts with more complex indicators than what I described, and if so, what is the lag you experience (if any) during the highest volume market times? Have you ever seen delays in the multiple-seconds time frame?
  5. Yea, I have expierienced the same thing with a live feed, real $ account. I am in the middle of moving my account to Mirus, they have Zen Fire. I am told that I shouldn't have that issue any more. We will see.
  6. ArcticTrader

    ArcticTrader Guest

    Well, hopefully live accounts won't have this problem... I can tell you that the demo using Mirus definitely does. I really don't think it's a broker thing though... the broker is just responsible for getting the data to the software, and that is happening OK (I have confirmed this by quoting prices over the phone with a Mirus rep, and he said that my quotes were right on).

    This is purely an issue with NinjaTrader itself placing trades (at least demo trades, anyways, haven't tried it yet live).

    If anyone is using Mirus or another Zen-Fire broker and placing live trades with NT, please let us know how many charts you have open, and what type of lag you are experiencing in heavy market conditions... thanks a lot!
  7. lakai


    happens all the time if you you have time and sales with a direct "refresh=false" option checked. Even on a fast computer with fast connection. You could try turning off market replay and clear out your "trace" directory and see if it helps.
  8. ArcticTrader

    ArcticTrader Guest

    Market replay is off - I will try clearing out my trace directory. It is absolutely RIDICULOUS that a time and sales window can cause this type of processor delay... I ran a system 5 years ago that had real-time stock quote and time & sales streaming in with plenty of charts open, and it was only a 400 Mhz pentium.

    The fact that these guys can't get it together enough to provide real-time T & S without chewing up one of the most powerful computers you can buy in 2009 is an example of gross programming incompetency on someone's part.

    Has anyone else experienced this kind of problem with other futures trading software? If NT 7 doesn't fix this problem in the next few weeks, I will be looking for another broker, preferably one that uses software programmed by people who actually learned how to write code properly.
  9. lakai


    tell me about it.. I its really junk, thats why I chose not to renew my subscription because I'm going back to X-trader.

    I gave it a chance, even paid for it but it always freezes on startup, takes forever to load, can hang under any REALTIME conditions in heavy market conditions. Hopefully they'll get their S* together on the next release.
  10. ArcticTrader

    ArcticTrader Guest

    I chose Mirus and NT because a number of people were raving about it on these forums... why do people say that NT + Zen-Fire is "rock-solid" when it can't even handle a time and sales window in real-time without choking? Are they insane?

    Anyways, it appears that the geniuses over at NinjaTrader have finally gotten around to hearing about multi-threaded programming and multi-processor systems, so the next version of NT should alleviate this problem by allowing me to run the T&S on a separate core, even if they haven't made it more responsive. Oh yeah, and apparently someone told them that 64 bit operating systems exist (they've only been around for half a decade now), so they're finally supporting that as well. Unbelievable that I am still forced to run a single-threaded trading program on a 32-bit windows box in mid-2009.

    If NT 7 doesn't work out, what other recommendations do people have for discretionary trading of futures? (I don't want to pay $500/month, and I want to have the ability to trade on a rock-solid platform with no lag or order placement issues. Custom indicators would be nice too.)
    #10     Jun 8, 2009