Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Metric with CAGR for Strategy Analyzer

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

    Custom Metric with CAGR for Strategy Analyzer

    Hi,

    I search through the forum seems there is still no solution on showing CAGR (Compound Annual Growth Rate) in Strategy Analyzer since NT7. Any news or recommendation how to add by custom development?

    Thanks

    MC

    #2
    Hello MC,

    You can make an indicator with custom logic if you would like.

    Below I am providing a link to a forum post with helpful information about getting started with NinjaScript and C#.
    https://ninjatrader.com/support/foru...040#post786040

    I am not familiar with CAGR Compound Annual Growth Rate. Do you have a formula for this you are trying to turn into code?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea

      please find the calculation of CAGR here
      https://investinganswers.com/diction...owth-rate-cagr

      thanks






      Comment


        #4
        Hello MC,

        What step are you stuck at?

        Is your custom indicator giving an error message?

        Are you wanting someone to do the work and code it for you?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,

          I have not started yet as I do not understand. Does Custom indicator works on price, volume, only? Compound Annual Growth Rate (CAGR) is calculated based on trades and I want to show it alongside in the strategy analyzer. If this works, can you provide some example or link for me to kick start?

          Thanks

          Comment


            #6
            Hello mikechan883,

            Indicators and Strategies have series for the Close, Open, High, Low, and Volume from the bars in OnBarUpdate().

            Below are links to the help guide.
            https://ninjatrader.com/support/help...riceseries.htm
            https://ninjatrader.com/support/help...lumeseries.htm

            If you are making a custom performance metric, unfortunately, these values will not be available.
            The trades are available, and any information of a Trade object's properties, however the strategy instance is not available.
            https://ninjatrader.com/ru/support/f...ric#post760117

            If you wanted to do a separate BarsRequest that collects volume from ticks based on the trade entry and exit time this may be possible.
            https://ninjatrader.com/support/foru...963#post783963

            I am also including a link to a forum post with helpful information about getting started with C# and NinjaScript.
            https://ninjatrader.com/support/foru...040#post786040
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thanks Chelsea
              My CAGR custom performance metric only need to works on the trades. Any good coding example I can refer to?

              MC

              Comment


                #8
                Hello mikechan883,

                To confirm, you don't need the volume as you have previously stated?

                The SampleCumProfit included with NinjaTrader is a great example for a performance metric.

                Also, below is a link to a forum thread with further examples.
                https://ninjatrader.com/support/foru...velopment-help
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ntbone, Today, 02:30 PM
                0 responses
                5 views
                0 likes
                Last Post ntbone
                by ntbone
                 
                Started by tuliomgui, Yesterday, 10:07 PM
                3 responses
                13 views
                0 likes
                Last Post NinjaTrader_ShawnB  
                Started by Learner Trader, Today, 08:36 AM
                1 response
                24 views
                0 likes
                Last Post NinjaTrader_ShawnB  
                Started by GeorgeW, Today, 03:15 AM
                1 response
                16 views
                0 likes
                Last Post NinjaTrader_ShawnB  
                Started by timko, Today, 11:55 AM
                4 responses
                12 views
                0 likes
                Last Post NinjaTrader_ShawnB  
                Working...
                X