Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Commission for forward testing

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

    Commission for forward testing

    How can I apply commission for my forward testing? I have only been able to get this to work for backtesting. I have a strategy enabled on a chart, I see no commission field to enable and the strategy performance indicates $0 commission even though though backtesting with strategy analyzer states otherwise.

    Thanks

    #2
    Chris001, welcome to our forums - you likely have not checked to apply commissions to pnl under Tools > Options > General. With this done, please start a new instance of your script from the chart and it should factor in.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      It was selected, commission is being applied in strategy analyzer but not under charts.

      Comment


        #4
        Can you please post a screenshot of how you would have your commission to use setup in NT? If you toggled the 'apply commissions to pnl' setting it would generally need a freshly loaded instance of the script to take effect, no a reload of your NinjaScript on the chart.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I might be awhile getting those screen captures. I am currently away from my personal computer. What do you mean by freshly loaded instance of the script, perhaps that is what I am missing. Thanks.

          Comment


            #6
            Hello Chris001,

            Thanks for your reply.

            Select the Strategies Tab of the Control Center
            Right click on the Strategy and press Remove
            Then reapply the strategy
            BrandonNinjaTrader Customer Service

            Comment


              #7
              I removed all active strategies, created a new chart and a freshly created strategy is applied. Still no commission. I have attached screen captures
              Attached Files

              Comment


                #8
                I tested this on the NinjaTrader MA crossover strategy and commission is applied, but not on my strategies. I do have some code in the strategy dealing with PnL could that be interfering with the proper application of commissions. If so how could this work for applying commissions and setting my PnL shown in the code below?

                Thanks



                protected override void OnBarUpdate()
                {

                if (Bars.FirstBarOfSession)
                {
                // Store the strategy's prior cumulated realized profit and number of trades
                priorTradesCount = Performance.AllTrades.Count;
                priorTradesCumProfit = Performance.AllTrades.TradesPerformance.Currency.C umProfit;


                }

                // Prevents further trading if the current session's realized profit exceeds limits

                if (Performance.AllTrades.TradesPerformance.Currency. CumProfit - priorTradesCumProfit <= -400)

                {

                // Returns out of the OnBarUpdate() method. This prevents any further evaluation of trade logic in the OnBarUpdate() method.
                return;
                }

                Comment


                  #9
                  That wasn't it, I removed that code and the problem still exists. Why is this not working for my strategy? Should I email my strategy to NT support?

                  Comment


                    #10
                    Hello Chris001,

                    Thank you for your response.

                    This is unrelated to your code. I am seeing the same item with the SampleMaCrossOver on my end. I will follow up with you tomorrow when I have spoken with my colleagues on this matter.

                    Comment


                      #11
                      Hello Chris001,

                      Thank you for your patience.

                      May I test your strategy on my end? If so, please attach the .cs file of your strategy to your response. You will find the file in the following directory on your PC: (My) Documents\NinjaTrader 7\bin\Custom\Strategy

                      If you prefer, you can send the strategy to support[at]ninjatrader[dot]com with 'ATTN: Patrick - 1066793' in the subject line.

                      Comment


                        #12
                        I copied my strategy and spent some time cleaning it up, then debugging after cleaning it up a bit. I have no idea what it was, I made changes through all sections of the strategy so it could have been from anywhere for all I know, but it is ok now. I am going to continue working on this copied version but if this problem is encountered again I will let you know. Thanks

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by kujista, Today, 06:23 AM
                        2 responses
                        6 views
                        0 likes
                        Last Post kujista
                        by kujista
                         
                        Started by f.saeidi, Today, 08:03 AM
                        0 responses
                        4 views
                        0 likes
                        Last Post f.saeidi  
                        Started by cre8able, 04-17-2024, 04:16 PM
                        7 responses
                        64 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by Aviram Y, 08-09-2023, 09:04 AM
                        11 responses
                        299 views
                        0 likes
                        Last Post arjandezeeuw  
                        Started by Christopher Leggit, 02-15-2024, 09:00 AM
                        3 responses
                        47 views
                        0 likes
                        Last Post rdtdale
                        by rdtdale
                         
                        Working...
                        X