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 on indicator

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

    Indicator on indicator

    If I write an indicator that calls another indicator as part of it's main function, and the called indicator defaults to calculating at end of bar, will the called indicator always calculate at bar's end or will it, if I set my calling indicator to update intrabar, update intrabar?

    #2
    It will update intrabar, but as the indicator it is calling only updates at end of bar you will always get the same value returned until the next bar closes. You could be calling lots of indicators from your indicator, so you don't want to change the default behaviour of other indicators, but if you do, you should probably create another indicator.

    Comment


      #3
      Thanks. One could write psudo indicators that were really to be used as functions, think I will.

      Comment


        #4
        does the called indicator have to have a Plot0 in it in order to return a value?

        Comment


          #5
          No, you could just declare a DataSeries.

          The important bit is in the properties. If it was a Plot it would look like :-

          Code:
          public DataSeries myLine
          {
             get Values[0];
          }
          But if it was your own DataSeries it could look like :-

          Code:
          public DataSeries myLine
          {
             get myDataSeries;
          }

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by sgordet, Today, 05:24 AM
          2 responses
          19 views
          0 likes
          Last Post sgordet
          by sgordet
           
          Started by Board game geek, Today, 02:20 AM
          1 response
          15 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by ZeroKuhl, Yesterday, 04:31 PM
          3 responses
          24 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by knighty6508, Today, 01:20 AM
          3 responses
          20 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by cupir2, Yesterday, 07:44 PM
          2 responses
          21 views
          0 likes
          Last Post cupir2
          by cupir2
           
          Working...
          X