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

    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.

        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            23 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            120 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            63 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            41 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            45 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X