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 cre8able, Today, 01:16 PM
        2 responses
        9 views
        0 likes
        Last Post cre8able  
        Started by chbruno, 04-24-2024, 04:10 PM
        3 responses
        48 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by samish18, Today, 01:01 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by WHICKED, Today, 12:56 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by WHICKED, Today, 12:45 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X