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 NullPointStrategies, Today, 05:17 AM
        0 responses
        50 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        127 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        69 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X