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


        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 The_Sec, Yesterday, 03:37 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by vecnopus, Today, 06:15 AM
            0 responses
            1 view
            0 likes
            Last Post vecnopus  
            Started by Aviram Y, Today, 05:29 AM
            0 responses
            5 views
            0 likes
            Last Post Aviram Y  
            Started by quantismo, 04-17-2024, 05:13 PM
            3 responses
            27 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by ScottWalsh, 04-16-2024, 04:29 PM
            7 responses
            36 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X