Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Indicators in a class

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

    Accessing Indicators in a class

    Hi,

    In this thread (http://ninjatrader.com/support/forum...ad.php?t=86186) I was able to create a class which was able to access High, Low, and even static methods such as Draw...

    However, I want to access indicator methods such as SMA and EMA methods so I can fire a ticktock function call on the onbarupdate and handle all the complex logic in my class -- But I cant get how to even get the SMA and EMA (simple moving average and exponential moving average static methods) to work in my class..What must I pass to get access to these indicator methods?

    Thanks in advance.

    KhaosTrader

    #2
    Hi,

    I think I figured it out, I just passed the "Indicator" structure.

    Is there a class map or something, so I can see what is derived from what? I just had to go down the list and experiment blindly, and well, I figured it out finally, but if there was a class map or something, it would be easier.

    Thank you.

    Comment


      #3
      Hello KhaosTrader,

      Thank you for your post.

      There is no map to the structure here or what can be derived from what class. NinjaScript native methods (such as Print()) would need to be derived from one of the classes in order to call them and some NinjaScript classes may not have access to methods or functions that others may (as you have found).

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by alifarahani, Today, 09:40 AM
      4 responses
      21 views
      0 likes
      Last Post alifarahani  
      Started by gentlebenthebear, Today, 01:30 AM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by PhillT, Today, 02:16 PM
      2 responses
      7 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by Kaledus, Today, 01:29 PM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frankthearm, Yesterday, 09:08 AM
      14 responses
      47 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Working...
      X