int bindDate = GlobalVariableGet("Date"); if (bindDate != Day() && Hour() > 5) { // code here GlobalVariableSet("Date", Day()); }
bindDate is previos date. it needs because to send order once of day
Hi antslag for your quick reply, but I did not understand the
If (bindDate !=Day() ... because I want to trade in the current day,
but only after 5.00 hour :-).
What´s about the second question ?
Thanks again
Fabio
Try to use Timeseries functions like iClose(), iTime() and so on. These functions let you use different time frame in your EA, and so you will be able to know the exact time in hours and minute.
Try to use Timeseries functions like iClose(), iTime() and so on. These functions let you use different time frame in your EA, and so you will be able to know the exact time in hours and minute.
Thanks a lot ;-)
The problem was that I had to use with the strategy tester the M5 timeframe ;-)
Fabio
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can somebody help me on thefollowing two questions ;
1) I would like to write a code as follows
if current time > 5 hours 0 min 0 secs then .....
how I should write the code ?
2) In my EA I use 3 different timeframes : H4,H1,M5.
The Straegy Tester shows me only H4 and H1 and not M5 .
Can you explain why ?
Thanks in advance