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 Vietanhnguyen2hotmailcom, Yesterday, 10:29 AM
            4 responses
            23 views
            0 likes
            Last Post Vietanhnguyen2hotmailcom  
            Started by PhillT, 04-19-2024, 02:16 PM
            4 responses
            35 views
            0 likes
            Last Post PhillT
            by PhillT
             
            Started by ageeholdings, 05-01-2024, 05:22 AM
            5 responses
            37 views
            0 likes
            Last Post ageeholdings  
            Started by reynoldsn, Today, 02:34 PM
            0 responses
            13 views
            0 likes
            Last Post reynoldsn  
            Started by nightstalker, Today, 02:05 PM
            0 responses
            21 views
            0 likes
            Last Post nightstalker  
            Working...
            X