Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Transition

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

    Transition

    Hello,

    In a real-time strategy, OnStateChange with State==State.Configure is the correct moment to request bid/ask series.
    (I am not clear on how I should request and use bid/ask series, my question below ...)

    Let's suppose some call to AddDataSeries had been done.

    Then I guess some historical data is loaded (bid/ask series as the strategy requested) and Bars is filled with it.

    In OnStateChange, when State==State.Configure, which variant of AddDataSeries should I use to get the maximum of historical bid/ask series available ?

    Then, is it true to say that since Bars.GetAsk() or Bars.GetBid() allow to retrieve some past tick, a bid or ask available via GetCurrentBid or GetCurrentAsk will be transfered just after into Bars ?

    How to get the maximum index for Bars.GetAsk() argument ? Bars.TickCount ? Bars.TotalTicks ?
    I notice these property have setters. Can these setters be used in order to truncate the series ?


    Thanks for your help
    Last edited by carmiFR; 10-03-2016, 12:46 PM.

    #2
    Hello carmiFR,

    Thank you for your post.

    Please visit the following link for information on using AddDataSeries() for Bid and Ask data: http://ninjatrader.com/support/helpG..._ask_serie.htm

    The syntax to use for the full available data on the chart is as follows:
    AddDataSeries(string instrumentName, BarsPeriodType periodType, int period, MarketDataType marketDataType)

    You would not use GetAsk() or GetBid(). You would use Closes for example to pull the close. I recommend reviewing our details on multiple data series in your code for further details: http://ninjatrader.com/support/helpG...nstruments.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by iceman2018, Today, 10:39 AM
    0 responses
    0 views
    0 likes
    Last Post iceman2018  
    Started by nleitman, Yesterday, 11:46 AM
    16 responses
    43 views
    0 likes
    Last Post nleitman  
    Started by MSerag, Yesterday, 11:52 PM
    3 responses
    23 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by dcriador, Yesterday, 01:43 AM
    6 responses
    29 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by James650, Today, 08:25 AM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Working...
    X