do I need to set this manually at the start and also update its value as trading progresses?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
trade qty based on account size.
Collapse
X
-
trade qty based on account size.
I'd like my strategy to calculate a trade qty based on the AccountSize. ... https://ninjatrader.com/support/help...ccountsize.htm
do I need to set this manually at the start and also update its value as trading progresses?Tags: None
-
Hello fingers,
Thank you for your post.
Unfortunately, AccountSize property is not available in NinjaTrader 8. However, you can calculate this with custom logic.
Please see the forum post below:
If you have any other questions, please let us know.
-
Hello fingers,
We don't have any examples that demonstrate this specifically, but we do have an example that demonstrates using the Add On approach.
AddOnFramework - https://ninjatrader.com/support/help...t_overview.htm
Please let us know if we can assist further.
Comment
-
trying to base trading qty on account size and getting confused 1.when back testing, 2.when trading historically and 3.when trading real-time.
should I use:
protected override void OnAccountItemUpdate(Account account, AccountItem accountItem, double value)
with AccountItem.BuyingPower
Comment
-
Hello,
Yes, use .Get() to get the account's buying power (in realtime).
Account.Get(AccountItem.BuyingPower, Currency.UsDollar)
.Get() - https://ninjatrader.com/support/helpGuides/nt8/get.htm
Unfortunately, there is no historical account information available to access in NinjaScript so you would not be able to get the historical buying power of an account.
Comment
-
is this a reasonable conclusion?- in backtest with trade size based on account size - the strategy script needs an initial "backtest account size" defined and each trade PnL cumulatively +/- the "backtest account size" which is then used to calculate the next "backtest trade size".
- in real-time with trade size based on account size - the strategy script (via an add-on) uses Get(AccountItem.CashValue, Currency.UsDollar) to get the actual SIM101 or live account size which is then used to calculate the next trade size.
- in historical with trade size based on account size ... same as backtest?
Last edited by fingers; 12-22-2023, 08:44 AM.
Comment
-
Hello,
Yes, you can use IsInStrategyAnalyzer.
https://ninjatrader.com/support/help...egyanalyer.htm
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment