Hello,
i haven an code, which is running every day one.
this is working propper, but on an backtest, it always running 2 times
code:
as Hour() i use as exempla 10 which means 10:00 and as minute i use 0
on Live trading this code working, only on backtesting this will run at 10:00 and 10:01
2015.01.29 19:31:35.821 2014.01.27 07:01:00 buy stop 0.10 EURUSD at 1.37114 sl: 1.36264 (1.36823 / 1.36832 / 1.36823)
2015.01.29 19:31:35.821 2014.01.27 07:01:00 order canceled [#7 buy stop 0.10 EURUSD at 1.37114]
2015.01.29 19:31:35.821 2014.01.27 07:01:00 Ticketnummer: 1
2015.01.29 19:31:35.821 2014.01.27 07:01:00 EURUSD LS_Trendfilter - EMA50_0: 1.36331 - EMA50_1: 1.36311 - EMA direction: EMA_Long - Kerzen: Kerzen Long
2015.01.29 19:31:35.821 2014.01.27 07:00:00 buy stop 0.10 EURUSD at 1.37114 sl: 1.36264 (1.36824 / 1.36833 / 1.36824)
i always was thinking, the code will run one time from the top to the botton, but i registerd, that on backtesting it runs 2 times
any ideas?
amando
What is Hour() and Minute() functions, there is no such function with mql5.
right, i use time conversation from mql4, comes direct from an include
int Hour() { MqlDateTime tm; TimeCurrent(tm); return(tm.hour); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int DayOfWeek() { MqlDateTime tm; TimeCurrent(tm); return(tm.day_of_week); } //+------------------------------------------------------------------+ int TimeDayOfWeek(datetime date) { MqlDateTime tm; TimeToStruct(date,tm); return(tm.day_of_week); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int Minute() { MqlDateTime tm; TimeCurrent(tm); return(tm.min); }
is there any idea?
amando
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
i haven an code, which is running every day one.
this is working propper, but on an backtest, it always running 2 times
code:
as Hour() i use as exempla 10 which means 10:00 and as minute i use 0
on Live trading this code working, only on backtesting this will run at 10:00 and 10:01
2015.01.29 19:31:35.821 2014.01.27 07:01:00 buy stop 0.10 EURUSD at 1.37114 sl: 1.36264 (1.36823 / 1.36832 / 1.36823)
2015.01.29 19:31:35.821 2014.01.27 07:01:00 order canceled [#7 buy stop 0.10 EURUSD at 1.37114]
2015.01.29 19:31:35.821 2014.01.27 07:01:00 Ticketnummer: 1
2015.01.29 19:31:35.821 2014.01.27 07:01:00 EURUSD LS_Trendfilter - EMA50_0: 1.36331 - EMA50_1: 1.36311 - EMA direction: EMA_Long - Kerzen: Kerzen Long
2015.01.29 19:31:35.821 2014.01.27 07:00:00 buy stop 0.10 EURUSD at 1.37114 sl: 1.36264 (1.36824 / 1.36833 / 1.36824)
i always was thinking, the code will run one time from the top to the botton, but i registerd, that on backtesting it runs 2 times
any ideas?
amando