Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting Accumulated Realized Amount for a Simulated Account Over the Days?

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

    Getting Accumulated Realized Amount for a Simulated Account Over the Days?


    Hi there, how can I get the realized amount for a particular strategy running for a few days in row, on a shared simulated account?

    I leave my strategies running during the week, resetting only during the weekend. On simulated accounts, I notice the Realized amount on the Strategies tab is cumulative. For example, if I lose -$100 on Monday, Tuesday, and Wednesday, at the start of the trading day on Thursday, there's already -$300 showing in the Realized amount. It's that -$300 value I desire to get, and I'm running into two obstacles.

    First, I know that I can use the Account.Get method. However, I'm running a couple hundred strategies in test mode on a sim account. It'd be a pain to run each one of those on their own simulated account.

    Second, I could also use Postion.GetUnrealizedProfitLoss; however, this only tells me what hasn't been realized yet. So, at the start of the trading day, this value will be $0.

    Therefore, the only method I can think of, is to keep a running total of the realized profit/loss in that strategy over the days. I'd rather not do this. Rather, given a particular strategy on a shared account, how can I obtain the realized amount for that particular strategy at any particular instance? Thanks,






    Attached Files

    #2
    Hello timmbbo,

    The Account.Get() method will not provide information about the strategy performance, and only gives information about the account.

    You can track the PnL in a strategy and reset this any time you would like.

    Below is a link to an example 'DailyLossLimitExample' that uses the Realized and Unrealized PnL. You could use similar logic to track the PnL and reset after several days.
    Hello, I've updated the DailyLossLimit and DailyLosLimitMultiTrade examples that were posted on the forum for NinjaTrader 7 for NinjaTrader 8. These are often requested and I felt they are good examples to have for NT8. DailyLossLimitExample_NT7 - http://ninjatrader.com/support/forum...241#post451241 (http://ninjatrader
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    21 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