Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Sample MA Crossover Strategy Commissions

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

    Sample MA Crossover Strategy Commissions

    Hi,

    I am having a hard time figuring this out. I have a custom strategy where basically I duplicate the Sample MA Crossover, but instead of using EnterShort() and EnterLong(), I build a "trend signal" to send an exit order (ExitShort, ExitLong), and when this order is filled I send a separate enter order (EnterShort, EnterLong) - according to the trend signal generated.

    I use the "include commission" option in the strategy analyzer to calculate performance accurately.

    However am having a very significant difference of results between these two strategies. Is it possible that the Sample MA Crossover calculates the commission only once when sending an order? In real life the broker calculates the commissions twice in case of such signal, right?

    Thanks for helping me to figure this out.

    #2
    1 charge to buy, another 1 charge to sell

    Comment


      #3
      Hello RT001,

      Commissions applied to the account (Sim101 account if backtest) would be applied to all strategies using include commissions, including the SampleMACrossOver included with NinjaTrader.

      If the results are different, this would imply the orders are being submitted at different times or prices. Different orders, different results.

      You can debug the script using Print() and TraceOrders to understand what is different.

      Below are links to forum posts that demonstrate.
      Citizens of the NinjaTrader Community, A common question we hear from clients is 'why are results from backtest different from real-time or from market replay?'. Live orders are filled on an exchange with a trading partner on an agreed upon price based on market dynamics. Backtest orders are not using these market dynamics.

      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thank you very much ChelseaB, it's much appreciated. I will go through the posted information in the next days.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Waxavi, Today, 02:10 AM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by Kaledus, Today, 01:29 PM
        5 responses
        12 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Waxavi, Today, 02:00 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by alifarahani, Today, 09:40 AM
        5 responses
        23 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by gentlebenthebear, Today, 01:30 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X