If you want to enter a trade at a certain price, you normally use an entry stop. For entering when tomorrow's price drops below today's open - 50 pips, the code would look like this:

Entry = priceOpen() - 50*PIP;
if(priceClose() > Entry) enterShort();

I'm not sure if you really want this, though. For a range breakout you normally use the current price and not the open from 24 hours ago. A normal entry stop code would look like this:

Entry = priceClose() - 50*PIP;
enterShort();