Topic: Problem: IsOutOfSession always returns 'true'
I created a new EURUSD, H1, Portfolio Expert with nearly 100 strategies -- and it never trades. In the past, when I've created similar EAs there would be between 10-30 trades per day.
I added a few Print statements to the code and it appears that IsOutOfSession() always returns 'true'. IsOutOfSession() checks for 'weekDay' and then sets 'skipTrade' to true or false. In my case it appears to always get set to 'true'.
else if(weekDay<5)
{
int lastBarFix=sessionCloseAtSessionClose ? periodLength : 0;
skipTrade=timeFromMidnight<sessionMondayThursdayOpen || timeFromMidnight+lastBarFix>sessionMondayThursdayClose;
}
When IsOutOfSession() returns 'true' then it immediately returns from OnBar() and trading will never occur.
Is this a bug or do I have some setting that is wrong. Thanks...