[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Array's problem



PureBytes Links

Trading Reference Links

Hello,

The problem is about a  money management
(martingale) strategy:
It uses a numerical series: 123456;
bet size is determined by adding the 2 end numbers of the series together;
so initial bet size is 7 (1+6);
If trader wins crosses off the 2 end numbers (it remains 2345); if looses
adds the bet to the
end of the series (1234567); then bets again adding the 2 end numbers.; when
all the
numbers are crossed out, the cycle is completed.
The solution appears to me evidently linked to array.
But the problem is:
How to eliminate the first and the last of the series numbers (in the array)
when I win?
How to increment the series with a number that sum the first + the last of
the series (in the array) when I lose?

Thanks for any input
Mario