Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

new indicator need time left in bar

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

    new indicator need time left in bar

    I'm trying to make an indicator that will alarm when the price moves x points within x amonut of time. i tried to use the bartimer indicator in my code but it will not work. i saw there is a Bar.PercentComplete would this work the same way.
    Last edited by cbart_1; 10-17-2011, 12:55 PM. Reason: misspelling

    #2
    cbart_1,

    What sort of time frame are you looking at? Over how long of an interval are you testing this? It seems like you are looking at using a discrete derivative. I.e. change in Price over change in Time.



    Something like :

    ( Close[0]-Close[5] ) / (0 bars - 5 bars) would work unless you have specific requirements as to the time, i.e. you are on a 60 minute chart and want to calculate the difference based on 1 minute times or something. This is only required to maintain the proper units.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      I would like for it to work on any 1, 15, or 30 minute chart. So really i need to know how much time is left in a bar or how much time has passed since the open of the bar.

      Comment


        #4
        Over what period are you calculating the difference, is it intra-bar? Or are you calculating it across a few bars? Essentially. you don't really need to use units of time if you think of your time as each "bar". Then its just a simple difference Close[a]-Close[b] or whatever.

        It just depends on how important having actual time as your units are, i.e. if you want Change in price / minute or Change in price / bar.
        Last edited by NinjaTrader_AdamP; 10-17-2011, 03:01 PM.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          got it

          ok i figured it out. i just needed to know if the price went a certain amout of points in 1 15 minute bar in a few minutes. i used the Bars.PercentComplete to do it.
          Last edited by cbart_1; 10-18-2011, 09:50 AM. Reason: typo's

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          330 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          549 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          549 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X