• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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?

    http://www.ninjatrader.com/webnew/support_GAIN.htm
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jrobin747, Today, 02:37 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by Gav_G, Today, 01:23 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by webus, Today, 01:05 PM
    2 responses
    18 views
    0 likes
    Last Post webus
    by webus
     
    Started by Wick Wrangler, Today, 12:42 AM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by pman777, 04-15-2020, 05:09 AM
    5 responses
    48 views
    0 likes
    Last Post NinjaTrader_Kate  
    Working...
    X