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).
        BertrandNinjaTrader Customer Service

        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 chbruno, Today, 04:10 PM
          0 responses
          3 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          436 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          6 views
          0 likes
          Last Post FAQtrader  
          Started by rocketman7, Today, 09:41 AM
          5 responses
          19 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by frslvr, 04-11-2024, 07:26 AM
          9 responses
          127 views
          1 like
          Last Post caryc123  
          Working...
          X