• 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 sending email when not expected.

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

    SendMail sending email when not expected.

    I have an indicator set up that draws on my chart when certain conditions are met and will then also email me.
    I've noticed recently that I'm sometimes getting more than one email for what seems to be the same thing.
    I'm running the indicator on an hourly EURUSD and GBPUSD chart.

    Today at 10am the conditions were met and an email was sent out as expected a few seconds later. Then at 10:14am the same email was sent out. Both are listed in the Log.

    I'm not sure how best to troubleshoot this so was hoping you might be able to offer me some assistance?

    Thanks
    Tim

    #2
    Hello timcjpfx,

    Thanks for your post.

    What calculate mode does the indicator run under? (Calculate.OnBarClose, Calculate.OnEachTick, Calculate.OnPriceChange)

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      What calculate mode does the indicator run under? (Calculate.OnBarClose, Calculate.OnEachTick, Calculate.OnPriceChange)
      Calculate.OnBarClose

      Regards
      Tim

      Comment


        #4
        Hello timcjpfx,

        Thanks for your reply.

        So you are running the indicator on two different instruments and charts that use hourly bars where your code would be expected to execute once per hour. Do you have any other instances of the indicator running on a lower time frame in any other workspaces or perhaps the market analyzer?

        If no other instances, then we suggest adding a print() or Log() statement into the same code block as sendMail() and closing the other instance and testing with just the one instance of the indicator. Also if you have any alerts configured to disable them for the test period.


        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thanks Paul

          No other instances running. For adding print() or log() statement, what information should I log or print to help troubleshoot it?

          Regards
          Tim

          Comment


            #6
            Hello Tim,

            Thanks for your reply.

            Something simple such as the date/time of the bar and a brief message like "sending mail". When you get your e-mails, check the time stamps shown on the output or log to see if you are getting a match.
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by trader252, Today, 08:38 PM
            0 responses
            2 views
            0 likes
            Last Post trader252  
            Started by ralett, Today, 06:20 PM
            0 responses
            5 views
            0 likes
            Last Post ralett
            by ralett
             
            Started by grizzlytrader, Today, 06:24 AM
            1 response
            20 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by andrewtrades, Today, 01:43 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by FuturesRon, Today, 03:09 AM
            1 response
            18 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X