Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Daily P&L and Number of Trades Script
Collapse
X
-
Daily P&L and Number of Trades Script
Hi, I am looking for the code I would need to get the daily P&L and the number of trades for all accounts. Any suggestions?Tags: None
-
Hello TickTaker2,
Welcome to the NinjaTrader forums!
There are some account level values you could combine.
To get an account value use <Account>.Get() with AccountItem.RealizedPnL
If you want to track this information per trade, you could adapt logic for a strategy to the Addon approach with Accounts.
Hello, I've updated the DailyLossLimit and DailyLosLimitMultiTrade examples that were posted on the forum for NinjaTrader 7 for NinjaTrader 8. These are often requested and I felt they are good examples to have for NT8. DailyLossLimitExample_NT7 - http://ninjatrader.com/support/forum...241#post451241 (http://ninjatrader
I would like to augment the functionality of the chart trader buttons to include some database logging and a check of my prior trades before accepting the click event e.g. checking my recent trade history before actually submitting the order via the "Buy Market" or "Sell Market" buttons. Is there a way to
Below I am also including a link to a forum post with helpful resources on getting started with C# and NinjaScript.
Chelsea B.NinjaTrader Customer Service
-
-
Nevermind found it..Code:foreach (Account sampleAccount in Account.All){ Print(String.Format(sampleAccount.Name)); }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
80 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
40 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|
Comment