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 DayTradingDEMON, Today, 09:28 AM
            3 responses
            19 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by Stanfillirenfro, Today, 07:23 AM
            9 responses
            23 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by George21, Today, 10:07 AM
            0 responses
            8 views
            0 likes
            Last Post George21  
            Started by navyguy06, Today, 09:28 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            8 responses
            33 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X