Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Backtest Account Value During Backtesting

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

    Accessing Backtest Account Value During Backtesting

    Hello,

    I would like to access the monetary value of the backtest account while backtesting strategies. I was able to get the account value of "Backtest" and "Sim101" to print out, but the values of these accounts do not seem change from trade to trade in the output window. I have used the following code found in another thread:


    Account a = Account.All.First(t => t.Name == "Sim101");
    double value = a.Get(AccountItem.CashValue, Currency.UsDollar);
    Print(value);

    How can i get the backetesting account to return to me the updated value of the account after each trade?

    Thanks.

    #2
    Hello wooofad,

    Backtest orders are virtual and are not submitted to an account.

    The account will not change as strategies are backtested.

    It would not be possible to backtest a strategy and have this place live orders to an account.

    If you want the PnL and order information, this will come from the SystemPerformance collection and Position.
    https://ninjatrader.com/support/help...erformance.htm
    https://ninjatrader.com/support/help...profitloss.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Grantx, 01-25-2017, 07:15 AM
    4 responses
    880 views
    0 likes
    Last Post Adfra
    by Adfra
     
    Started by mv075sn, Today, 03:42 PM
    2 responses
    14 views
    0 likes
    Last Post mv075sn
    by mv075sn
     
    Started by vantojo, Today, 03:06 PM
    4 responses
    14 views
    0 likes
    Last Post vantojo
    by vantojo
     
    Started by Amore44, Today, 01:34 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Anthony_0709, Today, 01:48 PM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X