At each point in the game, you have the option to stop (and leave with what you have won), or continue and risk winning more or less. Since you don't know anything about the order of the cards in the deck, your decision depends only on two things: $k$, the number of cards remaining in the deck ($k \ge 1$ for a meaningfull choice) and the number of $r$ of red cards among them ($0 \le r \le k$), wich you of course can determine from what has come before.
This number totally determines your current winnings (if you started with $2n$ cards, $n$ black and $n$ red, it is $(n-r) - (n-(k-r))=k-2r$). So your overall win is your current winnings + what you win/loose in the remaining cards. So again, what you decide to do in each step is the what is better, stopping now or risking more cards.
If we denote by $b(k,r)$ the expected remaining winnings under the best strategy, we get a resursive formula (as lulu implies in the comments).
We start with
$$b(1,0)=0, \quad b(1,1)=1$$
because if the one remaining cards is not red, you of course stop, and if it is red, you continue and get $1.
For any $k+1$ cards remaining, we have to decide if stopping (expteced win: $0$) is better than continuing.
If we continue one step, we get a red card with probability $\frac{r}{k+1}$, in that case our remaining winnings are $1+b(k,r-1)$, where the $1$ comes from the win in this move and the $b(k,r-1)$ as the best from the the remaining situation of $k$ cards with $r-1$ reds in them.
OTOH, the probability of getting a black card is $\frac{k+1-r}{k+1}$, and our remaining winnings are $-1+b(k,r)$.
Overall, we get that the expected remaining winnings when we continue is
$$b^*(k+1,r) = \frac{r}{k+1}(1+b(k,r-1)) + \frac{k+1-r}{k+1}(-1+b(k,r)) =$$
$$ \frac{2r-(k+1)}{k+1} + \frac{r}{k+1}b(k,r-1) + \frac{k+1-r}{k+1}b(k,r)$$
Of course, when this is negative, we don't continue but stop, so we finally get
$$b(k+1,r)=\max(b^*(k+1,r),0)$$
Note that the recursion doesn't really work for $r=0$ (because $b(k,r-1)$ does not exist), but in this case the initial probability factor in front of it is 0, so it doesn't matter.
So what you need to do, is to recursively calculate $b(k,r)$ first for $k=2$ and all relevant $r$, then $k=3$, etc. This is doable by hand for the first $k$, then you probably better write some computer code (Excel might be enough).
It's not clear if there is an easy formula to find for each $k$ what the lowest $r$ will be to continue, but the recursion works and has qudratic time complexity, so should pose no problem for a computer and finding $b(52,26)$.