There is something that escapes to my understanding here. Supose you take the following script:

function run()
{
BarPeriod = 1440;

vars A1 = series(priceClose(2));
vars A2 = series(priceClose(1));
vars A3 = series(price(0));
//Vlr = 10*PIP


if (A1[0] < A2[0] and A3[0] < A1[0]) enterLong();
if (A1[0] > A2[0] and A3[0] > A1[0]) enterShort();

//Stop = 30*PIP;
//TakeProfit = 500*PIP;
ExitTime = 1;

}

It gives the following results:

A1,A2,A3 compiling................
Error 055: EUR/USD 2014 price history missing
BackTest: A1,A2,A3 EUR/USD 2009..2014
Profit -33$ MI -1$ DD 33$ Capital 32$
Trades 176 Win 0% Avg -2.4p Bars 2
AR -26% PF 0.00 SR -8.92 UI 0.0% Error 64%


As you can see there is Win 0% and this can not be. If it really would close at the Close of present bar or Open of next bar, there should be some % of win. It could be small but not 0%.

So ExitTime = 1, I don't know exactly where it closes the open position. Or the entry point doesn't happen exactly at the moment indicated in the script. Any light about this?

Last edited by Mangal; 02/25/14 02:25.