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

Alerts Log not working for custom indicator

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

    Alerts Log not working for custom indicator

    In a NinjaScript indicator I have created an alert.
    The sound works fine at the close of each bar, but there is not at all an entry in the Alerts Log.

    Whats wrong?!

    My code:
    protected override void OnBarUpdate()
    {
    string mySound = NinjaTrader.Core.Globals.InstallDir+...s\Aler t4.wav";
    Alert("MyTest" + CurrentBar, Priority.Low, "test message", mySound, 0, Brushes.Black, Brushes.Yellow);
    }

    #2
    Hello Knoppers,

    Is the Alerts Log window open before running the script?

    Do you have a filter enabled on the Alerts Log window such as unchecking an Instrument Type, Priority, or Source ?

    Below is a publicly available link to the help guide on the Alerts Log window.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello ChelseaB,

      I have checked all conditions you mentioned (Alert Log window open all the time, no filters)...
      I've already read the help guide without any new information.

      As I've mentioned:
      - For my scripted alert the sound is ok, but no message in Alert Log window
      - For any alert from the chart (e.g. crossing price with SMA or break of manually drawn trendline) the alert (sound AND message) is working well

      Comment


        #4
        Hello Knoppers,

        If the sound is triggering and no other indicators with alerts are running (in any open workspaces), and if no Alerts are set on a chart with the Alerts window, this would indicate the alerts are triggering and the Alerts Log window is not receiving them.

        May I test your script on my end?

        If so, please export the script and attach the export with your next post.

        To export a NinjaTrader 8 NinjaScript do the following:
        1. Click Tools -> Export -> NinjaScript...
        2. Click the 'add' link -> check the box(es) for the script(s) you want to include
        3. Click the 'Export' button
        4. Enter a unique name for the file in the value for 'File name:'
        5. Choose a save location -> click Save
        6. Click OK to clear the export location message

        By default your exported file will be in the following location:
        • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>


        Below is a link to the help guide on Exporting NinjaScripts.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          If the sound is triggering and no other indicators with alerts are running (in any open workspaces), and if no Alerts are set on a chart with the Alerts window, this would indicate the alerts are triggering and the Alerts Log window is not receiving them.

          Hello Chelsea,

          Thanks for your response. This seems to be the case.
          Enclosed please find my TestIndicator. It's without any real logic, just to demonstrate alerting functionality...
          Attached Files

          Comment


            #6
            Hello Knoppers,

            Thank you for the test script.

            The Alert in the test script has the re-arm seconds set to 0 but uses a different tag name for each alert. This means this will Alert only one time per bar.

            Are you expecting multiple alerts per bar?

            I am able to show the alerst this script will make in real-time. Below is a link to a short video that demonstrates testing the script you have provided on a 10 Second ES chart.


            What instrument are you testing this script on?

            May I have screenshots showing the Alerts Log window Instrument Type, Priority, and Source menus?

            If you use the Alerts window to trigger an alert does the alert appear in the Alerts Log window?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello Chelsea,

              For the beginning it would be perfect if the alert would be shown in the Alert Log once per bar in any instrument. I've tested with NQ, ES, CL - without success..
              With NT7 I had not that issues in scripting Alerts... Don't know why there are those issues now..

              Please have a look to the screencast I've created in a 10sec NQ-chart.
              Non-scripted alerts are doing well for all instruments.

              video: https://drive.google.com/open?id=1MW...ib2wvxcZDLQHxl

              Comment


                #8
                Hello Knoppers,

                Thank you for confirming this.

                Please send an email to platformsupport [at] ninjatrader [dot] com so that we may schedule a call to test this on your end.
                In the email, please include a link to this forum thread.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by cls71, Today, 04:45 AM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by TradeForge, Today, 02:09 AM
                1 response
                22 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by elirion, Today, 01:36 AM
                2 responses
                13 views
                0 likes
                Last Post elirion
                by elirion
                 
                Started by DJ888, 04-16-2024, 06:09 PM
                5 responses
                14 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by samish18, Yesterday, 08:31 AM
                4 responses
                14 views
                0 likes
                Last Post elirion
                by elirion
                 
                Working...
                X