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?

    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by synthhokie, Today, 12:00 PM
    0 responses
    2 views
    0 likes
    Last Post synthhokie  
    Started by moneyexe, Today, 11:22 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by stevec1824, Today, 11:00 AM
    2 responses
    7 views
    0 likes
    Last Post stevec1824  
    Started by sofortune, Today, 10:05 AM
    2 responses
    10 views
    0 likes
    Last Post sofortune  
    Started by sofortune, 05-10-2024, 10:28 AM
    6 responses
    47 views
    0 likes
    Last Post sofortune  
    Working...
    X