adamsj1267
New member
### i need help with this code
### this code plots one arrow if true i would like to continue plotting the arrow until its false. thanks
input price = close;
input length = 15;
input averageType = averageType.simple;
input crossingType = {default above, below};
def avg = MovingAverage(averageType, price, length);
plot signal = crosses(price, avg, crossingType == CrossingType.above);
signal.DefineColor("above", GetColor(1));
signal.DefineColor("below", GetColor(1));
signal.AssignValueColor(if crossingType == CrossingType.above then signal.color("above") else signal.color("below"));
signal.SetPaintingStrategy(if crossingType == CrossingType.above
then PaintingStrategy.boolean_arrow_up
else PaintingStrategy.boolean_arrow_dn);
### this code plots one arrow if true i would like to continue plotting the arrow until its false. thanks
input price = close;
input length = 15;
input averageType = averageType.simple;
input crossingType = {default above, below};
def avg = MovingAverage(averageType, price, length);
plot signal = crosses(price, avg, crossingType == CrossingType.above);
signal.DefineColor("above", GetColor(1));
signal.DefineColor("below", GetColor(1));
signal.AssignValueColor(if crossingType == CrossingType.above then signal.color("above") else signal.color("below"));
signal.SetPaintingStrategy(if crossingType == CrossingType.above
then PaintingStrategy.boolean_arrow_up
else PaintingStrategy.boolean_arrow_dn);