Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Facilitation Index Alert

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

    Market Facilitation Index Alert

    Hello Ninjas,

    Its been a while since I asked for assistance here so not sure if I should send the file when asking for help with an indicator.

    Anyway, I was wondering if someone could should me how to tweak the following indicator to sound an alert when the MFI is green?


    Cheers

    Carlton
    Attached Files

    #2
    Hello Carlton,

    Thank you for your post.

    Have you attempted to add an alert already?
    From the Indicator's code I see the following:
    Code:
    Alert("myAlert", NinjaTrader.Cbi.Priority.High, "ES 5 Min. Close = " + Close[0].ToString(), "Windows Balloon.wav", 10, Color.Black, Color.Yellow);
    The item that may be occurring here is that you must list the absolute file path of the soundLocation. You can just list the name of the file as listed above but only if the file is located in C:\Program Files\NinjaTrader Installation Folder\sounds folder.

    Please let me know if you have not tried to add Alert() already or if listing the absolute file location resolves this matter.

    Comment


      #3
      Hi Patrick,

      Thanks for getting back to me, I don't recall already attempting to add an alert. However, the Windows Balloon.wav file is located in the folder highlighted below:

      C:\Program Files (x86)\NinjaTrader 7\sounds

      Also, the alert should occur when the MFI is green.

      Cheers

      Carlton

      Comment


        #4
        Hello Carlton,

        Thank you for your response.

        Are you changing any of the Plot colors manually when applying the indicator?

        If not, then the following condition will trigger and set the Plot to LimeGreen and set off the Alert():
        Code:
        if(mfiUp && volUp)
        {
        MFIUpVUp.Set(mfi[0]);
        MFIDnVDn.Reset();
        MFIUpVDn.Reset();
        MFIDnVUp.Reset();
        Alert("myAlert", NinjaTrader.Cbi.Priority.High, "ES 5 Min. Close = " + Close[0].ToString(), "Windows Balloon.wav", 10, Color.Black, Color.Yellow);
        }
        However, you may need to change the soundLocation to the following:

        Code:
        Alert("myAlert", NinjaTrader.Cbi.Priority.High, "ES 5 Min. Close = " + Close[0].ToString(), "C:\Program Files\NinjaTrader Installation Folder\sounds\Windows Balloon.wav", 10, Color.Black, Color.Yellow);
        Please let me know if I may be of further assistance.

        Comment


          #5
          Thanks again for getting back to me.

          Can you tell me the difference between you're update and the following:

          {
          MFIUpVUp.Set(mfi[0]);
          MFIDnVDn.Reset();
          MFIUpVDn.Reset();
          MFIDnVUp.Reset();
          Alert("myAlert", NinjaTrader.Cbi.Priority.High, "YM 5 Min. Close = " + Close[0].ToString(), "Windows Balloon.wav", 10, Color.Black, Color.Yellow);

          }

          Cheers

          Comment


            #6
            Hello Carlton,

            Thank you for your response.

            There is no difference between what you have posted and what I have posted previous to that.

            However, please advise if changing the Alert() to the following resolves this matter: Alert("myAlert", NinjaTrader.Cbi.Priority.High, "ES 5 Min. Close = " + Close[0].ToString(), "C:\Program Files\NinjaTrader Installation Folder\sounds\Windows Balloon.wav", 10, Color.Black, Color.Yellow);

            Please let me know if I may be of further assistance.

            Comment


              #7
              Patrick thanks again for getting back to me.

              I added the following line and it didn't work:

              Code:
              Alert("myAlert", NinjaTrader.Cbi.Priority.High, "YM 5 Min. Close = " + Close[0].ToString(), "C:\Program Files\NinjaTrader 7\sounds\Windows Balloon.wav", 10, Color.Black, Color.Yellow);
              I can't find the folder you suggested as follows:

              C:\Program Files\NinjaTrader Installation

              Comment


                #8
                Patrick

                I get the error message, 'Unrecognized Escape Sequence"

                Comment


                  #9
                  Patrick,

                  I got the same error message even with your suggestion.....

                  Comment


                    #10
                    Originally posted by carlton View Post
                    Patrick,

                    I got the same error message even with your suggestion.....
                    Put an @ before the file path:

                    Alert("myAlert", NinjaTrader.Cbi.Priority.High, "YM 5 Min. Close = " + Close[0].ToString(), @"C:\Program Files\NinjaTrader 7\sounds\Windows Balloon.wav", 10, Color.Black, Color.Yellow);

                    Comment


                      #11
                      Hello Carlton,

                      Thank you for your response.

                      We will need to add an @ symbol in front of the directory for this to work.
                      Such as the following:
                      Code:
                      Alert("myAlert", NinjaTrader.Cbi.Priority.High, "YM 5 Min. Close = " + Close[0].ToString(), @"C:\Program Files\NinjaTrader 7\sounds\Windows Balloon.wav", 10, Color.Black, Color.Yellow);
                      Please let me know if this resolves the matter.

                      Comment


                        #12
                        Originally posted by NinjaTrader_PatrickH View Post

                        However, please advise if changing the Alert() to the following resolves this matter: Alert("myAlert", NinjaTrader.Cbi.Priority.High, "ES 5 Min. Close = " + Close[0].ToString(), "C:\Program Files\NinjaTrader Installation Folder\sounds\Windows Balloon.wav", 10, Color.Black, Color.Yellow);
                        Hi Patrick,

                        It didn't work, got the error message "Unrecognized Escape Sequence"

                        Comment


                          #13
                          Hello Carlton,

                          Thank you for your response.

                          Please add an @ symbol in front of the directory for this to work.
                          Such as the following: @"C:\Program Files\NinjaTrader 7\sounds\Windows Balloon.wav"
                          Code:
                          Alert("myAlert", NinjaTrader.Cbi.Priority.High, "YM 5 Min. Close = " + Close[0].ToString(), @"C:\Program Files\NinjaTrader 7\sounds\Windows Balloon.wav", 10, Color.Black, Color.Yellow);
                          Please let me know if this resolves the matter.

                          Comment


                            #14
                            Hi Patrick,
                            I added the following line at it compiled ok

                            Alert("myAlert", NinjaTrader.Cbi.Priority.High, "YM 5 Min. Close = " + Close[0].ToString(), @"C:\Program Files\NinjaTrader 7\sounds\Windows Balloon.wav", 10, Color.Black, Color.Yellow);
                            I hope I inserted the folder correctly..... we will find out when MFI turns green :-)

                            Thanks for your help.

                            Cheers

                            Carlton

                            Comment


                              #15
                              Hi Patrick,

                              It didn't alert. However, I can't think of any reason why?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by trilliantrader, 04-18-2024, 08:16 AM
                              5 responses
                              22 views
                              0 likes
                              Last Post trilliantrader  
                              Started by Davidtowleii, Today, 12:15 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post Davidtowleii  
                              Started by guillembm, Yesterday, 11:25 AM
                              2 responses
                              9 views
                              0 likes
                              Last Post guillembm  
                              Started by junkone, 04-21-2024, 07:17 AM
                              9 responses
                              68 views
                              0 likes
                              Last Post jeronymite  
                              Started by mgco4you, Yesterday, 09:46 PM
                              1 response
                              12 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X