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

Alert firing delays

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

    Alert firing delays

    On my 1 min chart with update on bar close, my alert triangles plot correctly and tonite I added the alert script to add sound and the alert window.
    The alerts fire if any of 4 crossovers occur.
    Here is the alert window:

    Instrument TimeMessage
    6E 12-09 8:35:51 PM TriangleUp 25
    6E 12-09 8:28:03 PM TriangleDown 25
    6E 12-09 8:10:17 PM TriangleDown 20
    6E 12-09 8:06:00 PM TriangleDown 25
    Why dont they consistently fire just after the new minute begins?

    #2
    It could be those were slow trading times for the 6E and you did not receive ticks for a new bar to form until for example the 8:35:51 timestamp you see.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      It could be those were slow trading times for the 6E and you did not receive ticks for a new bar to form until for example the 8:35:51 timestamp you see.
      Thanks.
      How do I add the closing price that sent the alert to be in the alert window after the time?

      Alert("myAlert", NinjaTrader.Cbi.Priority.High, "TriangleUp 20","Close "+ Close[0], 0, "Alert1.wav", 10, Color.Black, Color.Yellow);

      I tried adding this--"Close "+ Close[0], 0,--which I adapted from something I found in the user forum, but it got an error about 9 arguments.

      Comment


        #4
        You can only have 7 parameters, not 9 for Alert().

        Alert("myAlert", NinjaTrader.Cbi.Priority.High, "TriangleUp 20 Close "+ Close[0], "Alert1.wav", 10, Color.Black, Color.Yellow);
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          You can only have 7 parameters, not 9 for Alert().

          Alert("myAlert", NinjaTrader.Cbi.Priority.High, "TriangleUp 20 Close "+ Close[0], "Alert1.wav", 10, Color.Black, Color.Yellow);
          can i replace Priority.High with the Close[0] ?

          Comment


            #6
            No, you have to have a priority there as the parameter.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              No, you have to have a priority there as the parameter.
              is there a way to make the font size smaller on one version of the script so at a glance on the alert window i can tell which timeframe alerted?
              What does the ,10, after the wav signify?

              if (CrossAbove(DiPlus, 20, 1)&& DiPlus[0]>=DiMinus[0])
              DrawTriangleUp(
              "di+20 up" + CurrentBar, false, 0, Low[0]- (TickSize*dist), Color.Lime);
              if (CrossAbove(DiPlus, 20, 1)&& DiPlus[0]>=DiMinus[0])
              Alert(
              "myAlert", NinjaTrader.Cbi.Priority.High, "TriangleUp 20", "Alert1.wav", 10, Color.Black, Color.Yellow);

              Comment


                #8
                Unfortunately you can't change the font within the Alert() overload, the 10 is your rearm setting, how long the alert is idle before getting 'rearmed' to fire again if the condition is still 'true'.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Josh View Post
                  No, you have to have a priority there as the parameter.
                  OK, so what can I switch out and replace with the alert bar closing price?

                  Can I get it to say 'Short 1.4856' instead of 'triangle down' ?
                  (1.4856 being the alert bar close),
                  and can they change that in a later version--i think the alerting close is more useful than priority. If its not a strong priority, why alert?
                  Last edited by simpletrades; 11-12-2009, 10:20 AM.

                  Comment


                    #10
                    simpletrades, for example this sample code below would show you the close price in the alert box then -

                    Code:
                     
                    if (Close[0] > Close[1])
                    Alert("Up", Priority.Medium, "Up with Close value" + " " + Close[0].ToString(), "Alert1.wav", 10, Color.Black, Color.Blue);
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Bertrand View Post
                      simpletrades, for example this sample code below would show you the close price in the alert box then -

                      Code:
                       
                      if (Close[0] > Close[1])
                      Alert("Up", Priority.Medium, "Up with Close value" + " " + Close[0].ToString(), "Alert1.wav", 10, Color.Black, Color.Blue);
                      thanks, i'll try it.
                      but really, why is priority level a required piece. it seems wasted space.

                      Comment


                        #12
                        It's more important if you have multiple alerts being issued, to devise proper priorities.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_Bertrand View Post
                          It's more important if you have multiple alerts being issued, to devise proper priorities.
                          my 1 min bar closed at 11:00am and alerted in the window and sounded and the bar got a triangle.
                          My tick chart bar closed 11:00:07 and only got the triangle, but both are priority High. I can see how 2 different .wav sounds cant play at once, but why no alert window print?

                          Comment


                            #14
                            Please try using 2 different alert Id's in your codes for those indicators.
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_Bertrand View Post
                              Please try using 2 different alert Id's in your codes for those indicators.
                              Alert ID is what part? the"Down" ?

                              Alert("Down", NinjaTrader.Cbi.Priority.High, "Short Closed" + " " + Close[0].ToString()+" GMMA", "Alert1.wav", 10, Color.Black, Color.Yellow);

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by GussJ, 03-04-2020, 03:11 PM
                              11 responses
                              3,229 views
                              0 likes
                              Last Post xiinteractive  
                              Started by andrewtrades, Today, 04:57 PM
                              1 response
                              13 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by chbruno, Today, 04:10 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post chbruno
                              by chbruno
                               
                              Started by josh18955, 03-25-2023, 11:16 AM
                              6 responses
                              440 views
                              0 likes
                              Last Post Delerium  
                              Started by FAQtrader, Today, 03:35 PM
                              0 responses
                              12 views
                              0 likes
                              Last Post FAQtrader  
                              Working...
                              X