When I set StartDate = 20150101 and StartWeek the logs still start at different times:

Code:
60:
Test: Test EUR/USD 2015..2016
[1: Fri 02.01.15 02:00]  1.20660

1440:
Test: Test EUR/USD 2015..2016
[1: Tue 06.01.15 00:00]  1.19460



The results differ less but the number of trades is still different and the times at which they are entered do not match either.

Since 20150101 is actually a holliday i tried with StartDate = 20150105.

The log with 60 now starts at the expected time. The log with 1440 has the first line with Tue 06.01.15.

The initial trades now seem to be entered at the same time and the stop loss is also triggered at the same time. But the entry and exit price is slightly different between both logs:

Code:
60:
[47: Wed 07.01.15 00:00]  -2 +0 0/1
[EUR/USD::L4702] Long 1@1.1872 Risk 2$  at 00:00
...
[EUR/USD::L4702] Stop 1@1.1852: -1.83 at 09:59

1440:
[2: Wed 07.01.15 00:00]  -2 +0 0/1
[EUR/USD::L0202] Long 1@1.1870 Risk 2$  at 00:00
[EUR/USD::L0202] Stop 1@1.1850: -1.82 at 09:59



The number of trades is also off by 1.

The trade that is entered on Monday 19.01.15 is stopped out at a different time:

Code:
60:
[231: Mon 19.01.15 00:00]  -17 +0 0/9
[EUR/USD::L3110] Long 1@1.1561 Risk 2$  at 00:00
...
[273: Tue 20.01.15 18:00]  -17 -1 0/10
[EUR/USD::L3110] Stop 1@1.1541: -1.83 at 18:14

1440:
[10: Mon 19.01.15 00:00]  -16 +0 0/9
[EUR/USD::L1010] Long 1@1.1559 Risk 2$  at 00:00

[11: Tue 20.01.15 00:00]  -16 +3 1/9
[12: Wed 21.01.15 00:00]  -16 -1 0/10
[13: Thu 22.01.15 00:00]  -16 +5 1/9
[EUR/USD::L1010] Stop 1@1.1538: -1.85 at 13:41



Trade L7911 from the 60 log does not happen in the 1440 log.

Trade L1512 from 1440 and L4713 from 60 are started at the same time but the stop time does not match. The same goes for L4918 from 1440 and L1619 from 60.

These seem to be all the differences. Is this a bug?

Current code:
Code:
function run()
{
	set(TICKS + LOGFILE);
	LookBack = 0;
	
	StartDate = 20150105;
	EndDate = 20160105;
	StartWeek = 10000;
	
	if (0)
	{
		BarPeriod = 1440;
		TimeFrame = 1;		
	}
	else
	{
		BarPeriod = 60;
		TimeFrame = frameSync(24);		
	}
	
	asset("EUR/USD");
	
	Stop = 20 * PIP;
	if (NumOpenTotal == 0)
		enterLong();
}



Attached Files
Testtest60.txt (1 downloads)
Testtest1440.txt (1 downloads)
Last edited by trenki2; 08/19/16 16:20.