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 NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
62 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment