Backtesting code

Hi;
I am already able to capture the number of long trades and the number of short trades generated for the current date for my strategy.
Now my next targets are to capture:
TOTAL NUMBER OF LOSS TRADES FOR THE DAY
TOTAL NUMBER OF PROFIT TRADES FOR THE DAY
TOTAL LOSS/PROFIT FOR THE DAY
HIGHEST AND LOWEST PROFIT / LOSS IN ANY TRADE ON CURRENT DATE

Please give me some hint codes and I will work on it and do it.
I am a new bee and a non tech guy, please help.

REGARDS

SANTOSH PADHY