I'm trying to capture the value of an indicator and price at close when a condition is met. I would then like to compare these values against past values. I can print those values when the condition is met, but I don't know how to capture those values in order to compare them to a past occurrence. Can someone give me an idea how this could be accomplished? Thanks.
double iclosevalue = RSValue(3, period).iClose[0]; double priceaticlose = Close[0]; if (RSValue(3, period).iClose[1] < 4 && RSValue(3, period).iClose[0] > 4) { Print("The current iClose is " + iclosevalue.ToString()); Print("The current Close is " + priceaticlose.ToString()); }
Comment