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 Max238, Today, 01:28 AM
        2 responses
        26 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by Shansen, 08-30-2019, 10:18 PM
        25 responses
        949 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by JonesJoker, 04-22-2024, 12:23 PM
        8 responses
        41 views
        0 likes
        Last Post JonesJoker  
        Started by timko, Today, 06:45 AM
        0 responses
        3 views
        0 likes
        Last Post timko
        by timko
         
        Started by Waxavi, 04-19-2024, 02:10 AM
        2 responses
        39 views
        0 likes
        Last Post poeds
        by poeds
         
        Working...
        X