Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alert Sounds

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

    Alert Sounds

    Is there any way to toggle on or off alerts or alert sounds for charting indicators. Is there any way to choose a preferred sound for alerts from charting indicators? If these options must be hardcoded, is there a .wav file for silence?

    #2
    Hawk Arps, correct you would need to custom code this into your study either via PlaySound() or Alert() - I believe you could selfrecord a quick .wav with the mic muted and then use it in the indicator.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I have been able to create an alert toggle with drop down menu for alert sounds within the input parameters.Hooray! However, I want to be able to do this to several indicators.... when I repeat the process for the second, third, etc... indicators I get a compile error message stating that my enum AlertSound {} already exists in the global namespace... yet it doesn't work in the second,third indicators. Is there a way to repeat this process for many indicators without changing the name of the enum AlertSound { } for every indicator?

      Comment


        #4
        Hello Hawk Arps,

        Enums can only be declared once per namespace. Once declared (use Public for enums), you can have access to them from any other script.
        Last edited by NinjaTrader_RyanM1; 09-22-2011, 12:28 PM.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          In order to have many indicators access my public enum AlertSond {} without tying it to any one indicator in particular I have tried to place it in my User Defined Methods folder. However, the indicators do not seem to be able to find it there. Is there a generic way of creating an enum {} without tying to one particular indicator?

          Comment


            #6
            Yes, there may be a way to do this. We only support declaring enum in the namespace, but some users prefer a different approach. This thread may assist with one alternative approache:
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by Hawk Arps View Post
              I have been able to create an alert toggle with drop down menu for alert sounds within the input parameters.Hooray! However, I want to be able to do this to several indicators.... when I repeat the process for the second, third, etc... indicators I get a compile error message stating that my enum AlertSound {} already exists in the global namespace... yet it doesn't work in the second,third indicators. Is there a way to repeat this process for many indicators without changing the name of the enum AlertSound { } for every indicator?
              You declared your enum in the global namespace. That means it is available to all indicators with no further action. You do not need to declare it again in any other indicator. Just use it.

              Of course, if you do use the enum in any other indicator, it means that the file in which you declared the enum must be present in the assembly, or all the other indicators will scream "bloody murder". That means that you must give the declaration file also to any other user to whom you give the indicator, and also on any computer on which you use any of the indicators. Now you know at least one of the reasons why declaring anything in the global namespace is a bad thing.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by DJ888, Today, 10:57 PM
              0 responses
              1 view
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by MacDad, 02-25-2024, 11:48 PM
              7 responses
              158 views
              0 likes
              Last Post loganjarosz123  
              Started by Belfortbucks, Today, 09:29 PM
              0 responses
              7 views
              0 likes
              Last Post Belfortbucks  
              Started by zstheorist, Today, 07:52 PM
              0 responses
              7 views
              0 likes
              Last Post zstheorist  
              Started by pmachiraju, 11-01-2023, 04:46 AM
              8 responses
              151 views
              0 likes
              Last Post rehmans
              by rehmans
               
              Working...
              X