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 Tim-c, Today, 03:54 AM
            0 responses
            3 views
            0 likes
            Last Post Tim-c
            by Tim-c
             
            Started by FrancisMorro, Today, 03:24 AM
            0 responses
            2 views
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,771 views
            0 likes
            Last Post Leafcutter  
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            31 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            945 views
            0 likes
            Last Post spwizard  
            Working...
            X