Announcement

Collapse
No announcement yet.

drawLineRelative in non price pane

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

  • drawLineRelative in non price pane

    Hi

    Can drawLineRelative() be used in a non-price study?
    I am using the following inside a function in a non price study:

    for(var i = -numbBar+1; i <= 0; i++) {
    if(show2) {
    if(period1 != 0) val1 = value1;
    if(period2 != 0) val2 = value2;
    }

    if(showSum && (period2 != 0)) valSum = val1+value2;
    drawLineRelative(i, val1, i, val1, PS_SOLID, 1, Color.red, 100);
    debugPrintln(val1, " ", val2, " ", valSum, " ", i,"x ");
    }

    The correct values of val1, val2 and valSum are being calculated but nothing is printing? I have no idea why. Any suggestions anyone may be able to offer would be greatly appreciated. Thank you very much.
    Regards,
    Jane

  • #2
    Re: drawLineRelative in non price pane

    Jane

    Can drawLineRelative() be used in a non-price study?
    Yes it can (see enclosed screenshot). You may need to provide a complete code example that illustrates the issue as the snippet you posted is not sufficient to determine what this may be
    Alex




    Originally posted by jg
    Hi

    Can drawLineRelative() be used in a non-price study?
    I am using the following inside a function in a non price study:

    for(var i = -numbBar+1; i <= 0; i++) {
    if(show2) {
    if(period1 != 0) val1 = value1;
    if(period2 != 0) val2 = value2;
    }

    if(showSum && (period2 != 0)) valSum = val1+value2;
    drawLineRelative(i, val1, i, val1, PS_SOLID, 1, Color.red, 100);
    debugPrintln(val1, " ", val2, " ", valSum, " ", i,"x ");
    }

    The correct values of val1, val2 and valSum are being calculated but nothing is printing? I have no idea why. Any suggestions anyone may be able to offer would be greatly appreciated. Thank you very much.
    Regards,
    Jane

    Comment


    • #3
      Re: Re: drawLineRelative in non price pane

      Hi Alex,

      Thank you very much for your reply. I think there may be other issues in the code that are preventing the drawing of the line. I need to find them first. Once again, many thanks for all your help.
      Regards,
      Jane

      Originally posted by Alexis C. Montenegro
      Jane



      Yes it can (see enclosed screenshot). You may need to provide a complete code example that illustrates the issue as the snippet you posted is not sufficient to determine what this may be
      Alex

      Comment


      • #4
        Re: Re: Re: drawLineRelative in non price pane

        Jane
        You are welcome
        Alex


        Originally posted by jg
        Hi Alex,

        Thank you very much for your reply. I think there may be other issues in the code that are preventing the drawing of the line. I need to find them first. Once again, many thanks for all your help.
        Regards,
        Jane

        Comment

        Working...
        X