Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendMail()

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

    SendMail()

    I have a strategy that I've set up for AutoTrading. Inside OnBarUpdate, I have some conditionals that fire off orders. The orders are being generated and submitted correctly; however, I also have a SendMail() line in there to send email alerts when these orders are generated. The "Test Mail" function in Tools -> Options works, so I know the SMTP is set up correctly. However, no mail is being generated when orders are submitted, and no entries are being made in the log. Any suggestions on where to look from here?

    #2
    Are you sending mail from and to the correct email account? You may want to check on your ISP's end to see if they are blocking any mail. If there are no errors in NinjaTrader it means the mail has left the software and is probably getting snagged elsewhere.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Yes, I'm sending via the correct email accounts. As mentioned, the test emails send properly (and the fact that a test mail has been sent is logged). However, in this case no errors or anything whatsoever are being logged, there is simply no mail being sent.

      Comment


        #4
        Then you will need to debug your strategy logic to see if mail is even suppose to be sent. Use Print() to see if the mail is suppose to be sent. Again, if it was suppose to be sent and the function was triggered with no errors that means the mail has went out and is getting snagged outside of the software. Test mail working doesn't mean your email won't get snagged for any other reason.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pechtri, 06-22-2023, 02:31 AM
        10 responses
        124 views
        0 likes
        Last Post Leeroy_Jenkins  
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Yesterday, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Started by olisav57, Yesterday, 07:39 PM
        0 responses
        7 views
        0 likes
        Last Post olisav57  
        Started by trilliantrader, Yesterday, 03:01 PM
        2 responses
        22 views
        0 likes
        Last Post helpwanted  
        Working...
        X