Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to use Ask/Bid prices for historical backtesting

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

    How to use Ask/Bid prices for historical backtesting

    Hi,

    I have recording of Ask/Bid/Last ticks for several instruments.
    I saw that I can load them directly through the Historical Data Manager and to choose the correct Data Type.
    How can I use this in my backtest? GetCurrentBid() only works in realtime...
    How can I have access to the bid ask data I loaded to the instrument?

    Thanks,
    Roy

    #2
    Hello freewind,

    Yes, you can use ask or bid data by configuring 'Price based on', see screenshot.
    Attached Files
    JasonNinjaTrader Customer Service

    Comment


      #3
      Yes, but if within my script I want to access the bid ask prices, how can I do it?

      Comment


        #4
        Hello Roy,
        You can create a multi series code to add the bid/ask series.

        Please refer to our help guide to know more about multi series concepts
        http://www.ninjatrader.com/support/h...nstruments.htm

        A sample code to add the ask series for example will be like

        Code:
        protected override void Initialize()
        {
        Add("ES 12-12", PeriodType.Minute, 1, MarketDataType.Ask);
        //rest of the codes
        }
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Thanks Joydeep.
          Then I can access this stream BIP.

          I think as an improvement and feature idea you should incorporate in GetCurrentAsk() so there will be minimal changes between backtesting and production versions.

          Comment


            #6
            Hello Roy,
            Yes, you can access it via BIP.

            I will forward your feature request to development for future consideration.
            JoydeepNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Don22Trader1, Yesterday, 04:20 PM
            1 response
            20 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by ginx10k, Today, 05:49 AM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by Goldy, Today, 04:00 AM
            0 responses
            14 views
            0 likes
            Last Post Goldy
            by Goldy
             
            Started by Betican, Today, 12:32 AM
            0 responses
            19 views
            0 likes
            Last Post Betican
            by Betican
             
            Started by Betican, Today, 12:25 AM
            0 responses
            17 views
            0 likes
            Last Post Betican
            by Betican
             
            Working...
            X