Announcement

Collapse
No announcement yet.

cmf chaikin money flow

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

  • cmf chaikin money flow

    Hi,

    I'm using Chaikin Money Flow(cmf.efs) on a minute and tick chart for the S&P e-mini. On both charts, the indicator histogram keeps changing its display from a histogram, to a blank area to just vertical lines. Is there a way to correct this so the histogram will display continuously?

    Thank you for your help.

    -sfwc

  • #2
    sfwc
    FWIW I am not seeing this at my end.
    Can you post the copy of the efs you are using?
    Alex

    Comment


    • #3
      Hi,

      Sorry I'm new to the forum and eSignal. Is this what you're looking for? It's under Formulas>Library>cmf.efs(see below).

      At first eSignal tech support suggested that I restart my charts since the problem could be from the data I was receiving, but my trading partner in another country is also experiencing the same display problem.

      Thanks again for your help.

      -sfwc

      function preMain() {
      setStudyTitle("Chaikin Money Flow");
      setCursorLabelName("CMF");

      // Default plot type is Line
      setPlotType(PLOTTYPE_HISTOGRAM);
      }

      function main(nInputLength) {
      // If the user did not provide an input length, set a default
      if(nInputLength == null) {
      nInputLength = 21;
      }

      // Get the last 21 bars of L, H, C, V data
      var arClose = close(0, -21);
      var arLow = low(0, -21);
      var arHigh = high(0, -21);
      var arVolume = volume(0, -21);

      // Not enough data to process (yet).
      if(arClose == null || arLow == null || arHigh == null || arVolume == null)
      return;

      var i;
      var vSumVolume = 0;
      var vSum = 0;

      // Sum up the values
      for(i = 0; i < 21; i++) {
      vSum += (((arClose[i]-arLow[i])-(arHigh[i]-arClose[i]))/(arHigh[i]-arLow[i]))*arVolume[i];
      vSumVolume += arVolume[i];
      }


      return vSum / vSumVolume;

      }

      Comment


      • #4
        sfwc
        That is the same efs I have been using to try and replicate the issue and it appears to be working properly.
        As an aside you may want to replace your cmf.efs with the one attached to this message. The script you are currently using does not allow you to change the Length of the Chaikin Money Flow even though that is an available option in Edit Studies.
        Alex
        Attached Files

        Comment


        • #5
          Hi Alexis,

          Thank you very much for the new file. Yes, I noticed the length did not change in the Edit Studies with the original efs file.

          Unfortunately, the cmf histogram still goes blank or just shows vertical lines within 5 mins of bringing it up even with the new file. The only way I found to get the histogram to display again is to slightly scroll my chart.

          Thanks,
          sfwc

          Comment


          • #6
            Hello sfwc,

            What symbol and interval are you currently using?
            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


            • #7
              sfwc
              It is possible that it is a data related issue as has been suggested. Have you tried restarting eSignal?
              Also what version of the software are you running (including build - see in Help->About)?
              Alex

              Comment


              • #8
                Yes, I restarted eSignal, but after 5 mins the display problem arises. I'm using version 7.6(Build 636A) 3/29/04, symbol ES Z4 with both 200t and 3 min charts.

                Thanks,
                sfwc

                Comment


                • #9
                  Hello sfwc,

                  I've discovered a possible divide by zero error in the formula that we weren't checking for. I think that may be what is causing the problem. Update your formula with the one below and test it. Let me know if this didn't fix the problem for you. I'll have our product manager update the newer installers with this corrected version as well.

                  cmf.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


                  • #10
                    Hi Jason,

                    Thanks for working on the file. I no longer have the display problems. Just wondering, is there a way to keep the histogram(zero line) centered?

                    Thanks for your help.

                    -sfwc

                    Comment


                    • #11
                      Hello sfwc,

                      Well, there are two options. For one, we do have the setStudyMax(nNum) and setStudyMin(nNum) functions you could add to preMain(). However, the absolute Max and Min values of the study are variable. If those numbers aren't set far enough away from the data, some of the histogram bars may go beyond the visible window. Another option is to squeeze the y-axis by clicking on the y-axis next to the study pane and drag your mouse down. This will turn off auto-scaling for the study and keep the zero line at a fixed position. However, that position may not be exactly centered in the study pane.
                      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
                        Hi Jason,

                        I'm trying out the second option, turning off the auto-scaling.

                        Thanks so much for all of your help and timely responses. I really appreciate it.

                        -sfwc

                        Comment


                        • #13
                          CMF

                          Is it possible to change the CMF.EFS file to show GREEN bars when it is above the ZERO line and RED when it is below the ZERO line?
                          Thanks for your time......

                          Comment


                          • #14
                            gwika
                            Open the efs with the Editor and in line 42 of the script paste the contents of the box below
                            Alex

                            PHP Code:
                            if((vSum/vSumVolume)>=0)
                                    
                            setBarFgColor(Color.green);
                                else
                                    
                            setBarFgColor(Color.red); 

                            Comment


                            • #15
                              THX's

                              Mr. Montenegro:
                              Thanks for your time.
                              Works like a charm......
                              Cheers

                              Comment

                              Working...
                              X