Announcement

Collapse
No announcement yet.

month(0) returning 2 for Jan in Weekly chart

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

  • month(0) returning 2 for Jan in Weekly chart

    Today’s day is 1/30/08

    Why is vMonth returning 1 in the daily and monthly chart but returning 2 in the Weekly? Is there something wrong with weekly chart?


    function preMain() {

    setPriceStudy(true);
    setStudyTitle("Weekly Test");
    setShowCursorLabel(false);
    setShowTitleParameters(false);
    setComputeOnClose();
    }

    function main() {

    vMonth = month(0);
    drawTextAbsolute(0, high(0), vMonth, Color.white, Color.green, Text.BOTTOM | Text.ONTOP | Text.BOLD, null, 28, 1);
    }

    Thank you

    Ketoma
    Attached Files

  • #2
    Re: month(0) returning 2 for Jan in Weekly chart

    Ketoma
    As I understand it weekly bars are time stamped with the date of the end of the period which in this case is February 1st (see the date on the x-axis label in the enclosed screenshot)
    Alex



    Originally posted by ketoma21
    Today’s day is 1/30/08

    Why is vMonth returning 1 in the daily and monthly chart but returning 2 in the Weekly? Is there something wrong with weekly chart?


    function preMain() {

    setPriceStudy(true);
    setStudyTitle("Weekly Test");
    setShowCursorLabel(false);
    setShowTitleParameters(false);
    setComputeOnClose();
    }

    function main() {

    vMonth = month(0);
    drawTextAbsolute(0, high(0), vMonth, Color.white, Color.green, Text.BOTTOM | Text.ONTOP | Text.BOLD, null, 28, 1);
    }

    Thank you

    Ketoma

    Comment


    • #3
      wow that was a quick reply

      now I understand

      Thank you Alexis

      Comment


      • #4
        Ketoma
        You are most welcome
        Alex


        Originally posted by ketoma21
        wow that was a quick reply

        now I understand

        Thank you Alexis

        Comment

        Working...
        X