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

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?
    Josh G.NinjaTrader 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

        Josh G.NinjaTrader 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.
            Josh G.NinjaTrader 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 love2code2trade, Yesterday, 01:45 PM
              4 responses
              28 views
              0 likes
              Last Post love2code2trade  
              Started by funk10101, Today, 09:43 PM
              0 responses
              7 views
              0 likes
              Last Post funk10101  
              Started by pkefal, 04-11-2024, 07:39 AM
              11 responses
              37 views
              0 likes
              Last Post jeronymite  
              Started by bill2023, Yesterday, 08:51 AM
              8 responses
              44 views
              0 likes
              Last Post bill2023  
              Started by yertle, Today, 08:38 AM
              6 responses
              26 views
              0 likes
              Last Post ryjoga
              by ryjoga
               
              Working...
              X