braddonfromboulder

Q: Numbers function for dynamically averaging the last 30 cells

I am a trader and have many months of data. I have a percentage for the sum of all wins and losses per currency pair currently. I want to create a function that takes the last 30 cells of data and creates a percentage so I can compare it to the total win percentage.

 

The cells are blank unless I add data in either to top or bottom row. 1's are winners and -1's are losses. 0's means it did not set up.

 

Here is a full month with 20 trading day cells of data (max cells in a month are 22):

month-full.png

This is the current month:

month-partial.png

I have 16 month of data with win percentages for all of my data. As you see, I also have winning monthly winning percentages easily in the above examples (with a little division). I really, really want to compile the data from the last 30 cells with data to create a winning percentage. It would need to sometimes include 3 different lines from different months of data to create 30 cells with a number in it.

 

A friend has used the COUNTIF command but I did not get that to work for me.

 

If there is a different website to ask this detail of question please share that too.

 

Thanks in advance,

 

B

MacBook, macOS Sierra (10.12)

Posted on Oct 7, 2016 8:56 AM

Close

Q: Numbers function for dynamically averaging the last 30 cells

  • All replies
  • Helpful answers

Previous Page 2
  • by Barry,

    Barry Barry Oct 21, 2016 10:31 AM in response to braddonfromboulder
    Level 7 (32,714 points)
    iWork
    Oct 21, 2016 10:31 AM in response to braddonfromboulder

    "I incorrectly stated 22 days was the max trading days in a month and 23 is the max as in August."

     

    Click on any cell in column X (the last column considered in the counts)

    Go Table (menu) > Add Column Before.

     

    Numbers will adjust the formulas as needed.

    Counts will now end at column Y.

    Tds (Trading Days) count for each month will now be in column Z, and formulas will reference the new location.

    Etc.

     

     

    Regards,

    Barry

Previous Page 2