Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculate performance metrics using van Tharp R values

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

    Calculate performance metrics using van Tharp R values

    I would like to calculate performance metrics using van Tharp R values but I see know way to feed that to a performance metric since that only takes a trade as a parameter to the OnAddTrade function with the signature:

    protected override void OnAddTrade(Cbi.Trade trade)

    How should I implement this best. Can we inherit from the Trade class to add custom values?

    #2
    Hello [email protected],

    Thank you for writing in. I will investigate this matter and update you as soon as possible.

    Thank you for your continued patience in the meantime.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Hello [email protected],

      Could you please let me know what information is necessary to calculate your performance metric that is not available in the trade object?

      I am not particularly familiar with the Van Tharp R system but it appears the necessary variables are already contained in the Trade object that gets passed to OnAddTrade().

      Thank you in advance.
      Michael M.NinjaTrader Quality Assurance

      Comment


        #4
        Hi. I am using a volatility based sizing algorithm, and my Risk (R) is defined by my protective stop, which is typically 3 x ATR. Obviously, ATR will vary but R will be derived from ATR at the time of entry execution. If I can pass that in, I can calculate a custom perf metric by calculating profit in terms of R.

        Thanks

        Comment


          #5
          Hi

          If Van Tharp's R-multiple was to be implemented as a trade performance metric it would need to be more generic than just using an indicator value, I think. People set their risk (stop loss) many different ways.

          The R value is trade profit / risk and can be expressed as:
          R = (exit price - entry price) / (entry price - initial stop loss price)
          or in pips or in points.

          Normally trading trade results are 'unaware' of where the initial stop loss is, and I think that's why platforms don't implement it. The trade object would need a way of knowing what the initial stop loss was.

          Perhaps, there could be a facility to associate a risk value (pips, currency, points, etc.) to the trade.

          For what it's worth, I've handled this in the strategy, because it's the strategy that knows where the stop loss is. I've written the strategy to write trade results, initial risk, R-multiples, expectancy and standard deviation of R-multiple to a csv file for further analysis in a spreadsheet.

          Cheers
          Tony

          Comment


            #6
            Hello [email protected],

            I have submitted a feature request on your behalf for the Cbi.Trade objects to have additional properties to allow passing of custom values. I will update this post when I have further information.

            Thank you for your continued patience in the meantime.
            Michael M.NinjaTrader Quality Assurance

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Gerik, Today, 09:40 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by RookieTrader, Today, 09:37 AM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by alifarahani, Today, 09:40 AM
            0 responses
            5 views
            0 likes
            Last Post alifarahani  
            Started by KennyK, 05-29-2017, 02:02 AM
            3 responses
            1,285 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by AttiM, 02-14-2024, 05:20 PM
            11 responses
            186 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X