Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

NT hangs on GetCurrentBid/Ask?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NT hangs on GetCurrentBid/Ask?

    I have an indicator that hangs during pre-market.

    I am wondering if this is because NT is sitting and waiting to pick up the current bid/ask.

    When I run the same indicator on MarketReplay feed, it runs fine. Also runs fine during market hours. However, in really low volume, it hangs.

    Ideas?

    #2
    StrategyBase/IndicatorBase.GetCurrentBid/Ask does not lock up NT.

    Comment


      #3
      More correctly stated I suppose, NT seems to hang between ticks.

      I can see the tick come in on the TimeSales but the chart does not update nor does it print to the Output window. It just sits there and then will print 5 ticks to the Output window....then will hang again....which is why I am wondering if it has something to do with GetCurrentBid/Ask.

      Everything hangs, including editor, all charts (can not switch between charts), etc.

      My computer however does not hang as I can use a browser for example as usual.

      Comment


        #4
        I suggest removing the indicator from the charts and retrying. If issue is gone, then it's the faulty indicator in which case I suggest contacting the author.

        Comment


          #5
          lol...very funny Dierk...I am the author.

          I am trying to debug it and I am not having much progress.

          I commented out GetCurrentBid/Ask...same hang up.....so that is not problem.

          So, I closed the chart running the indicator and no hang up w NT...confirming yet again that it is the indicator causing the problem.

          I then connect to MarketReplay and open a new chart and add the indicator. It runs fine a normal speed and 50x speed. I do everything that would hang up the same indicator on low vol/pre-market data, however I can not get it to hang up.

          So, I switch back to live feed, and it hangs. Then, thinking it might be due to checking FirstTickOfBar when there are very few bars and ticks, I switched the interval from 1 min to 10 min. I then did everything I could to get it to hang up during a 10 min bar and it would not.

          So, it has something to do with new bars and few ticks and the FirstTickOfBar condition.

          Comment


            #6
            >> I commented out GetCurrentBid/Ask...same hang up.....so that is not problem.
            Great. This confirms it's not GetCurrentBid/Ask.

            I suggest starting with a simple as possible indicator, see if it's working then adding functionality step by step to see where it breaks. Please read more here on how to debug NS code: http://www.ninjatrader-support.com/v...ead.php?t=3418

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jclose, Today, 09:37 PM
            0 responses
            4 views
            0 likes
            Last Post jclose
            by jclose
             
            Started by WeyldFalcon, 08-07-2020, 06:13 AM
            10 responses
            1,413 views
            0 likes
            Last Post Traderontheroad  
            Started by firefoxforum12, Today, 08:53 PM
            0 responses
            9 views
            0 likes
            Last Post firefoxforum12  
            Started by stafe, Today, 08:34 PM
            0 responses
            10 views
            0 likes
            Last Post stafe
            by stafe
             
            Started by sastrades, 01-31-2024, 10:19 PM
            11 responses
            169 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X