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 Mindset, Today, 06:46 AM
      0 responses
      8 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, Yesterday, 05:21 PM
      0 responses
      14 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      15 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      82 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      48 views
      0 likes
      Last Post PaulMohn  
      Working...
      X