Hi,
Trying to find if the current price(close) is more than X% than lowest green candle's close price, during the reg session (or at least within last X bars). Is there better way to code this?
Trying to find if the current price(close) is more than X% than lowest green candle's close price, during the reg session (or at least within last X bars). Is there better way to code this?
Code:
plot digg =
(close[1] > open[1] and SecondsFromTime(0930)[1] > 0 and (close/close[1]-1)*100>1) or
(close[2] > open[2] and SecondsFromTime(0930)[2] > 0 and (close/close[2]-1)*100>1) or
(close[3] > open[3] and SecondsFromTime(0930)[3] > 0 and (close/close[3]-1)*100>1) or
(close[4] > open[4] and SecondsFromTime(0930)[4] > 0 and (close/close[4]-1)*100>1) or
(close[5] > open[5] and SecondsFromTime(0930)[5] > 0 and (close/close[5]-1)*100>1) or
(close[6] > open[6] and SecondsFromTime(0930)[6] > 0 and (close/close[6]-1)*100>1)
# and so on...
;
diff.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Last edited: