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 jxs_xrj, 01-12-2020, 09:49 AM
    5 responses
    3,290 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    7 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    61 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    8 views
    0 likes
    Last Post Option Whisperer  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    24 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X