• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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
    http://www.ninjatrader-support.com/H...V6/Period.html

    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.

        http://www.ninjatrader.com/support/f...ad.php?t=19174
        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].com", 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 Jurase, Today, 06:47 PM
                  2 responses
                  5 views
                  0 likes
                  Last Post Jurase
                  by Jurase
                   
                  Started by GTBrooks, Today, 05:53 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post GTBrooks  
                  Started by jeronymite, Today, 04:50 PM
                  0 responses
                  5 views
                  0 likes
                  Last Post jeronymite  
                  Started by daigo1, Today, 04:41 PM
                  0 responses
                  14 views
                  0 likes
                  Last Post daigo1
                  by daigo1
                   
                  Started by Harrylwd4, Today, 03:15 PM
                  1 response
                  11 views
                  0 likes
                  Last Post NinjaTrader_ChrisL  
                  Working...
                  X