Manual backtesting codes

MINPROFITTRADE = HighestSince (isStartOfDay, longProfit + shortProfit)>3;
// Is the same as
HH = HighestSince (isStartOfDay, longProfit + shortProfit);
// is the highest sum of longProfit + shortProfit greater than 3 ?
MINPROFITTRADE = HH > 3; 

Thanks a lot.
And just a last thing how to get the sum total of all the loss making trades...

HH = HighestSince (isStartOfDay, longProfit + shortProfit);
MINPROFITTRADE = HH > 3; 

This also gives output as 0 / 1 not the desired out put.

I did not give an answer to your problem, I show you where is your problem, but it seams that you cannot understand the basic, so I really recommend you to hire a programmer