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 helpwanted, Today, 03:06 AM
            1 response
            11 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            9 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            5 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            242 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            387 views
            1 like
            Last Post Gavini
            by Gavini
             
            Working...
            X