Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator alert not firing?

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

    Indicator alert not firing?

    hi all,

    I have an indicator that fires an alert under some condition. When I run it with market analyzer, I don't see the alert anywhere.

    I did the following to verify:

    Added a list of stocks to MA.
    Added a column with my indicator
    Put a breakpoint on the alert call in the indicator
    Refreshed MA grid (F5)

    In the code, I can see that the alert command is reached but I don't see alerts anywhere. I thought an alert would come up in the alerts window or it would make a sound or something. This is the first time I am trying this; as you can see, I have no idea what to expect

    Any ideas if I am missing something?

    Onn

    #2
    That is totally opposite this post ..





    Originally posted by onnb1 View Post
    hi all,

    I have an indicator that fires an alert under some condition. When I run it with market analyzer, I don't see the alert anywhere.

    I did the following to verify:

    Added a list of stocks to MA.
    Added a column with my indicator
    Put a breakpoint on the alert call in the indicator
    Refreshed MA grid (F5)

    In the code, I can see that the alert command is reached but I don't see alerts anywhere. I thought an alert would come up in the alerts window or it would make a sound or something. This is the first time I am trying this; as you can see, I have no idea what to expect

    Any ideas if I am missing something?

    Onn

    Comment


      #3
      , they look actually quite similar. When I have the indicator on a chart, I am getting alerts just fine. From MA nothing.

      Onn

      Comment


        #4
        Hi Onnb1,

        Thank you for posting.

        To assist you further can you answer the following questions

        Do you receive any errors when running these indicators? Check the Log Tab in the Control Center. Additionally, open up an Output Window and see if any other errors appear. Tools>Output Window.

        Are you able to run these indicators in the chart and get the Alerts?

        Could you provide a sample piece of the Alert code that you have?

        I would recommend using the Print() function to see if the alert code is being reached in the code and working.
        See the link below on the Print() -
        http://www.ninjatrader.com/support/h...html?print.htm

        I look forward to assisting you further.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by onnb1 View Post
          , they look actually quite similar. When I have the indicator on a chart, I am getting alerts just fine. From MA nothing.

          Onn
          Indicator alerts do not fire in MarketAnalyzer. MarketAnalyzer alerts are set in MarketAnalyzer.

          Comment


            #6
            Originally posted by NinjaTrader_Cal View Post
            Hi Onnb1,

            Thank you for posting.

            To assist you further can you answer the following questions

            Do you receive any errors when running these indicators? Check the Log Tab in the Control Center. Additionally, open up an Output Window and see if any other errors appear. Tools>Output Window.

            Are you able to run these indicators in the chart and get the Alerts?

            Could you provide a sample piece of the Alert code that you have?

            I would recommend using the Print() function to see if the alert code is being reached in the code and working.
            See the link below on the Print() -


            I look forward to assisting you further.
            thanks for following up.

            No errors in the log tab. Getting alerts fine on the chart. The alert code is running. I set a break point in the debugger and the code is being called.

            It looks like the alerts are firing fine when using intrady time frame bars with MA. The problem I have is with the daily bars.Let me step back and tell you what I need and what I am doing. Perhaps my approach is wrong and there are better ways of doing this.

            What I need is to use MA after the market close (RTH) for scanning a group of stocks on the daily bars. So say at 5pm East I want to be able to get a list of symbols that meet the indicator signals. I am using MA with alerts to achieve this. If there are other ways to accomplish this with NT that are better please let me know.

            I have the inidcator running in MA on daily bars with calculate on bar close set to true. When I hit f5 at the end of the day, I am expecting to have an alert as the bar is closed.

            I am guessing that was is happening is that the daily bar is only considered closed when the next days bar is created (on the first tick of a new bar). So for equities, that would be the next morning when the market opens. Does that make sense?

            Comment


              #7
              Hi Onnb1,

              If I'm following you correctly you want to fire an alert when the daily bar closes.

              If so, you can use this condition as a starting point -
              Code:
              if(Bars.SessionBreak == true);
              {
              // Fire alert
              }
              This tests if the session has closed or hit its break and would fire an alert based of if that is true or not.

              Also, the reason your are not getting an alert when you fire is cause the Alert() only works in real time not historical data. So, if you are reloading after the day has ended it won't fire the alert.

              Please let me know if I can be of further assistance.
              Cal H.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Cal View Post
                If I'm following you correctly you want to fire an alert when the daily bar closes.
                yes, kind of. I also want the user to be able to run a scan and get alerted during off hours (see below).

                Originally posted by NinjaTrader_Cal View Post
                Also, the reason your are not getting an alert when you fire is cause the Alert() only works in real time not historical data. So, if you are reloading after the day has ended it won't fire the alert.
                So, if I understand, the alert will fire if the market analyzer is open/running at the moment the market closes. If I f5 an hour later, the alert won't fire because we are now downloading historical data - right?

                Onn

                Comment


                  #9
                  Onnb1,

                  It is possible to code an indicator to scan multiple stocks, However this can be very difficult and potentially frustrating.

                  You can use the Market Analyzer in the way you are looking to do. You would just add the stocks you want to scan and add an indicator column with your alert indicator.

                  So, if I understand, the alert will fire if the market analyzer is open/running at the moment the market closes. If I F5 an hour later, the alert won't fire because we are now downloading historical data - right?
                  Correct, you would be loading historical data at that point and the alert would not fire.

                  Please let me know if I can be of further assistance
                  Cal H.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_Cal View Post
                    Onnb1,
                    You can use the Market Analyzer in the way you are looking to do. You would just add the stocks you want to scan and add an indicator column with your alert indicator.
                    if I went a different direction still using the MA but not with alerts. Say I will have calc on bar close set to false and I just output from the indicator to the MA column a value of whether it meets the criteria on the last bar on the chart. I am guessing that will "always" work and will present whatever I tell it to regardless of historical/real time - right?

                    So if I were to refresh that column after market hours, I would effectively be getting the last days state/signals - right?

                    Finally, in terms of column outputs, from my indicator, can I output text into the MA columns? Can I control the coloring of the cell from an indicator?

                    Onn

                    Comment


                      #11
                      Originally posted by onnb1 View Post
                      if I went a different direction still using the MA but not with alerts. Say I will have calc on bar close set to false and I just output from the indicator to the MA column a value of whether it meets the criteria on the last bar on the chart. I am guessing that will "always" work and will present whatever I tell it to regardless of historical/real time - right?

                      So if I were to refresh that column after market hours, I would effectively be getting the last days state/signals - right?
                      I don't want to use the word "always" as there could be logic issues with the script that could arise but yes setting COBC = false would allow you to get the most recent indicator value after hours without having to wait for the next bar's open.


                      Finally, in terms of column outputs, from my indicator, can I output text into the MA columns? Can I control the coloring of the cell from an indicator?

                      Onn
                      You won't be able to do this from the indicator itself. You would need to create a cell condition that updated the display accordingly
                      LanceNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by rajendrasubedi2023, Today, 09:50 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post rajendrasubedi2023  
                      Started by ender_wiggum, Today, 09:50 AM
                      0 responses
                      2 views
                      0 likes
                      Last Post ender_wiggum  
                      Started by bmartz, Today, 09:30 AM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Erick  
                      Started by geddyisodin, Today, 05:20 AM
                      3 responses
                      23 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by lorem, Today, 09:18 AM
                      1 response
                      5 views
                      0 likes
                      Last Post lorem
                      by lorem
                       
                      Working...
                      X