Announcement

Collapse
No announcement yet.

$COMPQ Volume Histogram

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

  • $COMPQ Volume Histogram

    Hi Jay,

    I'm amazed - I've been wishing for Nasdaq intraday volume forever it seems, and here it is! Has it ever been modified to show green/red bars for up/down volume (hopefully based on closing values)?

    Reagrds
    shaeffer

  • #2
    shaeffer
    If you want the histogram to be colored based on Close >/< Open then add the following just above the return new Array(vValue, vAvgVol); line;

    if(close()>open())
    setBarFgColor(Color.green,0);
    if(close()<open())
    setBarFgColor(Color.red,0);


    If instead you want to color it based on the volume being >/< prior volume then add the following

    if(vArray[0]>vArray[1])
    setBarFgColor(Color.green,0);
    if(vArray[0]<vArray[1])
    setBarFgColor(Color.red,0);


    Hope this helps
    Alex

    Comment


    • #3
      Alexis,
      can you also make the histogram colored based on the comparison between the closes of the previous and present periods?

      Comment


      • #4
        pinesol
        Replace open() with close(-1) in the sample code
        Alex

        Comment


        • #5
          Alexis,
          Thank you for your prompt reply.

          I have another favor to ask of you.

          With the attached volume_with MA file, can you also set the color of the bars green or red based on the same close()>close(-1) or close()<close (-1).

          I am kind of new and hope that I will learn these things quickly with your help. Thanks again.
          Attached Files

          Comment


          • #6
            pinesol
            In lines 57 and 58 of the script replace vOpen with close(-1)
            Alex

            Comment


            • #7
              Alexis,

              Thanks for your wonderful and prompt help.

              Comment


              • #8
                pinesol
                The pleasure is mine
                Alex

                Comment

                Working...
                X