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 tkaboris, Today, 05:13 PM
    0 responses
    1 view
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,281 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    19 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by Tim-c, Today, 02:10 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    5 views
    0 likes
    Last Post Taddypole  
    Working...
    X