Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Does "Performance.RealtimeTrades...etc" reset to Zero for a new session?

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

    Does "Performance.RealtimeTrades...etc" reset to Zero for a new session?

    Hi Ninjas,

    Simple question:

    I have an Algo that I'd like it to check the actual value of "Performance.RealtimeTrades.TradesPerformance.Curr ency.CumProfit" for each new session, but I'm not sure that this real time intraday variable reset automatically to zero for a new coming session. If not, could you tell me how to reset this variable system ?

    My goal is simple, if I keep the Algo running, whenever a new sessions begins ( examp: Forex after 5:15 pm is a new session ) , I'd like to be sure that this variable is either automatically reset to zero or that I was able to use some reset method.

    Thanks
    Last edited by pstrusi; 09-13-2015, 02:18 PM.

    #2
    Hello pstrusi,

    Thank you for your inquiry.

    Performance.RealtimeTrades.TradesPerformance.Curre ncy.CumProfit will not be reset to zero upon a new session.

    I would suggest storing this to a variable that can be reset upon the start of a new session by using Bars.FirstBarOfSession: http://ninjatrader.com/support/helpG...rofsession.htm

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your response Zachary.

      So, what you suggest is to store it as a different variable for comparison purposes at the final of the new session with new value of the "performance......"? it might work, but it's not the reliability that I look for supposedly inner system. It could be great to make an automatic reset for those system variables that carries Day-trading results.

      Thanks !

      Comment


        #4
        Hello pstrusi,

        Performance.RealtimeTrades.TradesPerformance.Curre ncy.CumProfit will not be reset to zero upon a new session, so, yes, it would be best to store this information to a variable or even to a list that you can add to.

        Please remember that Performance.RealtimeTrades.TradesPerformance.Curre ncy.CumProfit is the cumulative profit of all real-time trades done with the strategy instance and does not reset on every new session.

        What you could do is find the difference between the previous Performance.RealtimeTrades.TradesPerformance.Curre ncy.CumProfit value (from the previous session) and the current Performance.RealtimeTrades.TradesPerformance.Curre ncy.CumProfit (from the current session). That difference will be your cumulative profit for the current session.
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by f.saeidi, Today, 11:02 AM
        0 responses
        0 views
        0 likes
        Last Post f.saeidi  
        Started by geotrades1, Today, 10:02 AM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by rajendrasubedi2023, Today, 09:50 AM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by lorem, Today, 09:18 AM
        2 responses
        11 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by geddyisodin, Today, 05:20 AM
        4 responses
        30 views
        0 likes
        Last Post geddyisodin  
        Working...
        X