Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars Ago

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

    Bars Ago

    In the condition builder there is a parameter named: "Bars Ago".

    What are the specifics on this parameter in terms of "duration"?

    If I specify "Bars Ago" as ten (10), does that mean exactly 10 Bars Ago OR within the last 10 Bars Ago?

    Please consider INCLUDING a parameter that will consider the latter condition if this is not so, or point me to something that may consider activity that has occurred with the "Bars Ago".

    In an environment of infinite possibilities it is unreasonable to be so Exacting in such a regard.

    #2
    Hello Ironplates,

    BarsAgo refers to the what bar that you are looking at so that you may use the value for calculations. It is dependent on what Period you have the strategy set to. For example on a 5 Minute chart, BarsAgo 0 will refer to the current bar, BarsAgo 1 would be the previous bars (5 Minutes ago) and BarsAgo 2 would be the bar (10 Minutes ago). Basically, the BarsAgo value is going to count back from the Previous Bar and return the value so that you can compare Historical data by referencing it in that manner.
    JCNinjaTrader Customer Service

    Comment


      #3
      suppose I want to know evaluate the past hour's action on a 15 minute chart, but cannot specify when it would happen on a real time basis.

      for example.

      place an order to buy if the close crossed above the 50 day moving average sometime over the last hour.

      please note, i am not wanting to it to buy if the price closes above the 50 day moving average, but if the price closed above the 50 day moving at some point within the last hour, i just will not know in real time when and am trying to incorporate that into the automated trading strategy. This is only an example and actually not a real parameter of interest, but only to articulate my point.

      Comment


        #4
        Originally posted by Ironplates View Post
        suppose I want to know evaluate the past hour's action on a 15 minute chart, but cannot specify when it would happen on a real time basis.

        for example.

        place an order to buy if the close crossed above the 50 day moving average sometime over the last hour.

        please note, i am not wanting to it to buy if the price closes above the 50 day moving average, but if the price closed above the 50 day moving at some point within the last hour, i just will not know in real time when and am trying to incorporate that into the automated trading strategy. This is only an example and actually not a real parameter of interest, but only to articulate my point.
        All code-wizards, by their very nature are limited: some more so than others. To do what you want, you are going to have to write the code directly in NinjaScript.

        Comment


          #5
          where can i learn to write code?

          Comment


            #6
            Originally posted by Ironplates View Post
            where can i learn to write code?
            Depending on your skill level - the NT samples are usually a starting point.

            There is a NT partner that is devoted to pretty much teaching with online books.

            There is another NT partner, that has a program called BloodHound...

            Comment


              #7
              Originally posted by Ironplates View Post
              where can i learn to write code?
              Here is the first one I mentioned:

              Comment


                #8
                Originally posted by Ironplates View Post
                where can i learn to write code?
                Bloodhound is here:



                They allowed 2 months data's worth or so backtesting for FREE.

                If you decide to go live or want to test further, you do need to purchase.

                *this was true when I was checking it out nov 2012..

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, Yesterday, 10:06 AM
                0 responses
                20 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                18 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                14 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                9 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                38 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X