Thanks for your reply.
I've already discussed in this thread how to save the variables used to create the ray so that when the conditions require you can then change the color of the ray. If you are unsure, please reread the thread as well as the helpguide section listed in the previous replies.
That leaves us with figuring out how to determine when the close of two successive bars close above the Ray. You appear to be drawing a flat ray as evidenced by the Y1 and Y2 values being exactly the same. So what we need to do is to save the Y1 value like this:
Y1 = High[0]+((TickSize*2)*2);
Finally to test for the close:
if (Close[1] > Y1 && Close[0] > Y1)
{
DrawRay (....)
}
Comment