Announcement

Collapse
No announcement yet.

Volume Churn Histogram

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

  • Volume Churn Histogram

    Volume Churn = Volume / Range

    Does this efs exist? If no can it be coded in Esignal?

    Please see the attached link for more info:

    Last edited by kevinmclark; 01-17-2007, 08:41 PM.

  • #2
    Re: Volume Churn Histogram

    Kevin,

    Originally posted by kevinmclark
    Volume Churn = Volume / Range

    Does this efs exist? If no can it be coded in Esignal?

    Please see the attached link for more info:

    http://emini-watch.com/emini-daily-u...n-at-highs/84/
    This looks like an interesting concept as I've not seen it anywhere before and certainly volume and range are key indicators.

    I looked at the site quickly and didn't see the specific calculations if you can find them, or better yet access the easylanguage studies then we could easily put something together.

    I'm far from a EFS programming expert but this looks easy enough.
    Glen Demarco
    [email protected]

    Comment


    • #3
      The Volume Churn Histogram equation is: Volume / Range (high - low). The vertical bars are typically blue; however, some are colored red when the Volume Churn reading is higher than a specified number of bars (default is 20).

      Unfortunately, I'm no programmer; therefore, any assistance would be appreciated.

      Comment


      • #4
        Originally posted by kevinmclark
        The Volume Churn Histogram equation is: Volume / Range (high - low). The vertical bars are typically blue; however, some are colored red when the Volume Churn reading is higher than a specified number of bars (default is 20).

        Unfortunately, I'm no programmer; therefore, any assistance would be appreciated.
        Kevin,

        You may be more of a "programmer" then you think.

        Essentially with the information you already provided you could probably surprise yourself. You may want to check out the EFS Formula Wizard as it is one of the easiest code generators I've ever seen and actually fun to use.
        Glen Demarco
        [email protected]

        Comment


        • #5
          I'll give it a try over the weekend.

          Comment


          • #6
            Go for it!

            Then if you have a question or problem post the code...
            Glen Demarco
            [email protected]

            Comment


            • #7
              I tried to create this EFS in the Formula Wizard to no avail, so I did the next best thing: used an existing EFS ( COMPQ_Volume.efs) as a model. As a result the attached code is provided; however, I need help with expanding it, so it can be used with other symbols and other intervals (constant volume bars, tick bars, etc..). At the moment it's limited to Daily, Weekly, & Monthly intervals.

              PHP Code:
              /****************************************************************
              Provided By : kevinmclark 01/21/2007
              *****************************************************************
              Description: Displays a volume churn histogram for the ES #F by using
              the volume / range(high - low) for intraday intervals.
              There is also a moving average built in, which can be adjusted
              through the nLength parameter.
              */

              function preMain() {
              setStudyTitle("Volume Churn");
              setCursorLabelName("Vol Churn"0);
              setCursorLabelName("Avg. Vol Churn"1);
              setPlotType(PLOTTYPE_HISTOGRAM,0);
              setDefaultBarThickness(3);
              setDefaultBarFgColor(Color.blue0);
              setPlotType(PLOTTYPE_LINE1);
              setDefaultBarFgColor(Color.red1);

              }

              var 
              vArray = new Array();
              var 
              vInterval getInterval();

              function 
              main(nLength) {

              if (
              nLength == null) {
                  
              nLength 20;
              } else {
                  
              nLength Math.round(nLength);
              }

              if (
              vInterval == "D" || vInterval == "W" || vInterval == "M" || vInterval == "T" || vInterval == "V") {
                  
                  var 
              high("ES #F");
                  var 
              low("ES #F");
                  var 
              volume("ES #F");

                  if (
              == null || == null || == null) return;

                  var 
              vValue / (l);
              }

              var 
              nBarState getBarState();
                  
              if (
              nBarState == BARSTATE_NEWBAR) {
                  
              vArray.unshift(vValue);   //inserts array element to the front of the array 
              } else {
                  
              vArray[0] = vValue;
              }

              if (
              vArray[nLength-1] != null) { // check to make sure array is full
                  
              var vSum 0;
                  for(
              0nLengthi++) {
                      
              vSum += vArray[i];
                  }
                  var 
              vAvgVolChurn vSum nLength;

              } else {
                  return;
              }

              if (
              vArray.length nLengthvArray.pop(); // Removes last array item

              return new Array(vValuevAvgVolChurn);


              Attached Files
              Last edited by kevinmclark; 01-21-2007, 11:59 AM.

              Comment


              • #8
                Kevin,

                Congratulations. WIth all the examples generously made available you can get alot more accomplished then one would think without being a "programmer".

                Anyway, as you first EFS, this would be a good place to experiment and also maybe get into some good programming practices that will save time and trouble in the future. Unfortunately I'm not the one show you how, but hopefully the moderators will have suggestions.

                I can tell you to make sure you backup the current copy, adding perhaps a date, letter suffix, version number whatever, so you can easily restore your EFS to a working state. Then make one small change at a time, and test out the result, back it up and make then next change.

                It's alot better for you to make these changes as your learn very little by me doing it for you but I can offer some suggestions as you are again, alot closer then you think.

                Regarding you desired chnages:

                If you want to use this indicator on the same chart symbol where you have the EFS loaded, then you don't need to specify an explicit or "external" symbol name "ES #F" in this case.

                Simply remove the "ES #F" (including both double quotes) and replace the symbol name with the barindex number, I suggest using -1. Now this study should work on whatever chart symbol it is loaded into.

                Then you may want to reconsider removing the test for certain types of intervals to allow your indicator to work for all intervals.

                It think this is enough to work on for now....


                Glen
                Last edited by demarcog; 01-21-2007, 03:40 PM.
                Glen Demarco
                [email protected]

                Comment


                • #9
                  demarcog,

                  Thanks for your help!!!

                  Comment


                  • #10
                    The following is the current EFS with the previous mentioned changes.

                    Additionally, how do I code the following?

                    -Make certain vertical bars colored red when the Volume Churn reading is higher than a user defined number of last bars (default 20)

                    -Make some vertical bars colored black when the Volume Churn reading is lower than a user defined number of last bars (default 20);

                    -Lastly, there is a display problem (auto scaling) when the range is zero, typically on lower intervals and some symbols.

                    Thanks!!

                    P.S. demarcog, I set the barindex number to 0 instead of -1, to properly align the Churn reading to its corresponding bar.



                    PHP Code:
                    /****************************************************************
                    Provided By : kevinmclark 01/21/2007
                    *****************************************************************
                    Description: Displays a volume churn histogram by using the volume / range(high - low). There is also a moving average built in, which can be adjusted
                    through the nLength parameter.
                    */

                    function preMain() {
                    setStudyTitle("Volume Churn");
                    setCursorLabelName("Vol Churn"0);
                    setCursorLabelName("Avg. Vol Churn"1);
                    setPlotType(PLOTTYPE_HISTOGRAM,0);
                    setDefaultBarThickness(3);
                    setDefaultBarFgColor(Color.blue0);
                    setPlotType(PLOTTYPE_LINE1);
                    setDefaultBarFgColor(Color.red1);

                    }

                    var 
                    vArray = new Array();
                    var 
                    vInterval getInterval();

                    function 
                    main(nLength) {

                    if (
                    nLength == null) {
                        
                    nLength 20;
                    } else {
                        
                    nLength Math.round(nLength);
                    }

                    if (
                    vInterval == null) return;{
                        
                        var 
                    high(0);
                        var 
                    low(0);
                        var 
                    volume(0);

                        if (
                    == null || == null || == null) return;

                        var 
                    vValue / (l);
                    }

                    var 
                    nBarState getBarState();
                        
                    if (
                    nBarState == BARSTATE_NEWBAR) {
                        
                    vArray.unshift(vValue);   //inserts array element to the front of the array 
                    } else {
                        
                    vArray[0] = vValue;
                    }

                    if (
                    vArray[nLength-1] != null) { // check to make sure array is full
                        
                    var vSum 0;
                        for(
                    0nLengthi++) {
                            
                    vSum += vArray[i];
                        }
                        var 
                    vAvgVolChurn vSum nLength;

                    } else {
                        return;
                    }

                    if (
                    vArray.length nLengthvArray.pop(); // Removes last array item

                    return new Array(vValuevAvgVolChurn);


                    Attached Files
                    Last edited by kevinmclark; 01-21-2007, 07:46 PM.

                    Comment


                    • #11
                      The following is an interesting link on how this trader uses the Volume Churn indicator:

                      Comment


                      • #12
                        Could someone please assist/point me in the right direction with the following:


                        Originally posted by kevinmclark

                        -Make certain vertical bars colored red when the Volume Churn reading is higher than a user defined number of last bars (default 20)

                        -Make some vertical bars colored black when the Volume Churn reading is lower than a user defined number of last bars (default 20);

                        -Lastly, there is a display problem (auto scaling) when the range is zero, typically on lower intervals and some symbols.


                        Thanks!!

                        Comment


                        • #14
                          Thanks! I will work on it over the weekend.

                          Comment


                          • #15
                            Steve,

                            The following request was in reference to the non price study bars (Volume Churn readings); therefore, if you have any relevant examples it would be appreciated. Thanks!!!


                            Could someone please assist/point me in the right direction with the following:


                            Originally posted by kevinmclark

                            -Make certain vertical bars colored red when the Volume Churn reading is higher than a user defined number of last bars (default 20)

                            -Make some vertical bars colored black when the Volume Churn reading is lower than a user defined number of last bars (default 20);

                            -Lastly, there is a display problem (auto scaling) when the range is zero, typically on lower intervals and some symbols.

                            Thanks!!

                            Comment

                            Working...
                            X