Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest with spread.

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

    Backtest with spread.

    Hi,
    I am very happy with Ninjatrader, I have been trading for a couple of years and it is the platform I like the most.

    I have some questions about the backtest:

    The Backtest NOT INCLUDE spread any type, all orders no contain Spread (spread is 0) ?

    Is it correct this or not?

    If I want the backtets to be made with Spread, I must use the Slippage to configure it?

    Is it correct this or not?

    If i have Spread 2 pips in EUR/USD (Bid 1.2340 Ask 1.2338) this spread is 2 pips, I most put slippage in "20"?, By entering that value in the "Slippage" means that ALL ORDERS will have Spread of "2".

    It would very grateful that they could clarify my doubt, since the results change dramatically when changing the "Slippage" (or spread?). Greetings and thanks.

    #2
    Hello samir,

    Thanks for opening the thread.

    Backtests do not include spread. To mimic this, the recommended approach is to add commission levels for forex instruments to account for the average spread.

    Use the following steps to set commission levels for forex instruments:
    1. Determine the average spread for the instrument in question (spreads vary by instrument, time, and brokerage account)
    2. Use the average spread to set the minimum commission at the instrument level
    3. (Note, users may need to change this value over time, as average spreads change for each forex pair)


    Backtests in the Strategy Analyzer will inherit the Commission Template assigned to the Sim101 account.

    I've included some publicly available resources for working with and applying Commissions Templates.

    Working with Commissions Templates - https://ninjatrader.com/support/help...commissi_2.htm

    Applying Commissions Templates - https://ninjatrader.com/support/help...commissi_3.htm

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Jim. thanks for the answer.

      I was wrong about sub forum and I put the subject in Ninja 8, when I was really in NInja 7, I'm sorry.

      On the subject, in question, I only want to simulate the Spread that I want, I know that the Spread value is dynamic, because for the same reason my robots are very sensitive to spreads, so what I want to do is simulate a spread above average with a security factor 1.5 to ensure more or less that can work and not have to be doing backtets in demo accounts in real time.

      I have not had time right now to follow the issue (tonight I will have time), but is it acceptable to use the SLIPPAGE to simulate the spread ?, since it would be more or less the same as the spread or not? It is simply to open the order at a distance against my order. Or not?,

      Grettigns and regards.

      Comment


        #4
        Hello samir,

        Thanks for the reply.

        Slippage is used to fill the order a certain distance away from the fill price, and within the bounds of the bars high and low used to simulate the fill. Historically, the bid will be used for the last price and the ask values would not contribute to the bars high and low. So simulating the bid-ask spread with slippage may not fully equate to the bid-ask spread.

        Finding an average spread could give you an idea for what the performance would be, but if you are looking for a more dynamic approach, I may suggest using different order types when backtesting and to set those prices a certain distance away from your original target prices to factor in a dynamic spread.

        I'll include some information on NT7's historical fill processing and how to set up commissions in NT7.

        Understanding Historical Fill Processing (NT7) - https://ninjatrader.com/support/help...a_strategy.htm

        Using the Commissions tab (NT7) - https://ninjatrader.com/support/help...ission_tab.htm

        If there is anything else we can do to assist, please let us know.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pjsmith, Today, 01:00 AM
        1 response
        10 views
        0 likes
        Last Post NT-Roland  
        Started by alejandro888, Yesterday, 08:41 PM
        0 responses
        9 views
        0 likes
        Last Post alejandro888  
        Started by UltraNIX, Today, 02:14 AM
        0 responses
        8 views
        0 likes
        Last Post UltraNIX  
        Started by augustfay, Yesterday, 12:06 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by klaus w, Yesterday, 12:13 PM
        2 responses
        24 views
        0 likes
        Last Post klaus w
        by klaus w
         
        Working...
        X