Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Symbol name in email alert

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Symbol name in email alert

    Hi,

    I have set up an email alert to notify myself if there is a change in the bar color (of the recently closed bar). I would like to include the symbol name, e.g. EURNZD, in the email subject line or the text of the email. I have tried:
    string instrument = Instrument.FullName;

    but that did not work, it returned the above string ("string instrument = Instrument.FullName;") in plain text, either in the subject line or the text of the mail (depending on where I inserted it), and not the symbol.

    Any thoughts would be appreciated, thank you!

    #2
    Hello chris07,

    Thanks for your post and welcome to the NinjaTrader forums!

    With the SendMail() you can either provide literal strings or string variables (or both) in this manner:

    SendMail("[email protected]", "This is a test on"+Instrument.Fullname", "this is the body of the e-mail, close price = "+Close[0].Tostring())

    Reference: https://ninjatrader.com/support/help.../?sendmail.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    65 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    41 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    23 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    26 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    52 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X