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
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
Comment