• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I clear the alert window in code?

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

    How do I clear the alert window in code?

    Hi,

    When I load my indicator, I want to clear the alert window of all its contents, how do I do that?

    Thank you in advance.

    #2
    Hello KhaosTrader,

    Thank you for your post.

    There is no function in NinjaScript that is exposed to clear the alerts window in code. I will look into whether there is an undocumented means to perform this action from a NinjaScript object.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Thank you, looking forward to your findings.

      Comment


        #4
        Actually a better thing for me would be the ability to iterate through the entries of the AlertWindow, the goal would be to also be able to delete alerts that were older than 1 hour....

        Comment


          #5
          Hello KhaosTrader,

          Thank you for your response.

          Unfortunately, there would not be a means to clear the displayed alerts in the Alerts Log. I will forward this as a suggestion to development.
          Patrick H.NinjaTrader Customer Service

          Comment


            #6
            Hello KhaosTrader,

            Thank you for your patience.

            The request to remove alerts from the Alert Log in NinjaScript has been given the ID SFT-1643.
            Patrick H.NinjaTrader Customer Service

            Comment


              #7
              Hi,

              It would be better to be able to access the collection also.. This is because it might be handy to have your code delete the last X alerts or delete alerts older than X minutes, or delete all low priority alerts that are y minutes old.. etc...

              Comment


                #8
                Hello KhaosTrader,

                Access by time was added to the suggestion.
                Patrick H.NinjaTrader Customer Service

                Comment


                  #9
                  Actually, what I am saying, is also it would be good to be able to retrieve and iterate through the alerts such that you can delete particular alerts according to program logic, that would be most flexible..

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by darkgreen, Today, 03:35 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post darkgreen  
                  Started by GTBrooks, Today, 02:44 PM
                  2 responses
                  13 views
                  0 likes
                  Last Post GTBrooks  
                  Started by GLFX005, Today, 12:22 PM
                  4 responses
                  41 views
                  0 likes
                  Last Post NinjaTrader_Kate  
                  Started by AspenHiker, Today, 08:37 AM
                  1 response
                  13 views
                  0 likes
                  Last Post NinjaTrader_Kate  
                  Started by MartinT, Yesterday, 01:12 PM
                  3 responses
                  17 views
                  0 likes
                  Last Post MartinT
                  by MartinT
                   
                  Working...
                  X