So, what's the best way to access the current account balance amount, both in real time trading as well as in backtesting?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
accessing current account balance ?
Collapse
X
-
accessing current account balance ?
I would like my strategy to enter trades with the number of contracts based on my available account balance. That is, as the account balance increases, then enter with more contracts. If that account balance decreases, then enter with fewer contracts.
So, what's the best way to access the current account balance amount, both in real time trading as well as in backtesting?Tags: None
-
Hello spottysallrite,,
To support backtesting you would have to just make your own variable to hold a value and then add or subtract form that variable as trades complete. In realtime you can pull your actual account balance but that code work work for backtesting.
To support Backtesting you would need to use the strategies trade performance and your own variables to do math to add or subtract from your variable.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
88 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
134 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment