Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't find the right instruction

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

    Can't find the right instruction

    I can't seem to find the instruction for "get"ting realized P/L into a strategy. My interpretaton of the ATMStrategy leads me to believe

    GetAtmStrategyRealizedProfitLoss()

    does not apply.

    I'm looking for the realized P/L equivalent of the unrealized position statement:

    Position.GetProfitLoss(Close[0],PerformanceUnit.Currency

    but refering to the realized P/L.


    May I have a pointer, please?

    Thanks,

    Larry
    Last edited by epcompany; 08-06-2009, 10:02 PM.

    #2
    Larry, for this you want to work with the Performance class to access strategy related trading performance statistics - http://www.ninjatrader-support2.com/...ad.php?t=19289

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks a bunch Bertarnd!

      I see Josh has just passed his 10,000th post. His fingers must be tired!

      The reference demonstrates EXACTLY what I had in mind, taking the money and getting outa Dodge. It's become clear through all my back testing (that I know you know I'm doing) that my daily profits can easily get over 700 euro (FDAX). Most times I can watch that slip away and too often that nice profit winds up a daily loss. Greed enters the picture because there are occasional days when the daily close P/L is over 2500 euro. I've got to control that emotion and be happy with the bigger long term profit. (I think, but that why I'm going to back test it)

      So, I going to find that nice daily get-out sweet spot and be happy.

      Have a great day!

      Larry

      Comment


        #4
        Larry, you're welcome - yes I know exactly what you're talking about, finding this sweet spot improves efficiency and lifestyle. I found it worth to also look into it according to weekday / seasonal patterns.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand,
          If I can be so bold, the cumulative daily profit instruction was not in your reference.

          However, I did follow your Performance Class pointer into the Guide and think I found what I want:


          if
          (Performance.RealtimeTrades.TradesPerformance.Curr ency.CumProfit >1000) return;


          For the moment, I'm assuming that the "RealtimeTrades" element will work in back testing recorded data.



          I wouldn't usually mention it, but think I'm being helpful.



          Larry

          Comment


            #6
            Correct Larry, this is found in the 'SamplePnL' reference sample we have - http://www.ninjatrader-support2.com/...ead.php?t=4084

            You're right on the Market Replay / Realtimetrades assumption.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by DJ888, Today, 10:57 PM
            0 responses
            2 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            158 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Today, 09:29 PM
            0 responses
            7 views
            0 likes
            Last Post Belfortbucks  
            Started by zstheorist, Today, 07:52 PM
            0 responses
            7 views
            0 likes
            Last Post zstheorist  
            Started by pmachiraju, 11-01-2023, 04:46 AM
            8 responses
            151 views
            0 likes
            Last Post rehmans
            by rehmans
             
            Working...
            X