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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
63 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
91 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
48 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
105 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
63 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment