Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 JonesJoker, 04-22-2024, 12:23 PM
            7 responses
            41 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by Waxavi, 04-19-2024, 02:10 AM
            2 responses
            37 views
            0 likes
            Last Post poeds
            by poeds
             
            Started by chbruno, Yesterday, 04:10 PM
            1 response
            44 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Max238, Today, 01:28 AM
            1 response
            24 views
            0 likes
            Last Post CactusMan  
            Started by giulyko00, Yesterday, 12:03 PM
            2 responses
            10 views
            0 likes
            Last Post giulyko00  
            Working...
            X