Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to sendmail() with current symbol and close price

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

    how to sendmail() with current symbol and close price

    how to sendmail() with current symbol and closing price when the condition is met?

    #2
    Try this post. Josh was very helpful

    NinjaTrader Customer Service



    Join Date: May 2007
    Location: Denver, CO
    Posts: 4,087



    Code:
    SendMail("[email protected]", "[email protected]", "Trade Alert", "Long strategy triggered on " + Instrument.MasterInstrument.Name + " in " + Bars.Period.Value + "-" + Bars.Period.Id + " time frame.");
    The body of your email would end up as something like this:
    "Long strategy triggered on ER2 in 1-Minute time frame."
    __________________

    Comment


      #3
      thanks...

      I also like to add current time and price when email was sent...how can i do that?

      Comment


        #4
        Hi tbtrades,

        Add Time[0] and Close[0] to your message string.

        Code:
        SendMail("[email protected]", "[email protected]", "Trade Alert", "Long strategy triggered on " + Instrument.MasterInstrument.Name + " in " + Bars.Period.Value + "-" + Bars.Period.Id + " time frame." + " Time: " + Time[0] + " Price: " + Close[0]);
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by mmckinnm, Today, 01:34 PM
        0 responses
        1 view
        0 likes
        Last Post mmckinnm  
        Started by f.saeidi, Today, 01:32 PM
        0 responses
        1 view
        0 likes
        Last Post f.saeidi  
        Started by traderqz, Today, 12:06 AM
        9 responses
        16 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by kevinenergy, 02-17-2023, 12:42 PM
        117 responses
        2,766 views
        1 like
        Last Post jculp
        by jculp
         
        Started by Mongo, Today, 11:05 AM
        5 responses
        15 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X