is there any way to code it? any idea?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
get notification when PNL is 300$
Collapse
X
-
get notification when PNL is 300$
can u guide me, how can i get notification, when my total PnL for current day goes to 300$ or lets say -200$
is there any way to code it? any idea?
Tags: None
-
Hello manitshah915,
You could use an indicator for that purpose along with the addon framework. There is a sample of the code needed to find an account in the following link. You would need to locate an account and save it to a variable, then from the indicators OnBarUpdate method you could continuously check the account values like the PnL.
Mainly just these line from the sample:
To find values you could then use myAccount.Get() method:Code:private Account myAccount; protected override void OnStateChange() { if (State == State.Configure) { lock (Account.All) myAccount = Account.All.FirstOrDefault(a => a.Name == "Sim101"); } }
Code:protected override void OnBarUpdate() { if (myAccount.Get(AccountItem.RealizedProfitLoss, Currency.UsDollar) > 300) { // Do something; } }
Ways to alert:
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
603 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
349 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
104 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
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
560 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment