Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Need email alert to give name of instrument
Collapse
X
-
Haya,
Can i add a second condition for the email alert.something like this
this is excerrpt from the "EmailPriceAlert"
if(Close[0] == PriceLevel)
{
SendMail(fromEmail, toEmail, "Price Alert", "Price level was hit at: " + PriceLevel);
Only this time i suppose it should look something like this:
if (Volume[0] == HighVolume = Price Level?
Comment
-
Hello cachevery,
Yes, you may just add a SendMail() method right after your Alert() method if your so that it will both send you and Alert inside of NinjaTrader and an email.
In Programming you may add as much complexity as you would like so you may add several conditions if you like.
Let us know if we can be of any further assistance.JCNinjaTrader Customer Service
Comment
-
Yes,i need two kind of alerts - audible and email,and i need in the email alert the time and the price af the alert at the moment it`s triggered.Cold anyone asssist me with that one,please?Originally posted by NinjaTrader_JC View PostHello cachevery,
Yes, you may just add a SendMail() method right after your Alert() method if your so that it will both send you and Alert inside of NinjaTrader and an email.
In Programming you may add as much complexity as you would like so you may add several conditions if you like.
Let us know if we can be of any further assistance.
Comment
-
Hello cachevery,
I would be glad to try to assist you but I am not sure what assistance you are looking for. I cannot code it for you but I can help you out with it.
So if you are looking for both an Audio Alert and a email sent there are two options that you have.
1. Using both SendMail() and Alert() in the same condition like in my previous post.
I did not put in in parameters as there are numerous examples on this thread.Code:if ( //some condition ) { SendMail( //parameters); Alert( //alert parameters); }
2. You may just use an Alert() and then setup the Mail Option inside of NinjaTrader send alert message to your email by going to Tools -> Options -> Misc tab. Here you may enter in a "Mail alert messages to" address.
Note this option will require you to setup the Mail settings above.
Here is a thread that has an example of the settings for the mail options.
Below is a list of known e-mail settings and information demonstrating configuring e-mail alerts within NinjaTrader. Included are settings which have been tested with basic accounts. Please ensure that your settings are configured identically to those included, as some only use the beginning of the e-mail address and do not
The only other thing that I can think of to add to this thread is when you are looking for the time that this happened the Time[0] will give you a time stamp of the bar but if you want your local PC Clock time you may use the "DateTime.Now" option to get this information.
For example,
Let me know if you have any further questions or if I can be of any assistance.Code:SendMail( "[email protected]", "[email protected]", "Subject Line", "Body text at local PC Clock time is "+DateTime.Now);
JCNinjaTrader Customer Service
Comment
-
Hi JC,Originally posted by NinjaTrader_JC View PostHello cachevery,
I would be glad to try to assist you but I am not sure what assistance you are looking for. I cannot code it for you but I can help you out with it.
So if you are looking for both an Audio Alert and a email sent there are two options that you have.
1. Using both SendMail() and Alert() in the same condition like in my previous post.
I did not put in in parameters as there are numerous examples on this thread.Code:if ( //some condition ) { SendMail( //parameters); Alert( //alert parameters); }
2. You may just use an Alert() and then setup the Mail Option inside of NinjaTrader send alert message to your email by going to Tools -> Options -> Misc tab. Here you may enter in a "Mail alert messages to" address.
Note this option will require you to setup the Mail settings above.
Here is a thread that has an example of the settings for the mail options.
Below is a list of known e-mail settings and information demonstrating configuring e-mail alerts within NinjaTrader. Included are settings which have been tested with basic accounts. Please ensure that your settings are configured identically to those included, as some only use the beginning of the e-mail address and do not
The only other thing that I can think of to add to this thread is when you are looking for the time that this happened the Time[0] will give you a time stamp of the bar but if you want your local PC Clock time you may use the "DateTime.Now" option to get this information.
For example,
Let me know if you have any further questions or if I can be of any assistance.Code:SendMail( "[email protected]", "[email protected]", "Subject Line", "Body text at local PC Clock time is "+DateTime.Now);
not it look perfect with time of sendind message,it is now looks like this
:""text" 20.03.2014 9:17:16,but i need to add the full name of the instrument and the price which was at the moment the alert was triggered.
Comment
-
Hello cachevery,
You may use the "Instrument.FullName" to get the full name of the instrument.
For the Price you may use the "Close[0]" for the current trading price for this.
Code:SendMail( "[email protected]", "[email protected]", "Subject Line", "Instrument Name is "+Instrument.FullName+" Current trading price "+Close[0]);
JCNinjaTrader Customer Service
Comment
-
HI JC,and thank you,Originally posted by NinjaTrader_JC View PostHello cachevery,
You may use the "Instrument.FullName" to get the full name of the instrument.
For the Price you may use the "Close[0]" for the current trading price for this.
Code:SendMail( "[email protected]", "[email protected]", "Subject Line", "Instrument Name is "+Instrument.FullName+" Current trading price "+Close[0]);
now Can yoy please suggest how to have it all in one line: instrument name,date,time,price?
Comment
-
JC,what you suggest as the time is the BS.Are you really serious about support or you just fkn around with me?????/First,you gave the line which supposed to be deliver the date and time of the alert.It did deliver the date and time,but the time it was the date and time Jacquard Loom wasn`t even invented.Now tyou give me the line with the supposed time of alert and it delivers something like this: Instrument Name is FDAX 12-13 Current trading price 1001....1001 is the upper limit i set to trigger an alert but NOT the time of the alert!
Comment
-
Dude, no offense but you are way out of line with your expectations and your language. I can see your frustration and sympathize with how difficult things seem. These guys are here to help you with guidance, not to do it for you. You have to have some ability to read and comprehend C# which is what NinjaScript language is based on.Originally posted by cachevery View PostJC,what you suggest as the time is the BS.Are you really serious about support or you just fkn around with me?????/First,you gave the line which supposed to be deliver the date and time of the alert.It did deliver the date and time,but the time it was the date and time Jacquard Loom wasn`t even invented.Now tyou give me the line with the supposed time of alert and it delivers something like this: Instrument Name is FDAX 12-13 Current trading price 1001....1001 is the upper limit i set to trigger an alert but NOT the time of the alert!
So i think you have two options at this point. 1) Hire someone to get done what you need, there are plenty of pros here that will do that. 2) Spend your time reading the Ninjascript help manual, review the many many examples of coding and if you are serious, learn to program in C#.
Good luck.
Comment
-
I Apollogize for my language,but why then provide with the thing that the support guys knew beforehand it would a lot o fun!It probably woulda been easier to say that it wouldn`t be possible then waste my time and make a joke out of me.Originally posted by Tasker-182 View PostDude, no offense but you are way out of line with your expectations and your language. I can see your frustration and sympathize with how difficult things seem. These guys are here to help you with guidance, not to do it for you. You have to have some ability to read and comprehend C# which is what NinjaScript language is based on.
So i think you have two options at this point. 1) Hire someone to get done what you need, there are plenty of pros here that will do that. 2) Spend your time reading the Ninjascript help manual, review the many many examples of coding and if you are serious, learn to program in C#.
Good luck.
Comment
-
They really are trying to help and they don't know when someone asks a technical/programming question if that person that asks the question is knowledgeable in programming. In many cases I think most people are and they can be aided by simple references either to the manual section or programming example.Originally posted by cachevery View PostI Apollogize for my language,but why then provide with the thing that the support guys knew beforehand it would a lot o fun!It probably woulda been easier to say that it wouldn`t be possible then waste my time and make a joke out of me.
Comment
-
Maybe,but i`ve been asking for the same thing a couple of days in a row...Originally posted by Tasker-182 View PostThey really are trying to help and they don't know when someone asks a technical/programming question if that person that asks the question is knowledgeable in programming. In many cases I think most people are and they can be aided by simple references either to the manual section or programming example.
Comment
-
Hello cachevery,
I believe all the pieces of the puzzle are here and just need to be put together to be able to accomplish what you want.
Let me try a different way to assist you further. Could you post the snippet of code that you are using and the exact output that you are getting so that I can try to help?JCNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
332 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment