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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
46 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
33 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment