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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
46 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
33 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment