Print ("Account Size is " + GetAccountValue(AccountItem.CashValue));
Print ("Performance is " + Performance.AllTrades.TradesPerformance.Currency.CumProfit);
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
call once on strategy execution
Collapse
X
-
call once on strategy execution
I'm attempting to monitor my profits from within the strategy and using
However, while a position is open, the GetAccountValue shows inaccurate information. CumProfit works fine but does not carry into the next contract so profits are back to zero. What I would like to do is call the Account Size - Starting Account Size. The starting account size would be an int and I would like to call the Account Size. What can I use to get accurate Account size information?Code:Tags: None
-
Hello Tdschulz,
Could you clarify what you are expecting to see inside GetAccountValue(AccountItem.CashValue)?
While in a trade the Initial Margin will affect Cash Value.
For a reference sample you may view the following thread on using trade performance statistics for money management.
http://www.ninjatrader.com/support/f...ead.php?t=4084
Note that CumProfit will return the Realized PnL: http://www.ninjatrader.com/support/h...?cumprofit.htm
For unrealized PnL you may use GetProfitLoss(): http://www.ninjatrader.com/support/h...profitloss.htm
Happy to be of further assistance.JCNinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
650 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment