What is causing Err:502 in this formula to forecast the amount of my paycheck on payday?

The formula is copy-pasted below. I’ve been staring at it in the function wizard for a while trying to figure out where the problem is but I’m not seeing it. The parts of the function appear to be working correctly in the function wizard. The first argument of FORECAST looks like it is correctly returning 03/07/20 + 1 (as of March 7th), the second argument is returning $B$17:$B$29 and the third argument is returning $K$17:$K$29. I tried putting =FORECAST(TODAY()+1, $K$17:$K$29, $B$17:$B$29 in a separate cell and it returned the expected result. So can anyone help me figure out what is going on with the original formula?

=FORECAST(TODAY()+IF(MOD(WEEKNUM(TODAY(),2),2)=0, 7-WEEKDAY(TODAY(),2), 14-WEEKDAY(TODAY(),2)), ADDRESS(MATCH(TODAY() - IF(MOD(WEEKNUM(TODAY(),2),2)=0, 7+WEEKDAY(TODAY(),2), WEEKDAY(TODAY(),2)), B:B, -1)+1, 2, TRUE(), TRUE()):ADDRESS(MATCH(MAX(B:B), B:B, 0), 2, TRUE(), TRUE()), ADDRESS(MATCH(TODAY() - IF(MOD(WEEKNUM(TODAY(),2),2)=0, 7+WEEKDAY(TODAY(),2), WEEKDAY(TODAY(),2)), B:B, -1)+1,11, TRUE(), TRUE()):ADDRESS(MATCH(MAX(B:B),B:B, 0), 11, TRUE(), TRUE()))

I was able to figure out (of course after I finally buckled and asked :)). The solution was to put INDIRECT() around each instance of ADDRESS(). It’s returning a nonsense value but unless that turns out to be caused by INDIRECT() then I’ll leave this answer up.

For anyone wondering, the problem that was causing the nonsense value was that I accidently switched the X and Y values for FORMULA. This is the formula as of the time I wrote this.

=FORECAST(TODAY()+IF(MOD(WEEKNUM(TODAY(),2),2)=0, 7-WEEKDAY(TODAY(),2), 14-WEEKDAY(TODAY(),2)),INDIRECT(ADDRESS(MATCH(TODAY() - IF(MOD(WEEKNUM(TODAY(),2),2)=0, 7+WEEKDAY(TODAY(),2), WEEKDAY(TODAY(),2)), B:B, -1)+1,11, TRUE(), TRUE())):INDIRECT(ADDRESS(MATCH(MAX(B:B),B:B, 0), 11, TRUE(), TRUE())),INDIRECT(ADDRESS(MATCH(TODAY() - IF(MOD(WEEKNUM(TODAY(),2),2)=0, 7+WEEKDAY(TODAY(),2), WEEKDAY(TODAY(),2)), B:B, -1)+1, 2, TRUE(), TRUE())):INDIRECT(ADDRESS(MATCH(MAX(B:B), B:B, 0), 2, TRUE(), TRUE())))

When posting/quoting formulas, please also consider this Q&A.
Its basic statement:
The globally accepted parameter delimiter (the list separator between the parentheses behind a function name) is still the semicolon ;.
If someone with a locale using the comma as its decimal separator copies your formula and pastes it into his (f/m) sheet, he will get an error due to the fact that the comma cannot be casted in two conflicting roles (probably on stage at the same time).