![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello guys,
I am newbie here. I feel like this script should be very easy, but i don't get it why it don't work.
I want to write script which would give me open price of exact time. Let's say i start script 8:00 and i want that at 13:00 it would give me open price of bar at 13:00.
It's part of my scirpt:
while(TimeHour(TimeCurrent())<13){;}
while(TimeMinute(TimeCurrent())<00){;}
open=DoubleToString(iOpen[0],4);
As i understand what should happen is: 1: it would wait till 13 hour 2. It would wait till 00 minute 3. It would give my current open (13"00 open). Instead i get 8:00 open. Why?