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

Play Sound Variable

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

    Play Sound Variable

    Hi Guys,

    I am wanting to haver a choice of variable sound files to select from the @:folder.

    I am using a string with knowledge of whats in the folder I want to view the folder and select the file required any ideas on how to achieve this.

    privatestring alertfile = @"Alert2"; // Default setting for Alertfile


    [Description("")]
    [GridCategory(
    "Parameters")]
    publicstring Alertfile
    {
    get { return alertfile; }
    set { alertfile = value; }
    }

    Thanks Raef

    #2
    Hello Raef,
    Thanks for writing in and I am happy to assist you.

    You can add a folderbrowserdialog but it is beyond what we could support. However you can look into this thread for further reference http://www.ninjatrader.com/support/f...t=36162&page=2

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks Joydeep M.

      I have had a look at that and got it working sort of.

      Is there a way of asking for a .Wav file similar to like Color??

      KnownColor.Red

      KnownSound."".Wav

      Raef

      Comment


        #4
        Hello Raef,
        You can create a custom Enum for this purpose. Please go through this sample reference code to get more idea on Enum and how to implement an Enum http://www.ninjatrader.com/support/f...ead.php?t=3420

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Hi guys,

          I have been working on completing a file.dialog box for wav sound files and am starting to think that I will have to add .dll files to my system to make this a reality.

          Or is this somthing that is coded into ninja?

          public static string
          {
          GetFileName( string C:\Program Files\NinjaTrader Installation Folder\sounds
          { return sellalert; }
          set { sellalert = value; }
          }
          thanks Raef

          Comment


            #6
            Originally posted by NinjaTrader_Joydeep View Post
            Hello Raef,
            You can create a custom Enum for this purpose. Please go through this sample reference code to get more idea on Enum and how to implement an Enum http://www.ninjatrader.com/support/f...ead.php?t=3420

            Please let me know if I can assist you any further.

            Hi NT,

            This would be a nice feature to add to the platform. Drop down selector for wav files in the Sounds folder.

            RJay
            RJay
            NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

            Comment


              #7
              Originally posted by raefon72 View Post
              Hi Guys,

              I am wanting to haver a choice of variable sound files to select from the @:folder.

              I am using a string with knowledge of whats in the folder I want to view the folder and select the file required any ideas on how to achieve this.

              privatestring alertfile = @"Alert2"; // Default setting for Alertfile


              [Description("")]
              [GridCategory(
              "Parameters")]
              publicstring Alertfile
              {
              get { return alertfile; }
              set { alertfile = value; }
              }

              Thanks Raef
              This thread, even though its title would suggest differently, has the code that you seek. http://www.ninjatrader.com/support/f...d.php?p=243123

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by alifarahani, Today, 09:40 AM
              6 responses
              27 views
              0 likes
              Last Post alifarahani  
              Started by Waxavi, Today, 02:10 AM
              1 response
              17 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by Kaledus, Today, 01:29 PM
              5 responses
              13 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by Waxavi, Today, 02:00 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by gentlebenthebear, Today, 01:30 AM
              3 responses
              17 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X