Announcement

Collapse
No announcement yet.

EMA10 of Bollinger bandwidth

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

  • EMA10 of Bollinger bandwidth

    Hi!

    I need some help to write an EFS that plots EMA10 of Bollinger Bandwidth.

    Any?

    RSy

  • #2
    Bollinger Bandwidth attached.

    RSy
    Attached Files

    Comment


    • #3
      Hello RSy,

      The study you are looking for can be found in our EFS Library. The default length is 20. You can change that through "Edit Studies" or you can change the default to 10 with the editor on line 48.

      BollingerEMA.efs
      Jason K.
      Project Manager
      eSignal - an Interactive Data company

      EFS KnowledgeBase
      JavaScript for EFS Video Series
      EFS Beginner Tutorial Series
      EFS Glossary
      Custom EFS Development Policy

      New User Orientation

      Comment


      • #4
        JasonK, thanks, but it isn't BollingerEMA I am looking for, but the bandwidth and EMA of the bandwidth to be plotted.

        RSy

        Comment


        • #5
          Hello RSy,

          So you want to see a total of four lines on the chart? The regular Bollinger Bands plus a 10 period EMA for both bands and no basis line. Is this correct?
          Jason K.
          Project Manager
          eSignal - an Interactive Data company

          EFS KnowledgeBase
          JavaScript for EFS Video Series
          EFS Beginner Tutorial Series
          EFS Glossary
          Custom EFS Development Policy

          New User Orientation

          Comment


          • #6
            No, just 2 lines. Not bollinger upper and lower, but the diffrence between upper and lower, and a EMA of that one.

            RSy

            Comment


            • #7
              Hello RSy,

              Do you want this to be plotted as a price study or non-price study?
              Jason K.
              Project Manager
              eSignal - an Interactive Data company

              EFS KnowledgeBase
              JavaScript for EFS Video Series
              EFS Beginner Tutorial Series
              EFS Glossary
              Custom EFS Development Policy

              New User Orientation

              Comment


              • #8
                It's a non price study that plots the range between BB's. Upper BB minus Lower BB. I can code that but RSY wants an EMA of that range.

                It will be interesting to see how the EMA is done. Probably use an array of the previous values for range but where do we go from there to get the EMA?

                Comment


                • #9
                  How can I add an EMA(10) to this?



                  PHP Code:
                  /* Copyright © eSignal, a division of Interactive Data Corporation. 2003. All rights reserved. 
                  This sample eSignal Formula Script (EFS) may be modified and saved under a new 
                  filename; however, eSignal is no longer responsible for the functionality once modified.
                  eSignal reserves the right to modify and overwrite this EFS file with each new release. */

                  ////////////////////////////////////////////////////
                  // BandWidth Study
                  /////////////////////////////////////////////////////

                  var bb = new BollingerStudy(20"Close"2.0);

                  function 
                  main() {
                      var 
                  vUpper bb.getValue(BollingerStudy.UPPER);
                      var 
                  vLower bb.getValue(BollingerStudy.LOWER);
                      var 
                  vMiddle bb.getValue(BollingerStudy.BASIS);
                      
                      if(
                  vUpper == null || vLower == null || vMiddle == null)
                          return;
                          
                      return (
                  vUpper vLower) / vMiddle 100;

                  Attached Files

                  Comment


                  • #10
                    Right!

                    Thats what I want please.... plotted as a non-price-study!

                    RSy

                    Comment


                    • #11
                      Hello RSy and xygeek,

                      Ok, here we go. This formula, BollingerEMAbandwidth.efs, will give you the 20 period bandwidth according to the xygeek's calculation and a 10 period EMA of the bandwidth by default. All the inputs for the Bollinger Study are configurable through "Edit Studies" as well as the length for the EMA.

                      By the way xygeek, there is an example formula that demonstrates how to code an EMA in our EFS Library. You'll see the same process in this formula with a couple minor modifications.

                      Jason K.
                      Project Manager
                      eSignal - an Interactive Data company

                      EFS KnowledgeBase
                      JavaScript for EFS Video Series
                      EFS Beginner Tutorial Series
                      EFS Glossary
                      Custom EFS Development Policy

                      New User Orientation

                      Comment


                      • #12
                        Thank you very much!

                        RSy

                        Comment


                        • #13
                          Thanks Jason,

                          I've been wanting an EMA template that can handle custom variables.

                          Comment

                          Working...
                          X