PureBytes Links
Trading Reference Links
|
Let me see if I have this straight, by example.
You start with a number 123456. You add the first and last digit to
get the bet size, 7.
You win, so you cross of the first and last digit; the series is
2345. You add the first and last digit to get the next bet size,
2+5=7.
This bet loses, so you add the size of the last bet (7) onto the end
of the series, resulting in 23457.
The next bet size would be the sum of the first and last digits
again, 2+7=9.
If this bet loses, the series becomes 234579. So the next bet size
would be 2+9=11.
You win, so you cross of the first and last digits, so the series is
3457. The next bet size is then 3+7=10.
This wins too, so you cross of the first and last digits again,
leaving 45, making the next bet size 9.
This loses, so you now have 459. The next bet size is 4+5=13.
This wins, leaving you with 5. What do you do here? Add 5+5=10, or
just use a bet size of 5?
If this one wins, you start over again with 123456.
Is that a correct example? Please reply to the list.
How to code it might be a challenge but it definitely needs an array
to hold the digit sequence, as well as some variables pointing to
the location of the current first and last digit. When the two
pointers collide, the sequence starts over.
-Alex
>From: "marika11" <marika11@xxxxxxxxx>
>To: <omega-list@xxxxxxxxxx>
>Subject: Array's problem
>Date: Wed, 23 Oct 2002 15:16:05 +0200
>
>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
|