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

Expose Indicator Series for Market Analyzer

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

    Expose Indicator Series for Market Analyzer

    Hi,

    In NT7 I was able to expose a DataSeries for the Market Analyzer like a plot, but without actually having it as a plot. This was useful if you wanted to get some signal / data to the Market Analyzer without having it plot on the indicator. The way I did it in NT7 was as follows

    Code:
            [Browsable(false)]    
            [XmlIgnore()]             
            public DataSeries ExtrnTrend
            {
                get 
                {
                    Update();
                    return sExtrnTrend;
                }
            }
    Where the DataSeries to expose is sExtrnTrend.

    In NT8 the code is essentially the same, replacing DataSeries with Series<type>. Doing this I am unable to get any value other than "..." in the Market Analyzer.

    So my question is, how can I safely expose a Series in NT8 to be used in the Market Analyzer without having it as a Plot in the indicator?

    Thank you in advance
    mrlogik
    NinjaTrader Ecosystem Vendor - Purelogik Trading

    #2
    Hello Mrlogik,

    Thank you for your note.

    To expose a DataSeries for the Market Analyzer in NT8, you should set the series equal to a plot. The plot would then be available to select when applying the indicator to a market analyzer window.

    Please see the SMA, MACD or the attached indicator for an example of how to do this.

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

    Comment


      #3
      Hi Alan,

      Thanks for your reply. What you're proposing is the typical method of having data that is accessible via the Market Analyzer and works without question. What I need is different, I do not want a plot, I want to simply expose the Series without a plot. The reason this is important is because if you're plot scale is something between 0 and some small decimal (lets say .001), and you want to set a trend to be something like 1 for up, and -1 for down, you will destroy the scale.

      Additionally, as a vendor if you start having additional plots that aren't really meant as plots, it confuses people.

      How do I expose a Series to the Market Analyzer without creating a plot? I was able to do this in NT7 through the method I described in my prior post. Is there a way to do this in NT8 along those same lines? I can send you a simple example in NT7 so you can see what I'm referring to if you'd like.
      mrlogik
      NinjaTrader Ecosystem Vendor - Purelogik Trading

      Comment


        #4
        Hello Mrlogik,

        The recommended way for achieving this in NT8 would be using a custom MA column to access your indicator values / exposed states.

        After importing the attached .zip file, on the market analyzer window, right click>Columns and then select ExposedPlotMA.

        Having a more direct approach like in NT7 is a feature request being tracked with the ID SFT-891.

        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
          The recommended way for achieving this in NT8 would be using a custom MA column to access your indicator values / exposed states. Please let us know if you need further assistance.
          While this approach of exposing a series does work if your editing the code directly in Market Analyzer or Strategy..

          I'm finding that the strategy builder is not seeing these exposed values..

          Would this be expected?


          -=Edge=-
          NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

          Comment


            #6
            Hello -=Edge=-,

            It would be possible to find these exposed series via the builder and I would suggest looking at the MACD indicator, preloaded on Ninja, for how to set up your indicator so you can access the exposed values in the builder.

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

            Comment


              #7
              Originally posted by NinjaTrader_AlanP View Post
              It would be possible to find these exposed series via the builder and I would suggest looking at the MACD indicator, preloaded on Ninja, for how to set up your indicator so you can access the exposed values in the builder.
              Yes, I understand that.. I posted in this thread, because the original question was exposing values without using a plot..

              I was trying to point out, your example in post #4 work fine for this, if your working directly in code (MA or Strat)..

              But your not able to use those values from the strategy builder..

              Is this expected? and if so, Is using plots the "Only" way to see exposed values in strat builder? (I truly hope this is not the case!)



              -=Edge=-
              NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

              Comment


                #8
                Hello -=Edge=-,

                Yes, your indicator would need to set a plot for that value to be accessible via a strategy built via the builder.

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

                Comment


                  #9
                  Originally posted by mrlogik View Post
                  Hi,

                  In NT7 I was able to expose a DataSeries for the Market Analyzer like a plot, but without actually having it as a plot. This was useful if you wanted to get some signal / data to the Market Analyzer without having it plot on the indicator. The way I did it in NT7 was as follows

                  Code:
                          [Browsable(false)]    
                          [XmlIgnore()]             
                          public DataSeries ExtrnTrend
                          {
                              get 
                              {
                                  Update();
                                  return sExtrnTrend;
                              }
                          }
                  Where the DataSeries to expose is sExtrnTrend.

                  In NT8 the code is essentially the same, replacing DataSeries with Series<type>. Doing this I am unable to get any value other than "..." in the Market Analyzer.

                  So my question is, how can I safely expose a Series in NT8 to be used in the Market Analyzer without having it as a Plot in the indicator?

                  Thank you in advance
                  I have the same question , I do not get any signal but this (...) in the market Analyzer.
                  the code actually have and doesn't work is this
                  /// <summary>
                  /// Represents the divergence Signals.
                  /// -4 = hidden divergence short entry |
                  /// -3 = regular divergence short entry |
                  /// -2 = hidden divergence short signal |
                  /// -1 = regular divergence short signal |
                  /// 0 = no signal |
                  /// 1 = regular divergence long signal |
                  /// 2 = hidden divergence long signal |
                  /// 3 = regular divergence long entry |
                  /// 4 = hidden divergence long entry |
                  /// </summary>
                  // [Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
                  public Series<double> DivergenceSignals
                  {
                  get { return divSignal; }
                  }
                  although I get the proper alerts in the Alerts window , but not in the Market Analyzer
                  is there some missing code in NT8 ?, because this works fine in NT7

                  thanks
                  Last edited by PEPBOSCH; 10-30-2017, 09:52 AM.

                  Comment


                    #10
                    Hello mrlogik,

                    Thank you for your note.

                    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. You do not add the indicator to the MA via Column>Indicator>Your Desired Indicator.

                    I have attached a sample to guide you through the process.

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

                    Comment


                      #11
                      Originally posted by NinjaTrader_AlanP View Post
                      Hello mrlogik,

                      Thank you for your note.

                      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. You do not add the indicator to the MA via Column>Indicator>Your Desired Indicator.

                      I have attached a sample to guide you through the process.

                      Please let us know if you need further assistance.
                      Hello Alan, I try to follow your directions , although I am not very familiar with coding , I edited your ExposedPlotMA but I must do something wrong.
                      #region Using declarations
                      using System;
                      using System.Collections.Generic;
                      using System.ComponentModel;
                      using System.ComponentModel.DataAnnotations;
                      using System.Linq;
                      using System.Text;
                      using System.Threading.Tasks;
                      using System.Windows;
                      using System.Windows.Input;
                      using System.Windows.Media;
                      using System.Xml.Serialization;
                      using NinjaTrader.Cbi;
                      using NinjaTrader.Gui;
                      using NinjaTrader.Gui.Chart;
                      using NinjaTrader.Gui.SuperDom;
                      using NinjaTrader.Gui.Tools;
                      using NinjaTrader.Data;
                      using NinjaTrader.NinjaScript;
                      using NinjaTrader.Core.FloatingPoint;

                      #endregion

                      //This namespace holds MarketAnalyzerColumns in this folder and is required. Do not change it.
                      namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
                      {
                      public class ExposedPlotSeriesLITDIVpjsCumDeltaV2018 : MarketAnalyzerColumn
                      {
                      private NinjaTrader.NinjaScript.Indicators.aNT8ExposePlot expPlot;

                      protected override void OnStateChange()
                      {
                      if (State == State.SetDefaults)
                      {
                      Description = @"";
                      Name = "ExposedPlotSeriesLITDIVpjsCumDeltaV2018";
                      Calculate = Calculate.OnPriceChange;
                      DataType = typeof(double);
                      IsEditable = false;
                      FormatDecimals = 2;
                      }
                      else if (State == State.DataLoaded)
                      {
                      expPlot = LITDIVpjsCumDeltaV2018(DivergenceSignals);
                      }
                      }

                      protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
                      {
                      if (marketDataUpdate.MarketDataType == MarketDataType.Last)
                      CurrentValue = expPlot.BullIndication[0];
                      }
                      }
                      }
                      I get the following error when compiling: 'NinjaTrader.NinjaScript.MarketAnalyzerColumns.Mar ketAnalyzerColumn.LITDIVMacdLineV2018(double, int, bool, LITraiz.Base.DivergenceDirection, int, int, int, bool, bool, bool, LITraiz.Base.SwingLengthStyle, LITraiz.Base.SwingDurationStyle, bool, bool, bool, NinjaTrader.Gui.DashStyleHelper, NinjaTrader.Gui.DashStyleHelper, int, int, bool, NinjaTrader.NinjaScript.Priority, string, string, int, bool, NinjaTrader.NinjaScript.Priority, string, string, int, bool, NinjaTrader.NinjaScript.Priority, string, string, int, bool, NinjaTrader.NinjaScript.Priority, string, string, int)' is 'método', que no es válida en el contexto indicado.

                      and the public series from my indicator I want to reach is this
                      Code:
                      /// <summary>
                      /// Represents the divergence Signals. 
                      /// -4 = hidden divergence short entry | 
                      /// -3 = regular divergence short entry | 
                      /// -2 = hidden divergence short signal |
                      /// -1 = regular divergence short signal |
                      /// 0 = no signal | 
                      /// 1 = regular divergence long signal |
                      /// 2 = hidden divergence long signal |
                      /// 3 = regular divergence long entry |
                      /// 4 = hidden divergence long entry |
                      /// </summary>
                      // [Browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
                      public Series<double> DivergenceSignals
                      {
                      get { return divSignal; }
                      }
                      could you tell me how to solve this?

                      thanks

                      Pep

                      Comment


                        #12
                        Hello PEPBOSCH,

                        In the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients.

                        You can also contact a professional NinjaScript Consultants who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request.

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

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by yertle, Yesterday, 08:38 AM
                        7 responses
                        28 views
                        0 likes
                        Last Post yertle
                        by yertle
                         
                        Started by bmartz, 03-12-2024, 06:12 AM
                        2 responses
                        21 views
                        0 likes
                        Last Post bmartz
                        by bmartz
                         
                        Started by funk10101, Today, 12:02 AM
                        0 responses
                        4 views
                        0 likes
                        Last Post funk10101  
                        Started by gravdigaz6, Yesterday, 11:40 PM
                        1 response
                        8 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Started by MarianApalaghiei, Yesterday, 10:49 PM
                        3 responses
                        11 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Working...
                        X