Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

About CurrentBid and CurrentAsk

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

    About CurrentBid and CurrentAsk

    Hello,

    I am developing an Indicator, and need to use the CurrentBid and CurrentAsk of each tick I proccess in OnBarUpdate.

    I have two doubts about how "current" are CurrentBid and CurrentAsk:

    1) When a new tick arrives (it was produced in a context with a Bid and an Ask) this tick will produce a MarketData event and, after that, a BarUpdate event.
    I process that tick in OnBarUpdate. Let's suppose that in the time elapsed since it arrived in OnMarketData, a new Bid or Ask is received. Then, when I use CurrentBid or CurrentAsk (in OnBarUpdate), what values do they have, the old Bid and Ask, valid when the tick arrived, or the new Bid and Ask currently valid, which arrived after the tick?

    2) When OnBarUpdate receives the first tick in real time. Do CurrentBid and CurrentAsk have proper values (the actual Bid and Ask) or they are initialized with some default values until a Bid and an Ask arrive as MarketData events?

    Thank you very much in advance for any help.

    #2
    telbentel, which CalculateOnBarClose setting are you using here?

    1. OnBarUpdate() is called for each tick change and OnMarketData() for each L1 data change - the Bid / Ask in the OnBarUpdate() are aligned to it's events, while you could experience a slightly different timing in the OnMarketData() as it could have for example updated at a different time.

    2. Historically they would hold the closing price value, if a new realtime call for OnBarUpdate() is detected they would update with the L1 data as this point in time.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    580 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    335 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    102 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X