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

Popup alert window

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

    Popup alert window

    Hi, can anyone tell me if it is possible to program a popup window with text to alert us of certain conditions.

    I am aware of the audio alert and the text that accompanies it prints out to the output window, but I would like something like Tradestation, in which no matter what chart is open or what program is running, a window will popup with the alert telling us what chart, timeframe and a message.

    Thanks

    #2
    This is possible with standard C# methods such as MessageBox() or creation of a form. You would have to review the Microsoft C# references for ideas on how to accomplish this.
    RayNinjaTrader Customer Service

    Comment


      #3
      I think it can be done something like this;

      In the 'Using Declarations' section at the very top add

      Code:
      using System.Windows.Forms;
      Then add this based on your condition

      i.e.
      Code:
      MessageBox.Show("Up Trend!");
      This seems to work, the only problem is the MsgBox will come up a repeatedly for every historical instance the condition occurred, so you could have your finger on the enter button for a while!

      If anyone can point to an example of how to use MessageBox that overcomes this problem I'd love to see it.

      ref:
      Own this domain today. We make your shopping experience easy. Friendly and quick customer service.

      Comment


        #4
        You can try:

        if (!Historical) MessageBox.Show("I am poping up only on real time data");
        Last edited by roonius; 01-08-2009, 08:31 PM.

        Comment


          #5
          That looks to be it. Thanks again!

          Originally posted by roonius View Post
          You can try:

          if (!Historical) MessageBox.Show("I am poping up only on real time data");

          Comment


            #6
            Elliott Wave,

            Thanks for the link. You can never have too many C# Tutorials bookmarked.


            ref:
            http://blog.paranoidferret.com/index...-1-messagebox/[/quote]

            Comment


              #7
              Thanks everyone, I will take a look at changing my programming tonight but it looks like we are on on the right track.

              Comment


                #8
                As roonius pointed out, its VERY important to surround your messagebox alert with a

                Code:
                if(!Historical)
                {
                
                }
                block...

                otherwise you may get flooded with message boxes each time you reload a chart.
                mrlogik
                NinjaTrader Ecosystem Vendor - Purelogik Trading

                Comment


                  #9
                  The !historical method helps quite a bit, but you can still end up with a pile of msg boxes if you leave your computer for any length of time.

                  There is definitely a trade off here.

                  Being stuck with annoying and useless system modal dialogs for the splash screen and data loading windows (*which is reported to be addressed in NT7 btw), while your alerts languish unnoticed in the background (if you are lucky enough to have the alerts window open that is) is a major annoyance, but I'm not finding MessageBox() dialogs much more convenient personally. I think this is just one of those things I'll have to reserve further judgment on until NT7 is released...

                  Comment


                    #10
                    How about setting up a custom timer event to take out the messagebox after n milliseconds?
                    Last edited by mktrend; 01-07-2009, 06:58 AM.

                    Comment


                      #11
                      Originally posted by mktrend View Post
                      How about setting up a custom timer event to take out the messagebox after n milliseconds?
                      Just make sure you set enough milliseconds, so you have time to read it and click OK....
                      Last edited by roonius; 01-08-2009, 08:31 PM.

                      Comment


                        #12
                        Originally posted by roonius View Post
                        Just make sure you set enough milliseconds, so you have time to read it and click OK...
                        The timer can be a property that you could set to 1 millisecond for times it's not being monitored and the event will take care of messages not piling up! In response to Elliot... who had asked for a workaround.

                        Comment


                          #13
                          Print price with Alert message

                          Hello,

                          Does anybody knows if it is indeed possible to :

                          1.Print price with Alert message in Alert window?

                          2.Print price with Alert message with exact alert Price on the chart via Drawtext method?

                          Thank you...

                          Comment


                            #14
                            Hi xtrender,

                            1. This is possible, please see this link - http://www.ninjatrader-support.com/H...eV6/Alert.html

                            2. This would be also possible with custom coding, however there is no option to plot this on the chart automatically from the Alerts window.
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              See the link...missed the clue...need cofffe

                              Hi Bertrand,

                              I don't need to see this on the chart. My question was if I can add Price at the time of Alert to message in alert windows.

                              // Generates an alert
                              Alert("myAlert", NinjaTrader.Cbi.Priority.High, "Reached threshold", "Alert1.wav", 10, Color.Black, Color.Yellow);

                              Where i the above line can I add Close[0]?


                              Also I ran into strange problem, it seams I can not reference high and low of the same bar for breakout. Example, high[0]> swingHigh && low[0] < swingHigh. This would not draw an arrow when condition occur? Each part of this line plots separately, but not together?
                              What I really looking for is to limit alert to the first brekout bar. I understand you are not going to code this for me, but maybe you can give some suggestions.

                              As always, I apriciate your input.

                              Thank you.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by rtwave, 04-12-2024, 09:30 AM
                              4 responses
                              31 views
                              0 likes
                              Last Post rtwave
                              by rtwave
                               
                              Started by yertle, Yesterday, 08:38 AM
                              7 responses
                              29 views
                              0 likes
                              Last Post yertle
                              by yertle
                               
                              Started by bmartz, 03-12-2024, 06:12 AM
                              2 responses
                              22 views
                              0 likes
                              Last Post bmartz
                              by bmartz
                               
                              Started by funk10101, Today, 12:02 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post funk10101  
                              Started by gravdigaz6, Yesterday, 11:40 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X