NT8 Lightweight - Script to Collect Garbage or Cache clearing

Discussion in 'App Development' started by rutariq234, Jun 11, 2019.

  1. Hi
    I am looking to find out if it is possible to collect garbage to free memory, or free up any cache or some similar sort to ensure a lightweight application running at any given time. Other than clearing the /db/ folder what else that could cleared?

    If so, could a script be written to achieve so?

    The reason for my post is that I feel NT8 slows down after running for some time have to restart, have to clear the /db/ folder. After some time for a given workspace its slows down further, have to clear a duplicate WorkSpace or rename helps somewhat. Eventually after some time have NT8 is slow anyhow, and have to uninstall and re-install the whole application, and its a pain to bring back everything back to its intended settings etc.

    I am looking to hire a programmer if such a case.

    TR-
     
  2. cafeole

    cafeole

    I use NT8 all the time and this is not normal behavior. Contact their support.
     
  3. Tasuki

    Tasuki

    I had to stop trading with Ninjatrader because their platform slowed down when I had several charts open. There used to be a thread on their forum where dozens of traders complained about this, but NT deleted the thread because it was too threatening to its business. The fact is, NT is coded by people who have no clue what they're doing. Now I'm using Tradestation on the same computers as I used NT and I have no such problem. Sorry, but there is no good fix that any of NT's forum users were able to find.
    Tasuki
     
  4. fan27

    fan27

    I am running close to 60 intra-day futures strategies concurrently in AlgoTerminal without any issues. No platform is perfect but if you are unable to resolve your system stability issues, I suggest you look else where for a solution.
     
  5. SteveH

    SteveH

    Do you have a lot of charts where CalculateOnBarClose is set to false and the instruments have high tick counts? If so, maybe it's because there's a lot of unnecessary calculations going on with long series of the same LAST price coming in.

    I was thinking a way around this is to go into the OnBarUpdate functions and, at the top of them, add code to compare the previous LAST price with the current LAST price. If they're equal and the new one isn't occurring on a FirstTickOfBar, simply return, avoiding any unnecessary recalculation overhead.

    Another in-between approach is to throttle the ticks (when CaclulateOnBarClose = false) where, when you don't have a FirstTickOfBar condition, skip processing OnBarUpdate() until X number of ticks have passed by.

    As a simple test first, see how your charts are when all of your indicators have CalculateOnBarClose to true.

    Just ideas. I have no dog in this hunt.

    I looked up AlgoTrader. You have to e-mail them to find out how much it costs? That's dumb.
     
    Last edited: Jun 12, 2019
  6. Splat

    Splat

    I got the following script from futures.io which may help:


    rem Developed by Christian Ejstrup and Bob Cometta. We hope that this will help all with NT 8 memory issues.
    rem Drop into your MyDocuments\NinjaTrader 8 folder and change from a .txt to a .bat file.

    rd /s /q "cache"
    md "cache"

    rd /s /q "db\cache"
    md "db/cache"

    rd /s /q "db\day"
    md "db\day"

    rd /s /q "db\minute"
    md "db\minute"

    rd /s /q "db\tick"
    md "db\tick"

    rd /s /q "tmp"
    md "tmp"

    rd /s /q "trace"
    md "trace"

    rd /s /q "log"
    md "log"

    rem start "Ninjatrader 8" /high "C:\Program Files (x86)\NinjaTrader 8\bin64\NinjaTrader.exe"