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,
Comment