Help with a bit of Code

 
Hey guys, I'm trying to write a custom expert, but it's been a long while since I've programmed in C or C++.

I'm able to check an open and close of a previous bar, and if the condition that I want is met, then I want it to wait to check new price data that is coming in and to execute my order when the new price data reaches a certain point.

How would I go about doing this?

Thanks in advance