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
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by helpwanted, Today, 03:06 AM
    1 response
    10 views
    0 likes
    Last Post sarafuenonly123  
    Started by Brevo, Today, 01:45 AM
    0 responses
    9 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    5 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    242 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    387 views
    1 like
    Last Post Gavini
    by Gavini
     
    Working...
    X