Can this Simulator be done by Excel?

scalpmaster

New Member
Joined
Oct 21, 2010
Messages
12
BreakThrough In Coin Toss System
<HR style="COLOR: #ffffff; BACKGROUND-COLOR: #ffffff" SIZE=1><!-- / icon and title --><!-- message -->Hi all,

appreciate if anyone can create this excel spreadsheet simulation:

User input:

T= Total number of tosses, e.g. T=1000

W=Winning probability% of each toss e.g. 0.5 (= fair)

N = number of latest tosses without the occurrence of 2 consecutive Heads or Tails e.g, N=7

e.g, For bets on Heads (vice-versa for Tails),

If there is No occurrence of 2 Consecutive Heads within the last N=7 tosses, then on the next appearance of a Head (could be one or more tosses after N), place first bet 1 on the next toss on Heads.

If Heads appears on next toss, +1 is added to Balance Total(cycle ends), otherwise, 1 is subtracted.
If Tails subsequently continues to appear, do not place next bet until the next Head appears.

When that Heads appears, place bet 2 on the next toss on Heads.
If Heads appears on next toss, +2 is added to Balance Total(cycle ends), otherwise, 2 is subtracted.
If Tails subsequently continues to appear, do not place next bet until the next Head appears.

When that Heads appears, place bet 4 on the next toss on Heads.
If Heads appears on next toss, +4 is added to Balance Total, otherwise, 4 is subtracted.
CYCLE ENDs here regardless it is a win or loss.(Limited martingale)

Wait for the next Non-occurrence of 2 Consecutive Heads or Tails within the latest N=7draws to start the new cycle.

Plot Balance Total chart over T number of tosses.

Thanks,
Scalpmaster
<!-- / message -->
 
Example

No. H/T Bet. Bal.
--- --- --- ----
*******0 10
"Begin"
1 ***T 0 10
2 ***T 0 10
3 ***H 0 10
4 ***T 0 10
5 ***H 0 10
6 ***H 0 10
7 ***T 0 10
8 ***H 0 10
9 ***T 0 10 <----cycle count for T starts here for N=7 since here were no 2consecutive T in the last 7 draws
10 ***H 0 10
11 ***T 1 9 <----First re-appearance of T so place bet 1(taken from initial 10, bal=9) here
12 ***H 0 9 <----H appears so it is a loss, balance = 9, no bet is placed because it is H
13 ***T 2 7 <----T appears again so place bet 2, (taken from 9, bal=7)
14 ***H 0 7 <----H appears so it is a loss, balance = 7,(if T had appeared, then it is a win, bal=11, go back to "begin")

15 ***T 4 3 <----T appears again so place bet 4, (taken from 7, bal=3)
16 Regardless this turns out to be H or T, go back to "begin"
 
Last edited:
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Coin probability = user input (0.5 for fair coin but have seen spreadsheet with this as a variable)

Plot line chart of BalanceTotal VS number of tosses
(with Moving average indicator of adjustable setting)

Say you have initial total balance of $1000, the moment the line chart crosses below MA, you can stop playing and re-run simulation...
Do this 20 separate times and total up the net P/L
(nobody bets 1bil times non-stop in roulette or whatever game)
 
Upvote 0
Plot line chart of BalanceTotal VS number of tosses
(with Moving average indicator of adjustable setting)

Say you have initial total balance of $1000, the moment the line chart crosses below MA, you can stop playing and re-run simulation...
Do this 20 separate times and total up the net P/L

I'm not sure what this means about the moving average bit ...
I've flow-charted what I think is the basic game, and started putting it into code (but I've gotten lost in the loops).
Here's the flowchart if anyone else wants to play around with this: <a href="http://northernocean.net/etc/mrexcel/20101022_lmtest.png">limited martingale diagram</a>
 
Upvote 0
Originally Posted by xenou
limited martingale diagram

Seems different from the example above...
Can you say why?
 
Last edited:
Upvote 0
for e.g, simple MA(20)= avg of last 20 bal value/20
=(Bal.current+...Bal.previous20)/20
plot this value as a line that moves with current value of bal.total.

This is not clear. What are you supposed to do for games 1-19? Also, it will only be relevant if your total winnings move up then down (at which point you would cross the "MA" somewhere). If you start with losses you'd have to keep playing a long time to recover them, by which time the average will approach it's long term stable value near or at $1000.

For what its worth, so far my simulations show that in any given series of 100 games, winnings can exceed 1200 and losses likewise can dip to below 800 (max and mins are about 1300 and 700). I don't know how this would help though - over time, the average is about 0, though interestingly slightly biased towards wins (by a dollar or so over the long run - that may be my "beginners luck" - I've probably run 200,000 simulations now. Or maybe I'm just reading the chart wrong.). As anyone could guess, results are normally distributed, in this case with a standard deviation of about 90. So about 68% percent of the time you'd either win or lose between $0 to $90 dollars if you played this system for 100 games (note that my simulations have had no MA twists involved).

As far as "cutting off play" (based on an MA line) I think its probably a red herring. The real effect is that you simply "continue the series" with a new game, but it is basically the same game - just another toss. So wins or losses continue game by game, whether you are in the "current game" or "starting a new game" ... right? No difference in the final tally - just whether you put the dimes in "todays" bucket or "tomorrows" bucket. Or put another way, every game is a new game and independent of what happened in the last game. So it doesn't matter if you call it a "new game" or not - it's just another game.

I'm afraid I've never participated in actual gambling - but I've never heard of coin toss games in Vegas. What kind of games would such a system be aimed at? Or are you really just in school as someone suggested earlier ... ;) Anyway, as I said before, the maths are fun ...
 
Last edited:
Upvote 0
The MA value calculation itself based on average bal of last 20 Toss, not 1-19 games.
The moving average Stop Run on balancetotal is another form of risk management for trading systems...Adding independent runs' net P/L with MA StopRun each time can have a different effect than running it non-stop infinitely since the objective is to protect capital and gains first, take a break,re-evaluate then go again...the best way to know is to test it out and compare.
Yes, there should be an initial stop run level (say 15% of $1000) in case bal. line drops below MA at the begining...

If you have created the spreadsheet, please share it with us all so that any bugs or further improvements/ideas can be solved/improvised by anyone. Yes, more for observation purpose as a sales trader, last time I created a spreadsheet was in grad school a decade ago...
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,828
Members
449,470
Latest member
Subhash Chand

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top