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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    181 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    334 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    258 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    358 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    187 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X