Announcement

Collapse
No announcement yet.

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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        88 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        134 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        119 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X