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

Audio Alerts

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

    Audio Alerts

    Hi,
    I want to add some more features to the "FractalPivot_TradeStation" indicator which I downloaded from this website.The file is attached with this post.

    I wanted to add "down" and "up" arrows instead of the dots. It worked.

    I also want to add audio messages only when these arrows are painted on the screen. I used following line in the code. It does not work. The sound plays on each bar and not when the arrows are painted on the chart.

    Alert("Alert1", NinjaTrader.Cbi.Priority.High, "Sample1", "Alert4.wav", 37, Color.Black, Color.Yellow);



    I also tried with the line


    PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Alert3.wav.wav");

    This does not play even.



    I will much appreciate if some one can guide me. I am not a programmer. I will be glad to try some tweaking and learning with your help. I have attached both the original indicator and the revised file.

    The two files are:

    In process - FractalPivot_TradeStation.zip
    Original - FractalPivot_TradeStation.zip


    Thank you.

    Attached Files

    #2
    Hello,

    Can you please check your Log tab of the Control Center center for any errors that may be listed? If you go to File--> New--> Alerts do you see any alerts listed?


    I look forward to assisting you further.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Alert sound

      Matthew,

      Thank you very much for your assistance.

      I only want to have an audio alert as soon as the drawings are done by the indicator, which is based on the fractal conditions being met.

      I inserted a line for alert in the code.

      Alert("Alert1", NinjaTrader.Cbi.Priority.High, "Sample1", "Alert3.wav", 37, Color.Black, Color.Yellow);

      With this code, the alert window appears and it shows alert lines, the sound file also plays, but the sound is played almost at each bar, and not when it is required i.e. not when the arrow triangle is painted on the chart. The revised indicator file is attached.

      I tried with different audio files, different time frames.

      There is nothing significant on the log file. I have attached it with this post.

      I have attached a screen shot of the chart showing some information for you. The revised indicator file is also attached.

      I am just looking to have an audio sound alert only if the triangle appear on the screen.

      Requesting for help.

      Thank You






      Originally posted by NinjaTrader_Matthew View Post
      Hello,

      Can you please check your Log tab of the Control Center center for any errors that may be listed? If you go to File--> New--> Alerts do you see any alerts listed?


      I look forward to assisting you further.
      Attached Files

      Comment


        #4
        Originally posted by Nice Person View Post
        Matthew,

        Thank you very much for your assistance.

        I only want to have an audio alert as soon as the drawings are done by the indicator, which is based on the fractal conditions being met.

        I inserted a line for alert in the code.

        Alert("Alert1", NinjaTrader.Cbi.Priority.High, "Sample1", "Alert3.wav", 37, Color.Black, Color.Yellow);

        With this code, the alert window appears and it shows alert lines, the sound file also plays, but the sound is played almost at each bar, and not when it is required i.e. not when the arrow triangle is painted on the chart. The revised indicator file is attached.

        I tried with different audio files, different time frames.

        There is nothing significant on the log file. I have attached it with this post.

        I have attached a screen shot of the chart showing some information for you. The revised indicator file is also attached.

        I am just looking to have an audio sound alert only if the triangle appear on the screen.

        Requesting for help.

        Thank You

        I do not really want to try to decipher the secondary indicators that you are calling, and how they behave, so instead I will give you a top level view in pseudocode.

        if (ConditionsToDrawTriange == true)
        {
        DrawTriangel(...);
        PlaySound(...) ;
        //Do other stuff
        }

        The braces to create a code block are key.

        Just isolate the code that draws the triangle, and put it into a block with instructions to play the sound, either with PlaySound() or with Alert().

        Comment


          #5
          Adding Audio alert to zig zag

          Hello, i'm using the 'ZigZagUTC - another zig zag indicator' located in the download section and want to simply create an audio alert optoin to play (((PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert4.wav"))) whenever a new swing high or low is made (as evident by the zigzag dots). In this way I don't have to be looking at the charts all the time waiting for a swing high or low, but can turn on the sound to wait for the alert.

          Can anyone help? the indicator code is attached:

          Happy Holiday!
          Attached Files

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Tim-c, Today, 03:54 AM
          0 responses
          3 views
          0 likes
          Last Post Tim-c
          by Tim-c
           
          Started by FrancisMorro, Today, 03:24 AM
          0 responses
          2 views
          0 likes
          Last Post FrancisMorro  
          Started by Segwin, 05-07-2018, 02:15 PM
          10 responses
          1,771 views
          0 likes
          Last Post Leafcutter  
          Started by Rapine Heihei, 04-23-2024, 07:51 PM
          2 responses
          31 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by Shansen, 08-30-2019, 10:18 PM
          24 responses
          945 views
          0 likes
          Last Post spwizard  
          Working...
          X