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

Largest ask and bid size text

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

    Largest ask and bid size text

    Hi

    I used your sample market depth book example and modified it to show the largest ask and bid size, above and below the current price bar.

    Problem is half way through the trading day the text freezes on that point of the chart and fails to update. I have to reload the script.

    I have tried checking each askRows[*].volume is not null etc, it still freezes.

    Any ideas why?

    Attached Files
    Last edited by Brutus; 11-06-2008, 12:39 PM.

    #2
    Brutus,

    Any errors in your Control Center? Is your connection to the data feed still working?
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Brutus,

      Any errors in your Control Center? Is your connection to the data feed still working?
      No, everything seems fine, I have other real time scripts and when I reload the indicators for a bid ask text freeze I lose all the history. The other scripts keep working fine and updating.

      I am using it on the ES - zenfire feed.
      Last edited by Brutus; 11-06-2008, 12:41 PM.

      Comment


        #4
        Try adding checks to ensure that you have enough rows in the bid and ask.

        Code:
        if (askRows.Count > 4)
        {
            if (askRows[4].Volume > askbig) askbig = askRows[4].Volume;
            if (askRows[3].Volume > askbig) askbig = askRows[3].Volume;
            if (askRows[2].Volume > askbig) askbig = askRows[2].Volume;
            if (askRows[1].Volume > askbig) askbig = askRows[1].Volume;
            if (askRows[0].Volume > askbig) askbig = askRows[0].Volume;
        }
                    
        if (bidRows.Count > 4)
        {
            if (bidRows[4].Volume > bidbig) bidbig = bidRows[4].Volume;
            if (bidRows[3].Volume > bidbig) bidbig = bidRows[3].Volume;
            if (bidRows[2].Volume > bidbig) bidbig = bidRows[2].Volume;
            if (bidRows[1].Volume > bidbig) bidbig = bidRows[1].Volume;
            if (bidRows[0].Volume > bidbig) bidbig = bidRows[0].Volume;
        }
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh, comparing that to another working script, I think thats it.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rocketman7, Today, 02:12 AM
          5 responses
          23 views
          0 likes
          Last Post rocketman7  
          Started by trilliantrader, 04-18-2024, 08:16 AM
          7 responses
          28 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by samish18, 04-17-2024, 08:57 AM
          17 responses
          66 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by briansaul, Today, 05:31 AM
          1 response
          15 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by PaulMohn, Today, 03:49 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X