Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendMail

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

    SendMail

    Hi, i've added a sendmail to an NT indicator Script, which runs in the market analyzer on different time frames. How do i send the time frame the indicator was raised on in the email subject?

    thanks
    ryebank

    #2
    Hello ryebank,

    You could use Bars.Period.Value and Bars.Period.Id


    Example below:
    Code:
     
    Print("This was calculated from a " + Bars.Period.Value + " " + Bars.Period.Id + " series.");
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      How do i add that to

      SendMail("myemail@address.com", "[email protected]", Instrument.FullName + Time[0], "Alert");

      Comment


        #4
        You should add to either the subject or the text portion of SendMail().
        SendMail(string from, string to, string subject, string text)

        If you're looking to do more formatting than the example provided, see the reference sample below on manipulating strings for additional help.

        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          pushing mu look here but can you give me an example for sending email on alerts on 60 minute timeframes?

          also is it possible to send to more than 1 email address. I have a home email and a work email and i would also like to send the alerts to my work email as well.

          Thanks
          Ryebank

          Comment


            #6
            The alert is applied to whatever time frame is selected when you add the indicator to the market analyzer. See the attached screenshot for where this is set.


            You can add multiple SendMail() statements to send to additional addresses.
            Attached Files
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              so how do i reference these values you highlight

              SendMail("myemail@address.com", "[email protected]", Instrument.FullName + Time[0] + Chart.Type + Chart.Value, "Alert");

              Comment


                #8
                Please clarify what you're trying to do. My understanding is that you're looking for Bars.Period.Id and Bars.Period.Value

                SendMail("myemail@address.com", "[email protected]", Instrument.FullName + Time[0] + Bars.Period.Id + Bars.Period.Value, "Alert");
                Ryan M.NinjaTrader Customer Service

                Comment


                  #9
                  thats exactly what i was looking for...many thanks

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  111 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  59 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  38 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  41 views
                  0 likes
                  Last Post TheRealMorford  
                  Started by Mindset, 02-28-2026, 06:16 AM
                  0 responses
                  78 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Working...
                  X