Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Popup Alerts Suggestion...

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

    Popup Alerts Suggestion...

    Maybe I've missed it somewhere, but a mechanism to have alerts popup on their own (not in the alerts box) would be useful to add to indicators/strategies

    ie. If price reaches target price - popup alarm/alert ... just like a bell, but it's a standalone visual that would have info about the alert, and an OK button to close it.

    At the very least, the alerts dialog box should open itself (if not already) and be foregrounded for easy comprehension that an alert occurred.

    Matt

    #2
    Hi Matt,

    Thank you for your post.

    This would be possible, but custom programming in some of the non-supported areas of NinjaScript would be required.

    I will, however, forward this on to my development team for further consideration.
    KyleNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Kyle View Post
      Hi Matt,

      Thank you for your post.

      This would be possible, but custom programming in some of the non-supported areas of NinjaScript would be required.

      I will, however, forward this on to my development team for further consideration.
      Yes. Having an API call that would be supported would be ideal.

      Comment


        #4
        Use Windows MessageBox to popup alerts

        I use the standard windows message box to pop up alerts. Here is my code snippet:
        if (CrossAbove(MACD(8,13,5), 0, (candles_ago)))
        {
        MessageBox.Show(chart + " MACD Crossing up");
        SendMail(from, to, chart + " MACD Crossing up", chart);
        }
        if (CrossBelow(MACD(8,13,5), 0, (candles_ago)))
        {
        MessageBox.Show(chart + " MACD Crossing down");
        SendMail(from, to, chart + " MACD Crossing down", chart);
        }
        The only problem I had was that it sometimes wants to pop endless message boxes on startup. I added a 1 minute timer to the beginning of OnBarUpdate() and that took care of it.

        Comment


          #5
          Originally posted by buschkt View Post
          I use the standard windows message box to pop up alerts. Here is my code snippet:
          if (CrossAbove(MACD(8,13,5), 0, (candles_ago)))
          {
          MessageBox.Show(chart + " MACD Crossing up");
          SendMail(from, to, chart + " MACD Crossing up", chart);
          }
          if (CrossBelow(MACD(8,13,5), 0, (candles_ago)))
          {
          MessageBox.Show(chart + " MACD Crossing down");
          SendMail(from, to, chart + " MACD Crossing down", chart);
          }
          The only problem I had was that it sometimes wants to pop endless message boxes on startup. I added a 1 minute timer to the beginning of OnBarUpdate() and that took care of it.
          Thanks for the idea -

          What declaration do I need to use for MessageBox?

          Also, what datatype is chart?

          Thanks

          Matt

          Comment


            #6
            Message Box implementation

            Chart is a string. I use it as a parameter. I have not found a way to determine what chart my indicator is running on so I enter it as a parameter when adding the indicator.

            I think "using System.Windows.Forms" is required for Message box.

            Here are my declarations:

            using System;
            using System.Windows.Forms;
            using System.ComponentModel;
            using System.Diagnostics;
            using System.Drawing;
            using System.Drawing.Drawing2D;
            using System.Xml.Serialization;
            using NinjaTrader.Cbi;
            using NinjaTrader.Data;
            using NinjaTrader.Indicator;
            using NinjaTrader.Gui.Chart;
            using NinjaTrader.Strategy;
            using System.Timers;

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            599 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            344 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            558 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            557 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X