Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

include strategy parameters in analyzer trade report

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

    include strategy parameters in analyzer trade report

    Hi

    my strategy has counters for each trade. something proprietary to the strategy logic.
    I am looking for a way to get these counters values in the analyzer trading report.

    is it posible ?

    in case its not clear let me explain by example.
    My strategy looks for setups. there can be up to 5 setups daily. for each setup I allow to make 4 trades to try and profit from the setup. This means that for each trade I have a value number for the setup in the particular day and also a number of the trade inside the setup. (Setup# and Trade#).

    I definitely can email the data for each trade but this is for live trades.
    How about historical run on the analyzer ? can I get these Setup# and Trade# for each trade inside the trades analyzer table in the report ?

    thanks

    #2
    Hello dadarara,

    Thank you for the post.

    I am not certain the Counter value would be able to be put in the performance results but you can certainly alter the performance results with custom PerformanceMetrics.

    If you think of a way to use the Trade data you for this can use a PerformanceMetric for the data you want to display. Currently the Performance views in the platform do allow for custom PerformanceMetrics to be applied. You do need to enable them in the tools->Options menu as noted here: https://ninjatrader.com/support/help...ce_metrics.htm

    This would likely be the only way to affect the GUI Performance Report with a custom value. The alternative would be as you noted to collect and email this information in realtime, in historical you may look into writing this data to file or a static variable.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      is there an example of how to create a custom performance metrics ?

      what I am looking for is a way to record a private variable I have (like CurrentSetupNumber) in a some custom performance metric maybe? so it will be available in the post analyzer report.
      Last edited by dadarara; 04-24-2018, 11:28 AM.

      Comment


        #4
        Hello dadarara,

        You can find an example of a performance metric called SampleCumProfit included in the NinjaScript editor under PerformanceMetrics.

        I understand the goal, but this will depend on what you are counting. Because I dont know what requirements your counter needs, I can say in general that a PerformanceMetric would be what is needed to alter the performance reports but I cannot say if your idea will work in that context.

        If the Trade information that is supplied to the performance metric after the strategy places trades can be used to deduce your count, you can use a performance metric to display that data. As you cannot add arbitrary rows to the performance report, you could use a PerformanceMetric to add more rows but only if the metric allows for what your goal requires.

        If using the trade data will not work for the count, you would likely not be able to display that information in the performance report specifically and would need to opt for other options of collecting that data.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          thank you for your time.
          I managed to turn on the samplecumprofit metric and I see it in the summary report.

          allow me to bother you a little more please as I dont have too much coding experience.

          I am confused when I think about performance metrics

          imagine that each trade the strategy takes during the day is numbered. from 1 to x.
          every day the count is reset. so the first trade gets the number 1.
          I don't want to summarize or count the totals.
          I would like to see the trades's number in a separate column in the analyzer report. along with the entry time and entry price etc.. like an additional information about the trade. this is the type of information I would like to get.

          what do you think?

          Comment


            #6
            Hello dadarara,

            In the trade report, it would not be possible to add custom columns but you could use a Signal Name for the orders. Really the only item you could affect in the Trade grid would be the trades signal name. You could use signal names that denote the count which would show up in the grid as the trades name along with the other standard information. In your strategy, you would just need to use the SignName and FromEntrySignal overloads for your order methods.

            EnterLong("Long_"+myCountVariable);

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              nice idea
              but problematic as I use the signal name to do stuff in the OnOrderUpdate and OnOrder Execution. like issuing stops
              need to think this more. maybe the way it to write to external file.

              but for the record, this could be a nice new feature. to be able to add data to the analysis result tables from strategy. dont you think?

              Comment


                #8
                Hello dadarara,

                Thank you for the reply.

                Yes writing to file is certainly an option if none of the other items will work for the goal. We have a sample of writing to file here if needed: https://ninjatrader.com/support/foru...ead.php?t=3475

                I will put in a feature request for custom Execution and Trade columns so that information could be appended to the Trade performance view.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by habeebft, Today, 07:27 AM
                1 response
                14 views
                0 likes
                Last Post NinjaTrader_ChristopherS  
                Started by AveryFlynn, Today, 04:57 AM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by Max238, Today, 01:28 AM
                4 responses
                38 views
                0 likes
                Last Post Max238
                by Max238
                 
                Started by r68cervera, Today, 05:29 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by geddyisodin, Today, 05:20 AM
                1 response
                14 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X