Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetCurrentAsk() Efficiency

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

    GetCurrentAsk() Efficiency

    Does anyone know the relative efficiency of GetCurrentAsk/GetCurrentBid vs. storing the bid/ask in OnMarketData?

    The real issue is where is the data stored - my machine or on a remote server. I am trying to avoid calls to remote servers whenever possible to reduce latency.

    Thanks
    Scott

    #2
    Hello Scottb,

    Thank you for your post.

    Calls using GetCurrentAsk() or GetCurrentBid() will retrieve locally from your machine, not a remote server.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your quick response.

      From other posts it appears if I check GetCurrentBid/Ask in OnBarUpdate vs storing the data from OnMarketData myself, I will avoid race conditions between the internal NinjaTrader data structures which are updated prior to OnBarUpdate events and the bid/ask prices available in OnMarketData - is that correct?

      Thanks
      Scott

      Comment


        #4
        Hi Scott, that's correct - for the bid, ask, last the OnBarUpdate() related methods would be best if you're not dependent on their exact event timing (as you would have access to with OMD).

        Comment


          #5
          Perfect! I only wish trading were so precise that I would need exact timing but unfortunately, I think my best algorithms are just one step short of guessing and I have been doing this a very long time.

          As always, thanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          104 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          52 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          34 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          38 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          74 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X