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 FrazMann, Today, 11:21 AM
      2 responses
      6 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by rjbtrade1, 11-30-2023, 04:38 PM
      2 responses
      80 views
      0 likes
      Last Post DavidHP
      by DavidHP
       
      Started by Spiderbird, Today, 12:15 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by lorem, Yesterday, 09:18 AM
      5 responses
      18 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      12 responses
      42 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X