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

Moving Average Alert

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

    Moving Average Alert

    Hello

    I use the Ninja Script in which the user may add colors to
    different types of Moving Averages at the point they turn up or down.

    I would like an alert added which would sound
    when the Moving Averages turn colors (turn up or down).

    Could anyone point me in the direction of a solution (either to a good custom programmer or a simple solution I'm overlooking)?

    Many Thanks

    #2
    Hello,

    Here are our consultants:


    Or you can use Alert():
    DenNinjaTrader Customer Service

    Comment


      #3
      place the following sound code after the code that changes the color.

      PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\Alert1.wav");

      Forget using NT's Alert Window. You can also program a "pop up window Alert" which will really call attention to your alert.

      good luck

      Comment


        #4
        Hello,

        Thanks Velocity!
        DenNinjaTrader Customer Service

        Comment


          #5
          hi,
          i want to make a sound alarm that repeat untill user click the message box. could you advise how to call a pop up window? C# function MessageBox.Show() doesn't work. thanks a lot.

          Comment


            #6
            Unfortunately this is outside the scope of what we can offer support for. Best bet would be to check MSDN or google for resources on making popups.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by gujungg View Post
              hi,
              i want to make a sound alarm that repeat untill user click the message box. could you advise how to call a pop up window? C# function MessageBox.Show() doesn't work. thanks a lot.

              Try this:

              #region Using declarations

              using System.Windows.Forms;


              protectedoverridevoid OnBarUpdate()
              {


              if (blah blah blah)
              {
              PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\Alert1.wav");
              MessageBox.Show ("Breakout, Get Long at " + Close[0] , "Market Breakout Alert", MessageBoxButtons.OK, MessageBoxIcon.Information);
              }

              }

              Keep in mind the chart will stop charting until the user clicks "OK".
              Also, you can change the icon by replacing MessageBoxIcon.Information with
              MessageBoxIcon.Warning or
              MessageBoxIcon.Question

              Also, be careful if you are not using a on bar completion indicator because you will need to program the popup to fire only ONCE if you are using a tick update indicator.

              Gook Luck!
              Last edited by velocity; 09-19-2009, 12:41 PM.

              Comment


                #8
                you are the man

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by StockTrader88, 03-06-2021, 08:58 AM
                45 responses
                3,992 views
                3 likes
                Last Post johntraderuser2  
                Started by TAJTrades, Today, 09:46 AM
                0 responses
                7 views
                0 likes
                Last Post TAJTrades  
                Started by rhyminkevin, Yesterday, 04:58 PM
                5 responses
                62 views
                0 likes
                Last Post dp8282
                by dp8282
                 
                Started by realblubb, Today, 09:28 AM
                0 responses
                8 views
                0 likes
                Last Post realblubb  
                Started by AaronKoRn, Yesterday, 09:49 PM
                1 response
                19 views
                0 likes
                Last Post Rikazkhan007  
                Working...
                X