Announcement

Collapse
No announcement yet.

drawShapeAbsolute

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

  • drawShapeAbsolute

    I know there's a simple answer, and I tried KB but didn't find anything. I'm new . . .

    for (i=1;i<=5;i++) {
    debugPrintln (arLow[i]);
    drawShapeAbsolute (-i, arLow[i], Shape.SQUARE, null, Color.red, Shape.BOTTOM)
    }

    This script only draws one square for bar -5 at the correct price for this bar. The debug line is in to check the values in the array, and they are all correct and all print in the formula output window. Why am I only getting one sqaure? Thanks.

  • #2
    rauthur
    It draws only one shape because you did not add a tagID. Try the following
    [i]drawShapeAbsolute (-i, arLow, Shape.SQUARE, null, Color.red, Shape.BOTTOM, "shape"+i)
    This should draw the correct number of shapes
    Alex

    Comment


    • #3
      Originally posted by Alexis C. Montenegro
      rauthur
      It draws only one shape because you did not add a tagID. Try the following
      [i]drawShapeAbsolute (-i, arLow, Shape.SQUARE, null, Color.red, Shape.BOTTOM, "shape"+i)
      This should draw the correct number of shapes
      Alex
      Great. I wondered what all those gID() functions were for in the scripts, so now I know. Thanks.

      Comment

      Working...
      X