Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart alert

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

    Chart alert

    How can I create an alert (to sound an audio alert and/or send email) to be activated when a Heiken Ashi overlay changes colour?

    Thanks

    #2
    Hello cognis0,
    Thanks for posting today.

    This can be done by manually checking the open and close of the current HeikenAshi bar and determining if it would have been green or red.

    For example you could use this condition statement and insert an alert statement.

    Code:
    ]if (HeikenAshi().HAOpen[0] > HeikenAshi().HAClose[0])
    {
    //bar color will be Red
    Alert("myAlert", NinjaTrader.Cbi.Priority.High, "Red Bar", "Alert1.wav", 10, Color.Black, Color.Yellow);
    }
    Here is a link to the documentation for the HeikenAshi indicator from the help guide. http://www.ninjatrader.com/support/h...eiken_ashi.htm

    Here is a link to the documentation for the Alert() method from the help guide. http://www.ninjatrader.com/support/h.../nt7/alert.htm

    Please let us know if we may be of further assistance for anything NinjaTrader.
    Last edited by NinjaTrader_AlexG; 06-16-2015, 07:19 AM.
    Alex G.NinjaTrader Customer Service

    Comment


      #3
      Thanks Alex, but I'm afraid that is a bit confusing for me as I haven't coded in NinjaTrader before. Where do I start with this? Is there a video covering alerts? Thanks
      Last edited by cognis0; 06-17-2015, 03:00 AM.

      Comment


        #4
        Hello cognis0,
        Thanks for the reply.

        We do not have a specific video for the situation you are trying to accomplish.

        I am attaching a video fro a tips series that shows how to Create Alerts using the Strategy Wizard. https://www.youtube.com/watch?v=vt0s4-sVyD4
        The wizard is designed to create custom code without having an extensive knowledge of coding.

        However, to determine the color of a bar you would still need to check the high and close. This can be set up in the condition wizard and then have this trigger an alert.

        Please let us know if we may be of further assistance for anything NinjaTrader.
        Alex G.NinjaTrader Customer Service

        Comment


          #5
          I've created a quick strategy to test alerts, but it doesn't appear to be working. I'm not seeing anything come up in the alerts window, nor getting emails (Options>Misc setup is tested working correctly). Code is here (I have deleted email addresses) http://snap.ashampoo.com/TE5Zn4WJ and http://snap.ashampoo.com/IrhbjgjW.

          Can you advise what is wrong please? Thanks

          Comment


            #6
            Hello,
            Thanks for the reply.

            Does your log or output window display an errors messages when the email should be sent or the alert sounded?

            I look forward to your reply.
            Alex G.NinjaTrader Customer Service

            Comment


              #7
              Thanks Alex,

              No, nothing in the log. It looks like the strategy is not firing somehow.. I tried to make this as simple as possible; there should be nothing to stop an alert firing once a bar closes below the open etc?

              Thanks

              Comment


                #8
                Hello,
                Thanks for the reply.

                If you comment out the SendMail() method do the alerts trigger? If the alerts trigger it would appear that your SendMail() method is not sending mail.

                You can change the SMTP outgoing mail server to use your own ISP's mail server.
                Here are the steps to set up the email services from within the Misc tab of the Options menu.
                • From the Control Center>Tools>Options>Misc tab
                • Set up the appropriate settings for your email provider.
                • Use the Test button to send a test email.
                • Left mouse click OK to apply these settings.


                Here is a link to the help guide describing the Misc Tab. http://www.ninjatrader.com/support/h...7/misc_tab.htm
                Here is a link to our support forum with common email provider SMTP set ups. http://www.ninjatrader.com/support/forum/showthread.php?t=45339


                Please let me know if this resolves the issue or let us know if we may be of further assistance for anything NinjaTrader.
                Alex G.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by zstheorist, Today, 07:52 PM
                0 responses
                5 views
                0 likes
                Last Post zstheorist  
                Started by pmachiraju, 11-01-2023, 04:46 AM
                8 responses
                150 views
                0 likes
                Last Post rehmans
                by rehmans
                 
                Started by mattbsea, Today, 05:44 PM
                0 responses
                6 views
                0 likes
                Last Post mattbsea  
                Started by RideMe, 04-07-2024, 04:54 PM
                6 responses
                33 views
                0 likes
                Last Post RideMe
                by RideMe
                 
                Started by tkaboris, Today, 05:13 PM
                0 responses
                6 views
                0 likes
                Last Post tkaboris  
                Working...
                X