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 bmartz, 03-12-2024, 06:12 AM
                  2 responses
                  19 views
                  0 likes
                  Last Post bmartz
                  by bmartz
                   
                  Started by funk10101, Today, 12:02 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post funk10101  
                  Started by gravdigaz6, Yesterday, 11:40 PM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by MarianApalaghiei, Yesterday, 10:49 PM
                  3 responses
                  10 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by XXtrader, Yesterday, 11:30 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post XXtrader  
                  Working...
                  X