Hi,
I'm trying understand the TimeFrame and have this simple code:

Quote:

//--------------- Frame 10 ---------------
int Frame10(){
TimeFrame= 10;
static int nCount=0;
nCount++;

if (nCount > 6) { // <== line 7 order
enterShort();
nCount = 0;
}

return 0;
}

function run()
{
StartDate = 20160101;
EndDate=20160131;
set(LOGFILE);
BarPeriod = 1; // 1 minute bars
Hedge = 2;
Stop=1000*PIP;
TakeProfit=1000*PIP;

Frame10();
}


a) in code change on line 7:
with number 3-5-7... system not open orders...
with number 2-4-6... system open orders...
b) with 6 open but first order is a wrong time:

Quote:

Name,Type,Asset,ID,Lots,Open,Close,Entry,Exit,Profit,Roll,ExitType
xtest,Short,EUR/USD,9001,1,2016-01-04 00:30,2016-01-31 23:58,1.0848,1.0826,1.90,0.02,Sold
xtest,Short,EUR/USD,16002,1,2016-01-04 01:40,2016-01-31 23:58,1.0841,1.0826,1.30,0.02,Sold
xtest,Short,EUR/USD,23003,1,2016-01-04 02:50,2016-01-31 23:58,1.0868,1.0826,3.64,0.02,Sold
xtest,Short,EUR/USD,30004,1,2016-01-04 04:00,2016-01-31 23:58,1.0872,1.0826,4.00,0.02,Sold