Announcement

Collapse
No announcement yet.

Accumulation/Distribution Index (0-100)

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

  • Accumulation/Distribution Index (0-100)

    Hello,


    I have just started to learn about EFS and I am about to start on my first ever efs formula/study. I was wondering if anyone has experience of creating a similar type of study who I could turn too in case I get stuck.

    I would like to create a new indicator based on the Accumulation/Distribution indicator.

    I would like to create an index of the ACC-DIST figure so that the values range from 0% to 100%. Also I will be adding two bands/lines with one being at 20% level and the other being at the 80% level.



    The formula is as follows...


    [(Current Period's Value - Lowest Value Of Last "X-Period")/
    (Highest High Of Last "X-Period" - Lowest Low Of Last "X-Period")] X 100


    - The "Current Period" should be variable and automatically correspond with the time-frame currently selected i.e daily, 60-min, 1-min, etc

    - The "X-Period" should be variable and manually changeable i.e 14-period, 200-period, etc



    I will attempt to create it immediately & get back to you guys later tonight or tomorrow with any more specific questions or problems I run into. Any help would be greatly appreciated.



    Thanks,

    kbw

  • #2
    Re: Accumulation/Distribution Index (0-100)

    kbw
    FWIW the equation you posted is a Stochastic %K
    Alex


    Originally posted by kbw
    Hello,


    I have just started to learn about EFS and I am about to start on my first ever efs formula/study. I was wondering if anyone has experience of creating a similar type of study who I could turn too in case I get stuck.

    I would like to create a new indicator based on the Accumulation/Distribution indicator.

    I would like to create an index of the ACC-DIST figure so that the values range from 0% to 100%. Also I will be adding two bands/lines with one being at 20% level and the other being at the 80% level.



    The formula is as follows...


    [(Current Period's Value - Lowest Value Of Last "X-Period")/
    (Highest High Of Last "X-Period" - Lowest Low Of Last "X-Period")] X 100


    - The "Current Period" should be variable and automatically correspond with the time-frame currently selected i.e daily, 60-min, 1-min, etc

    - The "X-Period" should be variable and manually changeable i.e 14-period, 200-period, etc



    I will attempt to create it immediately & get back to you guys later tonight or tomorrow with any more specific questions or problems I run into. Any help would be greatly appreciated.



    Thanks,

    kbw

    Comment


    • #3
      Hi Alex,

      Yeah I just had a look in one of my books & the Stochastic %K formula is almost identical to what I am looking for.

      The only significant difference is the Stochastic %K is based on price I think. However I would like the same formula applied to volume (accumulation/distribution) data.

      Thanks for mentioning the similarities as I can now start looking for a way to alter the Stochastic %K to somehow get it's data from the acc-dist values rather than price values.

      I would have to find the Stochastic %K.efs and play around with it. There does not seem to be an option for me to download it from the "Built-In Study Functions" from the "Function Reference" section of the efs knowledgebase.

      Do you have any quick suggestions as Im guessing it's simply a matter of calling the data from acc-dist instead of price?


      Thank you,
      kbw

      Comment


      • #4
        kbw
        As an aside your equation would be incorrect if you are trying to normalize the Accumulation/Distribution ie
        (Highest High Of Last "X-Period" - Lowest Low Of Last "X-Period")
        should actually be
        (Highest Value Of Last "X-Period" - Lowest Value Of Last "X-Period")
        else you would never get a normalized return
        With regards to the Stochastic function it will use the Close and the highest High and lowest Low [over the defined period] by default ie if you do not pass a source to it else it will calculate the indicator using the current value and the highest and lowest values [over the defined period] of the source you passed. So in essence all you need to do is pass the accDist() function to the stochK() function ie
        stochK(Period, 1, 1, accDist())
        to calculate the Stochastic %K of the Accumulation/Distribution
        For the syntax of the Accumulation/Distribution and Stochastic functions together with examples of their use see the links to the related articles in the EFS KnowledgeBase
        Alex


        Originally posted by kbw
        Hi Alex,

        Yeah I just had a look in one of my books & the Stochastic %K formula is almost identical to what I am looking for.

        The only significant difference is the Stochastic %K is based on price I think. However I would like the same formula applied to volume (accumulation/distribution) data.

        Thanks for mentioning the similarities as I can now start looking for a way to alter the Stochastic %K to somehow get it's data from the acc-dist values rather than price values.

        I would have to find the Stochastic %K.efs and play around with it. There does not seem to be an option for me to download it from the "Built-In Study Functions" from the "Function Reference" section of the efs knowledgebase.

        Do you have any quick suggestions as Im guessing it's simply a matter of calling the data from acc-dist instead of price?


        Thank you,
        kbw

        Comment


        • #5
          Alex,


          Thanks for pointing me in the right direction. I used the EFS Formula Wizard to create a study-on-study indicator using the stochastic & AccDist. I must say that it was not as straightforward it should have been because in the Formula Wizard, the StochStudy did not have extra constructor within the the drop down arrow to the left of the constructor. I did not have the "studyVarName" option so I had to further edit the code in the EFS editor.

          Anyways, I have it working now so thanks again.

          Comment


          • #6
            kbw
            You are welcome

            ... in the Formula Wizard, the StochStudy did not have extra constructor within the the drop down arrow to the left of the constructor
            That is because the Formula Wizard uses only the legacy efs functions and the StochStudy() function [which is part of those] does not include the option to use a source which is why I suggested to use the efs2 stochK() function that instead includes this provision
            Alex


            Originally posted by kbw
            Alex,

            Thanks for pointing me in the right direction. I used the EFS Formula Wizard to create a study-on-study indicator using the stochastic & AccDist. I must say that it was not as straightforward it should have been because in the Formula Wizard, the StochStudy did not have extra constructor within the the drop down arrow to the left of the constructor. I did not have the "studyVarName" option so I had to further edit the code in the EFS editor.

            Anyways, I have it working now so thanks again.

            Comment

            Working...
            X