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

Not done this in a while, need help...

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

    Not done this in a while, need help...

    I've not logged onto this forum in possibly 3 years. I need help with writing a stupid simple indicator.

    First off, I need to figure the number of bars since the last 40 bar high. Not the price, the number of bars ago since it happened.
    Second, the same thing for the number of bars since the last 40 bar low. Same as above, not the price, but the number of bars ago since it happened.

    That's pretty much it. Please post the equation for each for an easy cut n paste.
    Last edited by Darth_Trader; 05-20-2018, 07:12 AM.

    #2
    Check out these help pages,



    Code:
    int LoBarsAgo = LowestBar(Low, 40);
    int HiBarsAgo = HighestBar(High, 40);

    Comment


      #3
      Awesome! Thank You!

      I beat my head against a wall for 2 more hours last night.

      I've been coding professionally for 20+ years, and am simply not a fan of their myopic help file. If you don't already understand how to do everything, then it doesn't help at all.

      I learned Javascript and Python to a professional level in less time than it takes me to try to figure out what's needed literally for an expression and what's a label inside that expression in the help file.

      (I don't care if anyone's opinion is different..keep it to yourself)

      Comment


        #4
        Studying the reference samples and then studying the help file works better ...

        Comment


          #5
          Exactly...

          Which by definition makes the help file a failure.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mizzouman1, Today, 07:35 AM
          0 responses
          3 views
          0 likes
          Last Post Mizzouman1  
          Started by i019945nj, 12-14-2023, 06:41 AM
          6 responses
          66 views
          0 likes
          Last Post i019945nj  
          Started by aa731, Today, 02:54 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by BarzTrading, Today, 07:25 AM
          0 responses
          3 views
          0 likes
          Last Post BarzTrading  
          Started by ruudawakening, Today, 12:58 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X