formulas for spreadsheet for trading log

Discussion in 'Trading Software' started by clambill, Jul 28, 2008.

  1. OK, I did a search on this forum and I also looked at some of the Excel video tutorials on youtube at
    I find those videos pretty good and everything but I did the following....(look at screenshot)

    (BTW, those are totally fictitious numbers. I have not traded those stocks nor have I even paper traded those stocks. And the reason why I put $25 in commissions which you can’t see in there anyway is because I have TradeFreedom which is the cheapest broker I could find in Canada that requires less than $10,000 as a minimal amount.)

    Anyway, the formulas used were for example for the “profit or loss” column E: =C3*D3-B3*D3 and for total profit or loss: (D3:D7). I can use explanations for Excel although I’m really using Works 2000.

    So, what I want to know is does anyone know what formulas I need to use for “% of winners”, “avg P/L per trade” and “avg % loss on losers”?
  2. Bob111


  3. Boib


    Excel has an “If” function:

    Set up a column with this function so that IF the trade is a win THEN value =1 if not then value =0.

    Set up another column so the IF trades is a loss THEN value =1 if not then value =0.

    Total each column. This give you the number of wins and losses. You can then figure out percentages.

    You can do the same thing for the amounts of your wins and losses.
    IF trades is a win THEN value =the amount of the win; if not then value =0
    IF trades is a loss THEN value =the amount of the loss; if not then value =0.

    Total each column and divide by the number of wins or losses to give you an average win /loss amount and you can figure out percentages .

    I don’t know if "Works" will let you do this. You might try “Open Office” it’s supposed to be a free excel clone.
  4. Wow, thank you both for making an effort to be helpful.

    You mean the open office at

    This is great. I didn't know there was a free software program like that. :)
  5. dan_s


    You also might want to check out the COUNTIF and SUMIF functions. You can get decent help online if you google excel function names.

    I haven't tried it, but I'm pretty sure MS Works supports all of the basic Excel functionality (including if functions).
  6. Bob111


  7. OK IT’S ALMOST ALL DONE!!! :) Of course, I noticed I forgot to add a formula for when I take on a short position. That’s the only issue now and it’s kind of weird because I don’t know how to correct that yet. So, I guess I’d have to temporarily have one spreadsheet for long positions and another one for short positions. This might not be a bad idea since it would allow me to analyze results separately.

    I'm going to add 2 screenshots if you have a hard time following what I’m talking about here. These “formulas” were all typed in the free Open Office program found on the link listed above. The screenshots are also from that program. The other little odd thing is if you want to do this spreadsheet, then for practical reasons you might actually want to put rows 9 to 22 on the side instead. This is because every time you’d want to add another line, you’d end up pushing back the information on the bottom.

    Here we go. The “formulas” I typed in are the following...

    -column E profit or loss

    -column F net P/L
    (This assumes round trip commissions of $25. This is high but I’m temporarily using a more expensive online broker.)

    -column G profit=1
    (This is to say the profitable trades are counted in a column as 1 so I can calculate the total number of winning trades which is necessary for other calculations. If E3 is greater than 0 then 1 else 0.)

    -column H loss=1

    -column I total cost

    -column J % win or loss

    -row 9 total profit or loss

    -row 10 including commissions

    -row 11 % of winners

    -row 12 avg P/L per trade

    -row 13 avg % loss on losers

    -row 14 avg % profit on winners

    -row 15 number of winners

    -row 16 number of losers

    -row 17 number of trades

    -row 18 total profits

    -row 19 total losses

    -row 20 total % gains
    (This is just a number used for other calculations just like the one right below.)

    -row 21 total % losses

    -row 22 risk reward ratio

    Anyway, if you do the spreadsheet as it’s laid out here, please tell me if you come up with accurate numbers and if you have any comments to make to improve on it or whatever.
  8. Here is the other screenshot...