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

Help With Alert

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

    Help With Alert

    Hello Ninjas,

    I've defected from Esignal to NinjaTrader :-)

    I was wondering if someone could show me how to add an alert to a script. Basically, I would like a sound / pop up alert when the following line from the script is active

    Add(new Plot(new Pen(Color.LimeGreen,3), PlotStyle.Bar, "MFIUpVUp")); //Plot0


    The full script is as follows is attached.

    Cheers

    Carlton
    Attached Files

    #2
    carlton, you would need to call the Alert() or PlaySound() method when your condition is triggered :



    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,

      Do you think you could show just this once. I've made a couple of attempts from the help site you provided but I failed....

      Would really appreciate it...

      Cheers mate...

      Comment


        #4
        You can try adding something like the below snippet to the conditions setting your plot of interest :

        if(mfiUp && volUp)
        {
        MFIUpVUp.Set(mfi[0]);
        MFIDnVDn.Reset();
        MFIUpVDn.Reset();
        MFIDnVUp.Reset();
        Alert("myAlert", NinjaTrader.Cbi.Priority.High, "MFI Signal", "Alert2.wav", 10, Color.Black, Color.Yellow);
        }
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks for that snippet.

          I'm going to apply it and see if I can get it to work.

          Cheers

          Comment


            #6
            Hi Bertrand,

            I've been trying to get the alert to work but nothing pops up.

            Can you tell me what I'm doing wrong?

            Cheers

            Comment


              #7
              After you've changed the code, did you compile your changes in by pressing F5 in the NinjaScript editor and then reloaded the indicator fresh and ensured the Alert window is up?
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Ahhhhh,

                I did press F5 but I didn't check for the alerts window.

                Going to do that now.

                Ill let you know.

                Cheers mate.

                Comment


                  #9
                  Bertrand,

                  Forgive this newbie question, but can you let me know where to activate the alerts window?

                  Cheers

                  Comment


                    #10
                    Bertrand,

                    No worries mate... The sound alerts is just fine.

                    Cheers mate..

                    Comment


                      #11
                      Ok, great - the dedicated alerts window in found under File > New > Alerts.
                      BertrandNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by frslvr, 04-11-2024, 07:26 AM
                      8 responses
                      111 views
                      1 like
                      Last Post NinjaTrader_BrandonH  
                      Started by stafe, 04-15-2024, 08:34 PM
                      10 responses
                      42 views
                      0 likes
                      Last Post stafe
                      by stafe
                       
                      Started by rocketman7, Today, 09:41 AM
                      3 responses
                      8 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by traderqz, Today, 09:44 AM
                      2 responses
                      5 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by rocketman7, Today, 02:12 AM
                      7 responses
                      31 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Working...
                      X