Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Backtest Account Value During Backtesting

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

  • NinjaTrader_ChelseaB
    replied
    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

    Leave a comment:


  • wooofad
    started a topic Accessing Backtest Account Value During Backtesting

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by timko, Yesterday, 11:39 PM
1 response
6 views
0 likes
Last Post NinjaTrader_Marco  
Started by levikNT, Yesterday, 11:38 PM
0 responses
5 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
12 views
0 likes
Last Post Crassius  
Started by MisterGee, Yesterday, 10:09 PM
0 responses
8 views
0 likes
Last Post MisterGee  
Working...
X