Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator from a Strategy

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

    Indicator from a Strategy

    Hi,

    I have a calculation that needs to be performed on a minute bar to be accurate enough but I only need the information a few times per day.

    If I call the indicator performing the calculations every 4 hours but the indicator works from minute data; are the calculations performed whether I call the indicator or not?

    I feel I have seen this issue discussed but could not find the particular post.

    Best Regards,
    Scott

    #2
    Hello ScottB,

    Depending on your calculate on bar close properties, the indicator will be recalculated either with every incoming tick (if set to false) or the indicator will be updated every time a new minute bar is formed (if set to true).

    The indicator you are calling will be recalculated more frequently than the times you are calling it in the strategy.

    Please let me know if you have additional questions.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Matthew, thanks. If I understand you correctly, essentially, the called indicator updates based upon its data series as well as the data series of the calling indictor/strategy.

      Comment


        #4
        ScottB,

        Yes, exactly - it will attempt to recalculate based on the data series(s). If there are no changes, you wouldn't see an update until there is a new value and the calculation will output a new value.

        edit: You may want to play with the Print() function to the output window in real-time to have a better understanding of how this may work for your particular script.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Matthew,

          Thanks; but I now have another question regarding the print output below. I have one print statement in the calling indicator and one in the called (calculating) indicator.

          As you can see the time stamps are not in sequence and I only get values when the calculations are called during real time (the calculations will not change during the day).

          Calling indicator 8/5/2011 15:38:00 PM 0
          Calling indicator 8/5/2011 15:39:00 PM 0
          Calling indicator 8/5/2011 15:39:00 PM 0
          Calling indicator 7/5/2011 16:52:00 PM 0
          Calculation indicator 7/7/2011 16:15:00 PM 1,346.75 1,357.75 1,363.75 1,380.75 1,340.75 1,329.75 1,312.75
          Calculation indicator 7/8/2011 16:15:00 PM 1,341.75 1,354.50 1,367.00 1,392.25 1,329.25 1,316.50 1,291.25

          ...

          Calculation indicator 8/3/2011 16:15:00 PM 1,247.50 1,264.75 1,275.25 1,303.00 1,237.00 1,219.75 1,192.00
          Calculation indicator 8/4/2011 16:15:00 PM 1,219.00 1,245.00 1,290.00 1,361.00 1,174.00 1,148.00 1,077.00
          Calling indicator 8/5/2011 15:40:00 PM 1219
          Calling indicator 8/5/2011 15:41:00 PM 1219
          Calling indicator 8/5/2011 15:42:00 PM 1219

          1219 is the correct value but notice I get 0 above, plus that print statement from 7/5 is quite odd.

          Any thoughts?
          Last edited by ScottB; 08-05-2011, 01:46 PM.

          Comment


            #6
            ScottB,

            Without the context of the conditions you are printing, I'm not sure what results we should expect here.

            If these results are not expected, I'd suggest simplifying the code and maybe using only one print statement at a time until you can determine which piece is giving the inaccurate values.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Matthew,

              Notice the date times

              Calling indicator 8/5/2011 15:39:00 PM 0
              Calling indicator 7/5/2011 16:52:00 PM 0
              Calculation indicator 7/7/2011 16:15:00 PM 1,346.75 1,357.75 1,363.75 1,380.75 1,340.75 1,329.75 1,312.75

              Shouldn't those be in order?

              Comment


                #8
                ScottB, can you post the code to your indicator here? This could be the correct sequence of events depending on what your indicator/strategy is doing.
                AustinNinjaTrader Customer Service

                Comment


                  #9
                  Austin, I will email it to support.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by ghoul, Today, 06:02 PM
                  3 responses
                  14 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by jeronymite, 04-12-2024, 04:26 PM
                  3 responses
                  44 views
                  0 likes
                  Last Post jeronymite  
                  Started by Barry Milan, Yesterday, 10:35 PM
                  7 responses
                  20 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by AttiM, 02-14-2024, 05:20 PM
                  10 responses
                  180 views
                  0 likes
                  Last Post jeronymite  
                  Started by DanielSanMartin, Yesterday, 02:37 PM
                  2 responses
                  13 views
                  0 likes
                  Last Post DanielSanMartin  
                  Working...
                  X