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 cmtjoancolmenero, Yesterday, 03:58 PM
            11 responses
            42 views
            0 likes
            Last Post cmtjoancolmenero  
            Started by FrazMann, Today, 11:21 AM
            0 responses
            5 views
            0 likes
            Last Post FrazMann  
            Started by geddyisodin, Yesterday, 05:20 AM
            8 responses
            52 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by DayTradingDEMON, Today, 09:28 AM
            4 responses
            27 views
            0 likes
            Last Post DayTradingDEMON  
            Started by George21, Today, 10:07 AM
            1 response
            22 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Working...
            X