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 Jonafare, 12-06-2012, 03:48 PM
    5 responses
    3,986 views
    0 likes
    Last Post rene69851  
    Started by Fitspressorest, Today, 01:38 PM
    0 responses
    2 views
    0 likes
    Last Post Fitspressorest  
    Started by Jonker, Today, 01:19 PM
    0 responses
    2 views
    0 likes
    Last Post Jonker
    by Jonker
     
    Started by futtrader, Today, 01:16 PM
    0 responses
    8 views
    0 likes
    Last Post futtrader  
    Started by Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,792 views
    0 likes
    Last Post aligator  
    Working...
    X