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 TraderBCL, Today, 04:38 AM
          2 responses
          16 views
          0 likes
          Last Post TraderBCL  
          Started by martin70, 03-24-2023, 04:58 AM
          14 responses
          106 views
          0 likes
          Last Post martin70  
          Started by Radano, 06-10-2021, 01:40 AM
          19 responses
          609 views
          0 likes
          Last Post Radano
          by Radano
           
          Started by KenneGaray, Today, 03:48 AM
          0 responses
          5 views
          0 likes
          Last Post KenneGaray  
          Started by thanajo, 05-04-2021, 02:11 AM
          4 responses
          471 views
          0 likes
          Last Post tradingnasdaqprueba  
          Working...
          X