• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Internal Indicators visible

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

    Internal Indicators visible

    I am writing an indicator (which I obviously has to be visible) that uses inside internal indicators which I need not to be visible in the grid though still able to function in the NT7 framework.
    Even though the access specificator for the class is internal rather than public they still remain visible in the grid.
    For clarity I am writing

    internal class ema2 : indicator {...

    and yet ema2 remains visible in the grid. Any idea how to keep them invisible?

    Thank You

    G

    #2
    Hello giogio1,
    Thanks for your post.

    There isn't really any concept of being able to hide indicators in the list. What specifically are your internal indicators doing? Simple calculations?

    Did you intend to post this in the NT8 forum?
    JoshNinjaTrader Customer Service

    Comment


      #3
      Thank You Josh.
      I did not realize this is NT8 forum, can I move or should I delete and repost?
      I am using NT7. The indicator looks for confluence of other internal indicators most simple, a couple complex, that I don't want to reveal in order to keep the indicator list clean.

      Comment


        #4
        giogio1,

        No need to repost, I will have this one moved over there.

        I think your best bet to accomplish this in NT7 will be the UserDefinedMethods.cs

        You may be able to include the logic from all of your internal indicators there and prevent them from appearing in your indicators list. Please the followgin link for more info on the user defined methods in NT7: https://ninjatrader.com/support/help...ed_methods.htm

        JoshNinjaTrader Customer Service

        Comment


          #5
          I forgot to mention that the indicators are in a dll, all in the same module (dll)..

          If I use 'internal' for any class in a module it shouldn't be visible outside that module.

          Code:
          namespace NinjaTrader.Indicator
          {
              internal class EMA2 : Indicator
              {
              }
          }
          The reason the NJ's datagrid sees it is because of the following standard part:

          Code:
          namespace NinjaTrader.Indicator
          {
              public partial class Indicator : IndicatorBase
              {
                  private EMA2[] cacheEMA2 = null;
          
                  private static EMA2 checkEMA2 = new EMA2();
          
                  public EMA2 EMA2(int period)
                  {
                      return EMA2(Input, period);
                  }
          
                  public EMA2 EMA2(Data.IDataSeries input, int period)
                  {
                  }
              }
          }
          I wonder if this second part could be replaced with something else so I can call
          Code:
          EMA2( Close, 14 );
          from the main indicator in a way that it still works with the NJ7 framework (while of course not being visible on the grid)

          It sounds hard to believe that it's impossible.

          Comment


            #6
            giogio1,

            I would also be surprised if this is not possible outside of what I mentioned. However it would require C# concepts not included in NinjaScript and would not be supported by NinjaTrader.

            This is actually a feature request in NT8, but we obviously do not accept feature requests for NT7 any longer.
            JoshNinjaTrader Customer Service

            Comment


              #7
              Originally posted by giogio1 View Post
              I forgot to mention that the indicators are in a dll, all in the same module (dll)..

              If I use 'internal' for any class in a module it shouldn't be visible outside that module.

              Code:
              namespace NinjaTrader.Indicator
              {
              internal class EMA2 : Indicator
              {
              }
              }
              The reason the NJ's datagrid sees it is because of the following standard part:

              Code:
              namespace NinjaTrader.Indicator
              {
              public partial class Indicator : IndicatorBase
              {
              private EMA2[] cacheEMA2 = null;
              
              private static EMA2 checkEMA2 = new EMA2();
              
              public EMA2 EMA2(int period)
              {
              return EMA2(Input, period);
              }
              
              public EMA2 EMA2(Data.IDataSeries input, int period)
              {
              }
              }
              }
              I wonder if this second part could be replaced with something else so I can call
              Code:
              EMA2( Close, 14 );
              from the main indicator in a way that it still works with the NJ7 framework (while of course not being visible on the grid)

              It sounds hard to believe that it's impossible.
              Try making your class abstract, then derive from it when you choose to use it.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by jamarc, Today, 02:30 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by uday12, Yesterday, 04:19 PM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Started by grose, Today, 06:53 AM
              2 responses
              7 views
              0 likes
              Last Post grose
              by grose
               
              Started by Bobisam, Yesterday, 04:57 PM
              1 response
              20 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Started by voltlon, Yesterday, 05:18 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Working...
              X