Is there any way to set the initial backtest account balance as it is not available in the list of accounts or anywhere in the options. Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtest Account - Set Values?
Collapse
X
-
Backtest Account - Set Values?
I want to simulate specific order handling with trade sizes etc based account data, cash value etc. To do this we can get the AccountItems but the problem is these are tied to the Backtest account when performing a backtest.
Is there any way to set the initial backtest account balance as it is not available in the list of accounts or anywhere in the options. Thanks.Tags: None
-
Hello fxRichard,
Thank you for your post.
When backtesting there is no means to set the values of the account. You would instead implement internal calculations in your strategy to calculate and track your own custom values for the desired account values.
For the Tick value use the following:
For the number of ticks per Point please use the following:Code:double myTickValue = Instrument.MasterInstrument.PointValue * TickSize;
Please let me know if you have any questions.Code:double myNumTick = 1 / TickSize;
Comment
-
Thanks Patrick,
On a real/live account I assume we would have access to this information? Can we put in a feature request to be able to set the backtest account value and have this value update throughout the life of a backtest?
This is pretty simple stuff to add I would think and would allow those that do more advanced account management and order placement to use real calculations. The biggest thing is not being able to get the actual P&L or floating account balance as trades are won and lost.
To do this for backtesting only we have to implement extra logic that I assume is not necessary on a live account running on real time data.
Comment
-
Patrick,
Is there any way to determine the rolling P&L or floating CashValue of the account? Or do I need to monitor every trade in a backtest, calculate the win/loss and keep a dummy variable for this information.
Ie. a trade just closed with 5 ticks profit on CL, and thus we have to manually keep track of the fact that this is a $50 profit per contract and manually subtract commissions etc?
Comment
-
Hello fxRichard,
Thank you for your response.
Cash Value would need to be a variable you create and track for the strategy during the backtests. As far as profit you can use the TradePerformance: http://ninjatrader.com/support/helpG.../cumprofit.htm
I will forward your request to development.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
54 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment