Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access to price data variables in user defined class

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

    Access to price data variables in user defined class

    Hello

    Let's say that I wanted to carry out the calculations of an indicator in various user defined classes such as:

    public class MyClass1
    {
    ..
    ..
    ..
    };

    public class MyClass
    {
    private int x;
    private System.Collections.Generic.List<MyClass1> lst;

    public void Calculate(ref MyClass1 myclass1)
    {

    }

    public void Calculate2(...)
    {

    }
    };


    In other words the calculation of this indicator is a bit complex and I would prefer to break it down into several classes.

    What is the best way of providing Open, High, Low, Close, Volume series access to these classes?

    Inheriting from the Indicator class does not seem to be an option.

    Any hint or help is greatly appreciated.

    #2
    You would need to pass in the indicator as parameter in order to access Open,High,Low,Close etc.
    DierkNinjaTrader Customer Service

    Comment


      #3
      Thanks, Dierk.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by WHICKED, Today, 09:05 PM
      0 responses
      10 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by luislag14, Today, 06:29 PM
      0 responses
      8 views
      0 likes
      Last Post luislag14  
      Started by Protech, Today, 11:08 AM
      1 response
      23 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by guilhem, Today, 02:09 PM
      1 response
      24 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by Hyper, Today, 12:20 PM
      1 response
      23 views
      0 likes
      Last Post NinjaTrader_Jim  
      Working...
      X