DC demo is doing rather well.
Trading system using relative strength 2,816 replies
BASKET TRADE Management: Using multiple trade management EA's on basket trades 11 replies
Basket Knights - A Basket Trading Round Table 1,313 replies
Trading System Using Relative Strength-Part 2 1,499 replies
My version of a relative strength basket 2 replies
if (UseAsiaTimeFilter)
{
if (hours >= AsiaStartTime || hours <= AsiaEndTime) IsAsianSession=true;
}//if (UseAsiaTimeFilter) if (UseAsiaTimeFilter)
{
if (AsiaStartTime > AsiaEndTime)
{
if (hours >= AsiaStartTime || hours <= AsiaEndTime) IsAsianSession=true;
}//if (AsiaStartTime > AsiaEndTime)
else if (hours >= AsiaStartTime && hours <= AsiaEndTime) IsAsianSession=true;
}//if (UseAsiaTimeFilter) void CheckTradingTimes()
{
// Sets the trading time filters
/*
extern bool UseAsiaTimeFilter=true;
extern int AsiaStartTime=22;
extern int AsiaEndTime=8;
extern bool UseLondonTimeFilter=true;
extern int LondonStartTime=8;
extern int LondonEndTime=16;
extern bool UseNewYorkTimeFilter=true;
extern int NewYorkStartTime=13;
extern int NewYorkEndTime=21;
bool IsAsianSession=false;
bool IsLondonSession=false;
bool IsNewYorkSession=false;
*/
IsAsianSession=false;
IsLondonSession=false;
IsNewYorkSession=false;
int hours = TimeHour(TimeLocal());
if (UseAsiaTimeFilter)
{
if (hours >= AsiaStartTime || hours <= AsiaEndTime) IsAsianSession=true;
}//if (UseAsiaTimeFilter)
if (UseLondonTimeFilter)
{
if (hours >= LondonStartTime && hours <= LondonEndTime) IsLondonSession=true;
}//if (UseLondonTimeFilter)
if (UseNewYorkTimeFilter)
{
if (hours >= NewYorkStartTime && hours <= NewYorkEndTime) IsNewYorkSession=true;
}//if (UseLondonTimeFilter)
}// End void CheckTradingTimes() DislikedSteve.
You have if (hours >= AsiaStartTime || hours <= AsiaEndTime) IsAsianSession=true;
Shouldnt it be if (hours >= AsiaStartTime && hours <= AsiaEndTime) IsAsianSession=true;
??Ignored
void CheckTradingTimes()
{
// Sets the trading time filters
/*
extern bool UseAsiaTimeFilter=true;
extern int AsiaStartTime=22;
extern int AsiaEndTime=8;
extern bool UseLondonTimeFilter=true;
extern int LondonStartTime=8;
extern int LondonEndTime=16;
extern bool UseNewYorkTimeFilter=true;
extern int NewYorkStartTime=13;
extern int NewYorkEndTime=21;
bool IsAsianSession=false;
bool IsLondonSession=false;
bool IsNewYorkSession=false;
*/
IsAsianSession=false;
IsLondonSession=false;
IsNewYorkSession=false;
int hours = TimeHour(TimeLocal());
if (UseAsiaTimeFilter)
{
if (AsiaStartTime > AsiaEndTime)
{
if (hours >= AsiaStartTime || hours <= AsiaEndTime) IsAsianSession=true;
}//if (AsiaStartTime > AsiaEndTime)
else if (hours >= AsiaStartTime && hours <= AsiaEndTime) IsAsianSession=true;
}//if (UseAsiaTimeFilter)
if (UseLondonTimeFilter)
{
if (LondonStartTime > LondonEndTime)
{
if (hours >= LondonStartTime || hours <= LondonEndTime) IsLondonSession=true;
}//if (LondonStartTime > LondonEndTime)
else if (hours >= LondonStartTime && hours <= LondonEndTime) IsLondonSession=true;
}//if (UseLondonTimeFilter)
if (UseNewYorkTimeFilter)
{
if (LondonStartTime > LondonEndTime)
{
if (hours >= NewYorkStartTime || hours <= NewYorkEndTime) IsNewYorkSession=true;
}//if (LondonStartTime > LondonEndTime)
else if (hours >= NewYorkStartTime && hours <= NewYorkEndTime) IsNewYorkSession=true;
}//if (UseLondonTimeFilter)
}// End void CheckTradingTimes() DislikedAlso Steve, even though I have the CHF, AUD, NZD turned off in the Triggers, they still show as enabled. and also validating a bunch of AUD trades, which it shouldn't.
CiaoIgnored
DislikedHi Steve
$$$$ everyone
If you like, I could point you to some freely available code to handle time zones - quite a few eas have something of the sort. (You need to provide for differences between brokers - mt4 uses gmt in principle only.)
JunjaIgnored
DislikedYour set file has the EA trading the DC with all triggers turned on. It worked fine when I loaded it into the EA.
Ignored