Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tracking Performance of Multiple Strategies on Same Instrument

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

    Tracking Performance of Multiple Strategies on Same Instrument

    Hello, I want to run 6 different strategies on the ES and track the individual P/L performance of each strategy. If I use the Performance.AllTrades.TradesPerformance.Currency.C umProfit it seems to include all P/L from all 6 strategies.

    What is the preferred method for obtaining individual performance information?

    #2
    Mikefra,

    I would suggest in this case using separate simulation accounts.

    The reasons can be read about here : http://www.ninjatrader.com/support/h..._account_p.htm

    Here is more information on using multiple simulation accounts : http://www.ninjatrader.com/support/h...n_accounts.htm
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Ok, I will look into that as an option. On a different note, when is the Performance.AllTrades.Count value supposed to update? It is only updating after the close for me. Is there a setting that forces an update as soon as a position is closed?

      Comment


        #4
        Mike,

        Are you using CalculateOnBarClose = false?

        This may be helpful as it has some comments in it about the Performance.AllTrades :



        Also, you may be interested in this :

        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Yes, I am using CalculateOnBarClose = false.

          Comment


            #6
            I get the same behavior when I set the CalculateOnBarClose = true.

            Comment


              #7
              Mikefra,

              Could I see a code sample of where you are using the Performance.AllTrades.Count?
              Adam P.NinjaTrader Customer Service

              Comment


                #8
                protected override void OnBarUpdate()
                {
                if (Bars.FirstBarOfSession)
                {
                // Store the strategy's prior cumulated realized profit and number of trades
                priorTradesCount = Performance.RealtimeTrades.Count;
                priorTradesCumProfit = Performance.RealtimeTrades.TradesPerformance.Curre ncy.CumProfit;
                }
                if (Performance.RealtimeTrades.TradesPerformance.Curr ency.CumProfit - priorTradesCumProfit > 0
                && Performance.RealtimeTrades.Count - priorTradesCount >= 1)
                {
                targetReachedToday = true;
                }
                if (Performance.RealtimeTrades.TradesPerformance.Curr ency.CumProfit - priorTradesCumProfit < 0
                && Performance.RealtimeTrades.Count - priorTradesCount > 0)
                {
                trySecondLevel = true;
                }
                if (Performance.RealtimeTrades.Count - priorTradesCount > 1)
                {
                trySecondLevel = false;
                targetReachedToday = true;
                }
                if (CurrentBar < 2) return;
                if (Time[0].DayOfWeek != Time[1].DayOfWeek) // new day, reset bool flag
                {
                targetReachedToday = false;
                trySecondLevel = false;
                }
                DrawTextFixed("MyTag0", ("The strategy has taken " + Performance.RealtimeTrades.Count + " real-time trades."), TextPosition.TopRight);
                DrawTextFixed("MyTag1", ("SecondLevel=" + trySecondLevel + " TargetReached=" + targetReachedToday), TextPosition.BottomLeft);
                DrawTextFixed("MyTag2", (Performance.RealtimeTrades.Count - priorTradesCount).ToString(), TextPosition.TopLeft);

                Comment


                  #9
                  I had a return; line in the section that now contains targetReachedToday=true that was causing the problem I believe. I replaced the return; with an update to a boolean and everything works as expected.

                  Comment


                    #10
                    Mikefra,

                    Ok, thanks for letting me know. I'm happy you resolved your issue. Please let me know if I may assist further.
                    Adam P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by geddyisodin, Yesterday, 05:20 AM
                    8 responses
                    49 views
                    0 likes
                    Last Post geddyisodin  
                    Started by DayTradingDEMON, Today, 09:28 AM
                    3 responses
                    19 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by Stanfillirenfro, Today, 07:23 AM
                    9 responses
                    23 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by George21, Today, 10:07 AM
                    0 responses
                    8 views
                    0 likes
                    Last Post George21  
                    Started by navyguy06, Today, 09:28 AM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_Gaby  
                    Working...
                    X