Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Spread on Market Analyzer

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

    Spread on Market Analyzer

    I am trying to display Spread on Market Analyzer. Is there a recommended way?
    The values Market Analyzer displays for AskPrice & BidPrice are what I want to work with. I want to display Spread as AskPrice-BidPrice. But I find problems trying to access these values in an indicator.
    So far I have found GetCurrentAsk() and MarketData.Ask.Price which if I put either of these in an indicator seem to give the same value as Market Analyzer's AskPrice (although a bit delayed).
    But when I use GetCurrentBid() or MarketData.Bid.Price these both seem to be tied to the same value as displayed by AskPrice!
    The result is that attempts to show Spread result in 0!

    Is there a reliable way to access the value in code, that's being displayed as BidPrice?
    I am using the Yahoo connection, perhaps this problem only occurs with that?

    #2
    DaveE, yes most likely the connection as this is not a real time data feed.

    The approach itself is valid, using GetCurrentBid and GetCurrentAsk (realtime use only, historically replaced by Close values).

    Have you tried another connection, such as the Gain / Forex.com one offering realtime data for free?

    Comment

    Latest Posts

    Collapse

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