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

Issues wwhen using my custom indicator with Market Analyzer

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

    Issues wwhen using my custom indicator with Market Analyzer

    I am using my custom indicator and Market Analyzer to screen a large number of stocks and ETFs. The included securities are just a bulk list that includes such things as ones that trade infrequently. I am counting on them getting filtered out by my criteria in MA. Looking at my results, I have noticed a few strange things about how MA works.

    1) I have an indicator set for "# of bars to look back" = 50. Unfortunately, that does not necessarily look back 50 bars. Instead, it appears to look back 50 market trading days which, in the case of this security (ADZ), is only 4 bars. IMHO that is inconsistent behavior -- I should be getting the last 50 bars the chart has.

    (There is a whole philosophical question of what to do with zero-volume days when charting ... I believe that skipping them is absolutely wrong ... the date/time axis is supposed to be linear and it is not linear when it fails to include space for days when the market was open but no trades took place. If that were true, then my indicator should be seeing 50 bars, mostly with zero volume. But that is a whole separate discussion.)

    2) Since there is so little data, and since my indicator is an averaging indicator, my indicator reports no values at all -- not enough bars to average. Kind of like indicators that show no values at the left end of a chart until there are enough bars for them to calculate the indicator. I would expect Market Analyzer to leave the entry blank, since no value was given by the indicator. No such luck -- what MA actually does is to fill in the last bar's closing price. Sounds like a bug to me!

    3) I have another column showing the average dollar volume. It is also showing the closing price for ADZ (not enough bars to average the volume, so none reported). I have a Filter Condition on that column: Hide row if value is less than 5,000,000. The row is not getting hidden in spite of the fact that MA is showing a value of 22.68 for the row. Sounds like another bug to me! (MA will sort on this value, just not filter on it.)

    So what filter can I set to hide the row?

    Edit: I am still examining some filter anomalies ... more later ...

    --EV
    Last edited by ETFVoyageur; 02-05-2014, 11:27 AM.

    #2
    Hello ETFVoyageur,

    1. While the Market Analyzer window can process things differently than the chart, doing a quick test on my end I do get consistent behavior on my chart if I change the Data Series to "Load data based on" Bars, and the Bars to Load to "50".

    2. This is expected behavior if there is not a valid plot or a null value is referenced so NT. If you want to set the value to "0" or something you may add a check inside of your Indicator to make sure that your plot contains a value.


    3. Can you make sure that the "Row Filter" is enabled for your MA window by right clicking inside of the MA and ensure the "Row Filter" is checked?
    JCNinjaTrader Customer Service

    Comment


      #3
      1) My comment is that the configuration label says "# of bars" and that is not how many bars get used. I asked for 50 bars and only got 4 bars. The comment applies, even if the same comment could be made elsewhere.

      2) The issue of making the date/time axis non-linear is a separate issue ... let's not make it part of this thread.

      3) Expected behavior -- how, then, do I cause a cell to be blank? I thought that reporting no value would do that.

      --EV

      Comment


        #4
        Hello ETFVoyageur,

        1. Let me rephrase, using "# of bars to look back" should be the same on a chart as you would see inside of the Market Analyzer window, but if there is data too far spaced out NinjaTrader will stop looking for data since there is a possibility that there is no more data. NinjaTrader will start in the current day and look backwards. If it does not find any data for about a month then NinjaTrader will stop looking for more data.

        You may want to either use a custom time frame or Number of days to load for more data.

        As for your comment, NinjaTrader 7 does require data to know when a bar starts and stops but I will be sure to forward this on to our Development team for future consider for NinjaTrader.

        3. You may want to have your Indicator set the value of the Plot to 0 if you do not have enough data for your calculations and then you may create a cell condition to where if the value is 0 then you can enter a space in the text file to leave it blank for this.

        Happy to be of further assistance.
        JCNinjaTrader Customer Service

        Comment


          #5
          We are talking past each other here. A very simple point is becoming needlessly complex. Let's just drop it.

          --EV

          Comment


            #6
            Hello EV,

            I believe we are on a similar track but the direction may not be the same. If I am misunderstanding anything I would be happy work through it with you.

            Most of what you are looking for is possible but would require some customization for it to display is all.
            JCNinjaTrader Customer Service

            Comment


              #7
              ETFVoyageur:

              Are you happy with MA now? I try to do the same as you did. It would be really appreciated if you could share your experience of MA.

              Thanks.

              ccl3093

              Comment


                #8
                Originally posted by ccl3093 View Post
                ETFVoyageur:

                Are you happy with MA now? I try to do the same as you did. It would be really appreciated if you could share your experience of MA.

                Thanks.

                ccl3093
                The bottom line is that I like the Market Analyzer a lot, and it is valuable for me. That said, there are a few things it needs to improve. Realize that I am using quite large Market Analyzers, and that affects my thoughts a lot. Here are some points, in no particular order. These comments combine points from more than one thread.

                *) Ninja Trader, like some other platforms, fails to understand and consistently handle the difference between the number of trading intervals that have occurred (and therefore the maximum possible number of bars in an interval) and the number of bars that actually occurred. They are the same for sufficiently active securities, but not for others. They match for most securities on a day or longer basis, except ones that are either very thin or else have stopped trading. The difference becomes more apparent with something like 1-minute bars -- lots of quite active securities do not have a trade each and every minute. What brought this up in the Market Analyzer context is that the configuration item "# of bars to look back" is at best misleading (IMHO) -- it refers to the number of market intervals, not the number of bars of the security. The simplest fix would to ensure that what the item does is unambiguous. The concept is also a problem for charting -- by ignoring non-trade bars NT makes the date/time axis non-linear, which violates the mathematical basis for things like indicators and trend lines.

                *) I would like to see Market Analyzer show a blank cell when an indicator produces no value, as Market Analyzer already does when there are no bars to call the indicator with. I fail to see the logic for filling in the cell with the closing price of the last bar instead, as it does now. That makes no sense at all to me, and no one has even tried to explain it -- just to acknowledge that is the current design behavior.

                *) Market Analyzer needs to be able to filter on blank cells. It cannot depend on an indicator filling in a bogus value, and then filtering on that, because blank cells arise when the indicator is not even called.

                *) I would like to be able to control the number of decimal places shown in a column -- that's a cosmetic, nice-to-have request, not a functionally crucial one.

                *) Market Analyzer needs multi-column sort.

                *) Market Analyzer needs the ability to sort a selected set of rows (only)

                *) Market Analyzer needs to refrain from reloading and re-calculating when all that is changed is a column's filter criterion. It already does that when you check and uncheck the context menu item "Row Filter". Changing a column filter should do the same thing -- hide or unhide rows, and then resort as needed. The reason I care is that the ability to easily change a filter and immediately see the results would be quite valuable. As is, you can do it, but for a large Market Analyzer grid it can take tens of minutes to see the result. That's the difference between batch processing and on-line real-time processing.

                ------

                I hope that answers your request. I am happy that Market Analyzer is as powerful as it is. OTOH I do notice that there are some serious lacks. The one that hurts me the most functionally is the inablility to change a column's filter criteria without forcing a reload / recalculate. The inhibits reasonable exploration of "what if" scenarios.

                --EV
                Last edited by ETFVoyageur; 02-07-2014, 05:14 PM.

                Comment


                  #9
                  ETFVoyageur:
                  Thank you so much for a such prompt reply. I will digest those items in your reply one by one which might take me several days even longer. Before I dive into MA, I have couple concerns:
                  1). I like to add 100 symbols including stocks and ETF on ONE MA and trade them use a complex custom strategy. Will I have performance issue on barinterval = 5m, or longer?
                  2). Can I run four of MA above at same time? I see you compliant performance and memory usage before.

                  Your time and help were greatly appreciated!

                  ccl3093

                  Comment


                    #10
                    Originally posted by ccl3093 View Post
                    ETFVoyageur:
                    Thank you so much for a such prompt reply. I will digest those items in your reply one by one which might take me several days even longer. Before I dive into MA, I have couple concerns:
                    1). I like to add 100 symbols including stocks and ETF on ONE MA and trade them use a complex custom strategy. Will I have performance issue on barinterval = 5m, or longer?
                    2). Can I run four of MA above at same time? I see you compliant performance and memory usage before.

                    Your time and help were greatly appreciated!

                    ccl3093
                    I'm not the one to answer your performance questions ... perhaps one of the moderators?

                    As to memory use ... I solved that as mentioned in some messages here. Memory use is no longer a problem for me. (I used LinRegSLope heavily, so I provided my own version of that function.)

                    --EV

                    Comment


                      #11
                      EV,

                      I used TS for years, and not very happy so that I am looking other platform. I will try MA first.

                      Thank you very much again.

                      ccl3093

                      Comment


                        #12
                        Hello ccl3093,

                        As for your question about the bar interval being 5 Minute or greater having an impact on performance would not be very different than having a 1 Minute interval with the default settings.

                        Performance is mainly going to be due to how many calculations that your Indicator is doing and how much data is loaded up. If you are only loading up 50 bars worth of data it should not make that much of a performance different from a 1 Minute or 5 Minute standpoint.

                        ETFVoyageur,

                        Thank you for your detailed descriptions. I will forward this to our development team for consideration on the next major release of NinjaTrader.

                        Happy to be of further assistance.
                        JCNinjaTrader Customer Service

                        Comment


                          #13
                          Thank very much EV an JC for your detailed responses.

                          ccl3093

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by nleitman, Yesterday, 11:46 AM
                          13 responses
                          33 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by MSerag, Yesterday, 11:52 PM
                          3 responses
                          23 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by dcriador, Yesterday, 01:43 AM
                          6 responses
                          27 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by James650, Today, 08:25 AM
                          1 response
                          2 views
                          0 likes
                          Last Post NinjaTrader_ChristopherJ  
                          Started by Rogers101, 05-05-2024, 11:30 AM
                          14 responses
                          40 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Working...
                          X