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

Algorithm Help - "Average of Highs"

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

    Algorithm Help - "Average of Highs"

    To any programmers out there -

    I'm trying to think of an algorithm that essentially takes an "average of highs." I'm not quite certain how to approach this.

    I'm working with an oscillator, and I'd like to know, on average, the high points (and, by corollary, the low points) that this oscillator has reached over a set amount of time, and even since the oscillator's instantiation.

    Any ideas how to approach this? All suggestions are welcome.

    #2
    Originally posted by cgeorgan View Post
    To any programmers out there -

    I'm trying to think of an algorithm that essentially takes an "average of highs." I'm not quite certain how to approach this.

    I'm working with an oscillator, and I'd like to know, on average, the high points (and, by corollary, the low points) that this oscillator has reached over a set amount of time, and even since the oscillator's instantiation.

    Any ideas how to approach this? All suggestions are welcome.
    How are you defining a "high point" on an oscillator ?

    Comment


      #3
      Originally posted by koganam View Post
      How are you defining a "high point" on an oscillator ?
      Exactly, I'm not even sure how to approach this.

      Comment


        #4
        Originally posted by cgeorgan View Post
        Exactly, I'm not even sure how to approach this.
        Perhaps the Swing indicator running on the Osc?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by cgeorgan View Post
          Exactly, I'm not even sure how to approach this.
          Unfortunately that is the problem with computers. We can only code the thing if we have a precise definition.

          Comment


            #6
            Hi cgeorgam,

            Not sure what you are trying to do but perhaps the highs of your oscillator can be looked at as swing highs (using the same approach) - and the lows as swing lows). You can then create a custom data series of the highs and lows and apply an SMA or EMA,...etc to it. If you are running time charts then you might be able to to get the time span and calculate the average high(or low) over that time period. Hope this helps.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ETFVoyageur, 04-30-2024, 02:04 PM
            11 responses
            94 views
            0 likes
            Last Post ETFVoyageur  
            Started by bubblegum, 03-18-2024, 10:41 AM
            3 responses
            43 views
            0 likes
            Last Post vjsworld  
            Started by JamesK1, Today, 02:48 PM
            1 response
            10 views
            0 likes
            Last Post JamesK1
            by JamesK1
             
            Started by llanqui, Today, 03:51 PM
            0 responses
            9 views
            0 likes
            Last Post llanqui
            by llanqui
             
            Started by Quanto, 04-17-2024, 10:43 AM
            2 responses
            24 views
            0 likes
            Last Post Quanto
            by Quanto
             
            Working...
            X