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

Listen for Alerts in Ninjascript

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

    Listen for Alerts in Ninjascript

    Is there a way to listen for or otherwise capture all alerts generated by the various active indictors? I would like to parse the string in my script in order to make a decision about opening a new script generated trade.
    Something like a getAlert() method? Similar to a method that would get the last error.

    #2
    vlc, unfortunately this is not supported.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Does "not supported" mean not possible?
      I think this would make many black-box indicators much more useful for creating new scripts.

      Maybe this can be added to a wish-list please. Can users vote for a feature?

      Comment


        #4
        Not supported doesn't necessarily mean it isn't possible although I'm not sure how you would go about "intercepting" alerts. I will forward your suggestion.
        AustinNinjaTrader Customer Service

        Comment


          #5
          vlc,

          If the black box indicator changes the color of the price bar, you can read the color using BarColor from a custom indicator. This is how I get around some black box limitations for my clients
          mrlogik
          NinjaTrader Ecosystem Vendor - Purelogik Trading

          Comment


            #6
            I attach to the Log event handler.
            Your alerts should go through the log.
            In certain situations like log messages for connection lost and order rejected I let me software send me an sms.

            All unsupported, but very doable.

            regards

            www.zweisteintrading.eu

            Comment


              #7
              Thanks, I was really hoping this would have worked. But the messages I'm trying to capture are not from my own indicators and unfortunately the messages in the Alerts window are not in the normal NT7 log. Maybe there is another log somewhere or a setting to show all messages?

              Comment


                #8
                So just hook to the alerts window....

                also undocumented and doeable
                andreas

                Comment


                  #9
                  OK... only prob then is the log event handler which you meant to attach isn't actually attached. Please try attaching again and I'll definitely try to get it working with the Alerts window.

                  Comment


                    #10
                    Hmm... I didn't expect to get that info too... thanks. That will also be helpful for this. I really hope I can get all this to actually work.

                    Comment


                      #11
                      At first glance I see NinjaTrader.Globals.Alerts

                      This should get you going


                      regards

                      www.zweisteintrading.eu

                      Comment


                        #12
                        Thanks. I'm very new to trying to code anything in NT. So please bare with me. How did you find that method?

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by cre8able, Today, 03:20 PM
                        0 responses
                        5 views
                        0 likes
                        Last Post cre8able  
                        Started by Fran888, 02-16-2024, 10:48 AM
                        3 responses
                        47 views
                        0 likes
                        Last Post Sam2515
                        by Sam2515
                         
                        Started by martin70, 03-24-2023, 04:58 AM
                        15 responses
                        114 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by The_Sec, Today, 02:29 PM
                        1 response
                        7 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by jeronymite, 04-12-2024, 04:26 PM
                        2 responses
                        31 views
                        0 likes
                        Last Post NinjaTrader_BrandonH  
                        Working...
                        X