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 manneshur, Today, 01:51 AM
    0 responses
    1 view
    0 likes
    Last Post manneshur  
    Started by timko, Yesterday, 11:39 PM
    2 responses
    13 views
    0 likes
    Last Post timko
    by timko
     
    Started by levikNT, Yesterday, 11:38 PM
    0 responses
    6 views
    0 likes
    Last Post levikNT
    by levikNT
     
    Started by Al Recites, Yesterday, 09:19 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by Crassius, Yesterday, 10:19 PM
    0 responses
    15 views
    0 likes
    Last Post Crassius  
    Working...
    X