There is no need to NormalizeDouble on the Bid.
Also be careful with the scope of your variables. Only static variables or variables with global scope will hold their value between calls. Local variables will not.
It would be a lot easier to use OnTimer().
As you're using the predefined variable Bid, I'm surmising this is MQL4? In which case I'll move to the MQL4 section.
Are you testing it through strategy tester?
OnTimer() doesn't work in the strategy tester.
Add your EA to a live chart (it doesn't matter that the markets are closed - you don't need a tick)