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 CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        32 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        195 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        356 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        277 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X