For those that want to tally the PnL for themselves, here is (really quick and dirty) C# program that computes it. All you have to enter is the entries like this. Say you sold 1300, then exited and went long at 1305, then exited and went flat at 1302. The entry on the command line is: -1300, 1305, -1302 Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ComputeProfitConsoleApplication { class Program { static void Main(string[] args) { string entries = Console.ReadLine(); string[] prices = entries.Split(','); double entry = 0; double exit = 0; double PnL = 0; int trade = 0; foreach (string priceStr in prices) { double tradePrice = double.Parse(priceStr); if (0 == trade) { entry = tradePrice; entry *= -1; trade++; } else { trade+= 2; exit = tradePrice; exit *= -1; PnL += entry + exit; entry = exit; } } trade -= 1; Console.WriteLine("PNL = {0} Number of trades = {1}", PnL, trade); Console.ReadLine(); } } } A good exercise for budding programmers is to modify the above program so as only to have the user enter the sign of the first trade, then the program figures out the rest. This is fine for the crossover system because that is always in the market and is always flipping. This is way less error prone since you only have to input prices like this: -1300, 1305, 1302 and the program figures out whether it was a long or short trade after the first one. It is a good exercise and interesting to turn this program into F#.
02/02/2012 09:08:06 OFV = 1326.43800005003 Buy at 1326.02 02/02/2012 09:08:42 OFV = 1325.77119327726 Sell SPX at 1326.23 I had a meeting very early this morning. Ran the program under the debugger and left for a meeting. Forgot I had a breakpoint, so when I came back, no simmulations had occurred because the program had stopped on the breakpoint. Hence only two trades so far this morning except the two above when I just restarted the program Soon all of this will be very smooth.
02/02/2012 09:34:21 OFV = 1327.61840213299 Buy SPX at 1326.54 02/02/2012 09:41:05 OFV = 1326.96788658716 Sell SPX at 1327.78 02/02/2012 09:42:56 OFV = 1328.08198665345 Buy SPX at 1328.08 02/02/2012 09:43:32 OFV = 1327.29473001006 Sell SPX at 1328.05
SPX, 1321.6. FV, 1144.49. OFV, 1319.55. POFVF, 1312.37 02/02/2012 11:23:06 OFV = 1323.36075637333 Sell SPX at 1324.01