Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyzer & Series<double>

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

    Market Analyzer & Series<double>

    With NinjaTrader 7 both the Strategy Builder and the Market Analyzer were capable of accessing public DataSeries as plots.

    I had used this feature for over 50 indicators for allowing users to access the current trend (up, down or neutral) via a public DataSeries. Depending on the value of the trend, users were able to define visual and sound alerts via the market analyzer when there was a trend change.

    For NinjaTrader 8 the public Series<double> is also shown in the market analyzer. However the values are not displayed in the market analyzer column. All fields remain empty.

    This was a really important feature of NinjaTrader 7 which seems to have disappeared. The market analyzer can no more be used to indicate trend changes!

    Why has this feature been abandonded?

    Or is this simply a bug?
    Last edited by Harry; 08-11-2017, 03:45 PM.

    #2
    Hello Harry,

    To have the value of a data series be displayed in a MA window you should set that data series equal to a plot. Reference the SMA indicator for an example.

    In NT8, in order to expose values to the market analyzer without setting a plot, you have to create a custom MA column to access your indicator values. See the attached example.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlanP View Post
      Hello Harry,

      In NT8, in order to expose values to the market analyzer without setting a plot, you have to create a custom MA column to access your indicator values. See the attached example.
      Hello Alan,

      This is exactly what I have done.

      Your sample does not return any values when applied to the Market Analyzer.

      See screenshot below.
      Attached Files

      Comment


        #4
        Hello Harry,

        You are adding the indicator to the MA window via Columns>Indicator>aNT8ExposePlot. You should instead, Column>ExposedPlotMA.

        Please see the attached screen shot. Blue is what you are doing, Red is what you should be doing.

        Please let us know if you need further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_AlanP View Post
          Hello Harry,

          You are adding the indicator to the MA window via Columns>Indicator>aNT8ExposePlot. You should instead, Column>ExposedPlotMA.

          Please see the attached screen shot. Blue is what you are doing, Red is what you should be doing.

          Please let us know if you need further assistance.
          Alan,

          Thank you for your answer.

          I would love to use Column>ExplosedPlotMA, but I am running NT 8.0.8.0 64-bit, and I was unable to locate that feature.

          Please see screenshot attached.
          Attached Files

          Comment


            #6
            Hello Harry,

            Did you import the .zip file I provided in the second post of this thread?

            I look forward to your reply.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_AlanP View Post
              Hello Harry,

              Did you import the .zip file I provided in the second post of this thread?

              I look forward to your reply.

              No I hadn't imported the entire file, just the indicator.

              However, this solution creates a problem. Complex indicators typically have about 10 to 20 exposed data series objects (now called Series <double> that can be accessed via a strategy. So far with NinjaTrader 7 it was possible to access all of these plots by adding the indicator via the Market Analyzer.

              With the new solution you need to add an exposed plot for each public Series<double> to the market analyzer column selection.

              That will make up for quite a number of additional columns in the drop down menu.
              Last edited by Harry; 08-15-2017, 03:11 AM.

              Comment


                #8
                Alan,

                Thank you again for your help.

                I have now understood how this works.

                It seems to be necessary to code a MarketAnalyzerColumn object for each exposed Series <double> of each indicator.

                As a result, there will be hundreds of new columns appearing in the dropdown menu of the market analyzer!

                The solution adopted for NinjaTrader 7 was much easier.

                For NinjaTrader 8 the exposed series <double> object still appears in the indicator column, but can no longer be used.

                Why was this changed at all?

                Comment


                  #9
                  Error messages and Freeze

                  Error message

                  When using your sample column with real-time data on the market analyzer I am getting an error message for each instrument added:

                  2017-08-14 19:45:38:554 ERROR: Failed to call 'Add' method: System.Threading.LockRecursionException: Write lock may not be acquired with read lock held. This pattern is prone to deadlocks. Please ensure that read locks are released before taking a write lock. If an upgrade is necessary, use an upgrade lock in place of the read lock. at System.Threading.ReaderWriterLockSlim.TryEnterWrit eLockCore(TimeoutTracker timeout) at System.Threading.ReaderWriterLockSlim.TryEnterWrit eLock(TimeoutTracker timeout) at NinjaTrader.Data.BarsSeries.Add(Bars bars, Double open, Double high, Double low, Double close, DateTime time, Int64 volume, Double tickSize, Boolean isBar, Double bid, Double ask)
                  NT8 Freeze (reproducible)

                  When trying to remove a row (one instrument) from the market analyzer while being connected NinjaTrader crashes (total freeze) and needs to be closed via the Windows task manager.

                  Comment


                    #10
                    Alan,

                    I confirm that both error message and NinjaTrader freeze can be attributed to your sample from post #2.

                    Without this column being selected, the market analyzer does not crash, but is stable, when a row is removed.

                    Comment


                      #11
                      Hello Harry,

                      I was able to reproduce and will follow up with you when I have more information.

                      Thank you for your patience.
                      Alan P.NinjaTrader Customer Service

                      Comment


                        #12
                        Hello Harry,

                        I wanted to let you know we are still working on this and I will follow up when I have a solution.

                        Thank you for your patience.
                        Alan P.NinjaTrader Customer Service

                        Comment


                          #13
                          Hello Harry,

                          Thank you for your patience.

                          This has been resolved in the next version of NinjaTrader, V8R9. The tag associated with the issue is, 12054.

                          Please let us know if you still have an issue when this version is released.
                          Alan P.NinjaTrader Customer Service

                          Comment


                            #14
                            Thank you for the feedback!

                            Comment


                              #15
                              Custom market analyzer columns not working

                              So far the custom market analyzer columns that I have coded are working without problems. However, I am currently running into issues with a complex multi-timeframe indicator.Testing the same code with a simple multi-timeframe indicator has shown no problems. This points to an internal synchronization problem.

                              Debugging market analyzer column and indicator has shown that when calling the indicator plot after a market data update event

                              Code:
                              if (marketDataUpdate.MarketDataType == MarketDataType.Last)
                              {      
                                     CurrentValue = myIndicator.ExposedSeries[0];
                              }
                              OnBarUpdate() is not being triggered. This odd behavior is only shown by a complex multi-timeframe indicator, but not by any of the standard indicators or simple multi-timeframe indicators.

                              My first question: Why is OnBarUpdate() not executed here, after the exposed Series<double> property of the indicator has been called within the market analyzer column?

                              As a fix I have modified the indicator code and forced OnBarUpdate() in the property

                              Code:
                              [Browsable(false)]
                              [XmlIgnore]
                              public Series<double> ExposedSeries
                              {
                                  get { Update(); return exposedSeries; }
                              }
                              After adding Update() in the indicator property the market analyzer column works as expected.

                              My second question: Under which circumstances would you suggest to include Update() with the getter in order to access the exposed property. Would this be necessary for all properties that shall be accessed by an external script?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by kujista, Today, 05:44 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post kujista
                              by kujista
                               
                              Started by ZenCortexCLICK, Today, 04:58 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post ZenCortexCLICK  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              172 responses
                              2,281 views
                              0 likes
                              Last Post sidlercom80  
                              Started by Irukandji, Yesterday, 02:53 AM
                              2 responses
                              18 views
                              0 likes
                              Last Post Irukandji  
                              Started by adeelshahzad, Today, 03:54 AM
                              0 responses
                              8 views
                              0 likes
                              Last Post adeelshahzad  
                              Working...
                              X