Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest order fills at Ask\Bid?

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

    Backtest order fills at Ask\Bid?

    Hi
    I know that last price is used on backtest results, but what is the point of having separate Ask and Bid price based options in NT7?
    why can't you execute Long orders at ask price and short at bid prices by default that would give accurate results or atleast let user define the spread so on execution of 100k EURUSD the PnL would go to -10 if spread of 1 was defined

    The problem is if I go long 100,000 EURUSD in real market with spread of 1pip the order PnL on execution will be -10 straight away, becuase executed at Ask, right!
    but in backtest if I do the same I get PnL 0 on execution, becuase executed at last price, right?
    in frequent trading strategy this would add up
    So how can I make sure that my strategy orders gets executed at Ask and Bid prices on baktest?

    #2
    Hello Ironleg,

    If you have this series available, then you should be able to submit orders to it.

    You have to add manually data type Ask/Bid in Initialize:
    Add("ES 09-10", PeriodType.Minute, 10, MarketDataType.Ask);

    You can then submit orders to this BarsInProgress with the advanced overloads:

    EnterLong(int barsInProgressIndex, int quantity, string signalName)
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan, thank you for replying so fast.
      Let me get this, if I use two symbols to trade in my strategy, then I will need to

      Add(Symbol1, PeriodType.Minute, 1, MarketDataType.Ask);
      Add(Symbol1, PeriodType.Minute, 1, MarketDataType.Bid);
      Add(Symbol2, PeriodType.Minute, 1, MarketDataType.Ask);
      Add(Symbol2, PeriodType.Minute, 1, MarketDataType.Bid);

      then on signaI I will submit
      EnterLong(1, 100000, "Enter long at ask price");
      or
      EnterShort(2, 100000, "Enter short at bid price");
      ???

      can u recommend a provider that provides ask bid feed, does Kiniteck do that?

      Comment


        #4
        Yes, that should work.

        Unfortunatley I don't have a list currently of those that offer bid / ask data in this format. For broker connections: It would be those connections where NinjaTrader records historical data - such as Zenfire, Gain. For data service providers - it should be offered if they supply level II data.

        Yes, it is available with the kinetick connection.

        Before designing a strategy around this type of data, you should definitely chart it to see what it looks like compared to a chart based on last prices.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_RyanM View Post
          Hello Ironleg,

          If you have this series available, then you should be able to submit orders to it.

          You have to add manually data type Ask/Bid in Initialize:
          Add("ES 09-10", PeriodType.Minute, 10, MarketDataType.Ask);

          You can then submit orders to this BarsInProgress with the advanced overloads:

          EnterLong(int barsInProgressIndex, int quantity, string signalName)
          If you submit entry long orders to ASK dataseries and corresponding exit orders to BID dataseries.
          Will the backtesting engine properly count these fills at BID and ASK to reflect reality better than just the normal backtest executing everything on bid, when IB forex is in question.

          Comment


            #6
            Hi naxo79,

            Yes, if you have historical bid/ask data then you can add it to your strategy and submit orders to it. These series are functionally identical to a last series only they are built from bid/ask data. You could add all three series (bid, ask, last) to the same chart if you wanted to see how they look together.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by futtrader, 04-21-2024, 01:50 AM
            4 responses
            41 views
            0 likes
            Last Post futtrader  
            Started by Option Whisperer, Today, 09:55 AM
            1 response
            12 views
            0 likes
            Last Post bltdavid  
            Started by port119, Today, 02:43 PM
            0 responses
            8 views
            0 likes
            Last Post port119
            by port119
             
            Started by Philippe56140, Today, 02:35 PM
            0 responses
            7 views
            0 likes
            Last Post Philippe56140  
            Started by 00nevest, Today, 02:27 PM
            0 responses
            7 views
            0 likes
            Last Post 00nevest  
            Working...
            X