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)

    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.


        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            607 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            353 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            560 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            561 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X