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

Indicator class?

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

    Indicator class?

    Hi. Where I can read about the class named Indicator ?
    I've same indicators and when I'd open one of those indicators, I can't understand samething.
    Please, see on this code:
    Code:
    public partial class GomRecorderIndicator : Indicator
    //...
    	{
    		protected override sealed void Initialize()
    		{
    			CalculateOnBarClose = false;
    			BarsRequired=0;
    			GomInitialize();
    
    			if (iDataManager == -1)
    			{
    				iDataManager = Gom.DataManagerList.Name.IndexOf("Binary");
    
    				if (iDataManager == -1)
    					if (Gom.DataManagerList.Name.Count > 0)
    						iDataManager = 0;
    
    				if (iDataManager > -1)
    					FileFormat = Gom.DataManagerList.Name[iDataManager];
    			}
    //...
    I'am interesting by this moment:
    Code:
    public partial class GomRecorderIndicator : Indicator
    Where in the documentation I can reed about this class Indicator ? I can't find describtion this class by press F1 in ninja script editor and I don't understand assignment this class.. and what class GomRecorderIndicator take from it...
    Please, explane me this.

    #2
    Hello hozman,

    Thank you for your inquiry.

    We do not have documentation in regards to this class.

    The Indicator class holds all indicator methods and properties. OnBarUpdate() and Initialize(), for example, are some methods that are held within the Indicator class.

    If you delete the inheritance of Indicator, the code will have compile errors.

    I would suggest taking a look at this MSDN link about inheritance in C#: https://msdn.microsoft.com/en-us/library/ms173149.aspx
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ZacharyG View Post
      We do not have documentation in regards to this class.
      Support team, doesn't have documentation by the class, though it using in ninja dcript so much? It is very strange.

      Originally posted by NinjaTrader_ZacharyG View Post
      The Indicator class holds all indicator methods and properties.
      Hm. The Indicator class holds only standart methods and properties? But Indicator class may not know about methods and properties in any custom Indicator's...

      Originally posted by NinjaTrader_ZacharyG View Post
      OnBarUpdate() and Initialize(), for example, are some methods that are held within the Indicator class.
      ?

      Originally posted by NinjaTrader_ZacharyG View Post
      I would suggest taking a look at this MSDN link about inheritance in C#: https://msdn.microsoft.com/en-us/library/ms173149.aspx
      I'm understand it.

      Comment


        #4
        Hello hozman,

        The Indicator class is the foundation of all indicators. Without having this class inherited by a custom indicator, the particular indicator will not know of methods such as OnBarUpdate(), Initialize(), etc. and will not be able to utilize them.

        The Indicator class is not going to know about the methods and properties in your custom indicator because it doesn't need to know about them.

        I would suggest taking a look at this publicly available tutorial here as well about class inheritance: http://www.csharp-station.com/Tutorial/CSharp/Lesson08
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rajendrasubedi2023, Today, 09:50 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by geotrades1, Today, 10:02 AM
        0 responses
        4 views
        0 likes
        Last Post geotrades1  
        Started by bmartz, Today, 09:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X