Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          577 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X