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 DynamicTest, Today, 11:18 PM
            0 responses
            3 views
            0 likes
            Last Post DynamicTest  
            Started by dcriador, Today, 01:43 AM
            3 responses
            19 views
            0 likes
            Last Post dcriador  
            Started by smartromain, Today, 10:50 PM
            0 responses
            5 views
            0 likes
            Last Post smartromain  
            Started by popecapllc, 08-09-2023, 07:42 PM
            10 responses
            1,366 views
            0 likes
            Last Post BartMan
            by BartMan
             
            Started by jbays87, Today, 09:46 PM
            0 responses
            6 views
            0 likes
            Last Post jbays87
            by jbays87
             
            Working...
            X