Announcement

Collapse
No announcement yet.

process iteration

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

  • process iteration

    Would someone kindly indicate how to iterate a process as I am at wits end.

    Basically, I am trying to encase an open position with a stop loss and P/T drawn on the chart (see encl.).
    I only can get the initial drawing but not till the end or when *_id are != 0.

    if ((ts_order_id == 0) && (pt_order_id == 0))
    return 0;
    else
    {
    drawShapeRelative(0, set_pt, Shape.DIAMOND, null, Color.blue, Shape.ONTOP, "PTTSLprofit"+nArrow);
    drawShapeRelative(0, set_ts, Shape.DIAMOND, null, Color.red, Shape.ONTOP, "PTTSLloss"+nArrow);
    nArrow++
    }

    Cheers

    AD
    Attached Files

  • #2
    In your posted code you are missing a comma in your drawShape.. statements and a semicolon after the nArrow++. This can cause execution problems that may not flag an error from the editor or efs engine.

    Comment


    • #3
      Oops, sorry! It seems one has to be extra careful in checking one's code.

      Cheers
      AD

      Comment

      Working...
      X