Hi Steve, I think I'm going to give your Scoobs TCF v2 EA a try but thought I'd bring this up if you care or not to fix but most if not all EA's that people create have this single hour sequence for determining Time of Day trading for Trading Hours which does not always work, eg;
So if I wanted to only trade overnight, TradeHourStart=16:00 to TradeHourStop=05:00 you see how these times will not work and the EA will not trade because, eg if it's 01:00 then TimeHour(TimeLocal()) < TradeHourStart, EA will not trade even though I want it to.
Anyway, I've fixed this and if you want to use this code I use you can
Inserted Code
extern string tt="----Trading hours----"; extern int TradeHourStart=0; extern int TradeHourStop=24; if (TimeHour(TimeLocal()) < TradeHourStart || TimeHour(TimeLocal()) > TradeHourStop) { Comment(Gap, "Trading suspended - outside trade hours"); return; }
Anyway, I've fixed this and if you want to use this code I use you can
Inserted Code
extern string Trade_Hours= "Set Morning & Evening Hours 24hr"; extern string Trade_Hours_M= "Morning Hours 0-12"; extern int start_hourm = 0; extern int end_hourm = 12; extern string Trade_Hours_E= "Evening Hours 12-24"; extern int start_houre = 12; extern int end_houre = 24; TradeHour = false; if ((Hour()>=start_hourm && Hour()<end_hourm) || (Hour()>=start_houre && Hour()<end_houre)) TradeHour = true;
24 hours in a day – 24 bottles of beer in a case – Coincidence? I think not