fibonacci sequence folmula

bettingbot

New Member
Joined
Aug 25, 2019
Messages
1
[FONT=&quot]If you can do this , you are a genius!![/FONT]
[FONT=&quot]formula for a roulette betting system in excel based on the Fibonacci sequence.[/FONT]
[FONT=&quot]The sequence goes like this:[/FONT]
[FONT=&quot]1 – 1 – 2 – 3 – 5 – 8 – 13 – 21 – 34 – 55 – 89 – 144 – 233 – 377 – 610 – 987 – …[/FONT]
[FONT=&quot]You might have noticed (or you already knew) that each of the numbers in this sequence is a sum of two previous numbers. This quality of the sequence is used in the strategy, although it may not be noticeable at first.[/FONT]
[FONT=&quot]This is how the Fibonacci roulette strategy is used:[/FONT]

  • The player starts by betting an amount corresponding to the first number in the sequence.
  • Every time he loses, he moves to the next number in the sequence and bets a corresponding amount. Every time he wins, he moves two numbers backwards. If the player reaches the beginning of the sequence, he just keeps betting an amount corresponding to the first number until he loses; then he continues accordingly.Here is an extended example to show you how this works, using the above example to begin with:

  • Bet 1 and lose
  • Bet 1 and lose
  • Bet 2 and lose
  • Bet 3 and lose
  • Bet 5 and lose
  • Bet 8 and lose
  • Bet 13 and lose
  • Bet 21 and lose
  • Bet 34 and win
  • Bet 13 and lose
  • Bet 21 and win
  • Bet 8 and win
  • Bet 3 and lose
  • Bet 5 and win
  • Bet 2 and lose
  • Bet 3 and lose
  • Bet 5 and win
  • Bet 2 and win
  • Bet 1 and win
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I am a little confused at what output you want... is it what you showed above? is the goal to play until you have no money (what if you lose immediately)? how is money counted? is the amount of the bet the actual Fibonacci number itself on each play?

While you are answer those questions, I thought you might find this "infinite" Fibonacci number calculator to be of interest... it will calculate the Nth Fibonacci number.
Code:
' This is an "infinite" precision calculator which prints a list of the
' full Nth Fibonacci numbers up to virtually any maximum Fibonacci Number,
' limited only to the maximum number of digits that a string can hold. Be
' aware, however, this routine slows down as the inputted number gets larger;
' for example, my fairly fast computer and it took 7.8 seconds for it to
' calculate the 2090 digits for the number 9999 and 12.6 minutes to calculate
' the 20,899 digits for the Fibonacci Number 99999, so if you plan to print
' out lists for larger numbers, be forewarned it could take awhile to do so.
'
' NOTE: These times were calculated about 15 years ago, so I expect faster
'            results on modern computers.
Function FN(ByVal N As Long) As String
  Dim X As Long, Z As Long, Carry As Long, PositionSum As Long
  Dim N_minus_0 As String, N_minus_1 As String, N_minus_2 As String
  If N = 1 Or N = 2 Then
    FN = 1
  Else
    N_minus_1 = "1"
    N_minus_2 = "1"
    For X = 3 To N
      Carry = 0
      N_minus_0 = Space$(Len(N_minus_1))
      If Len(N_minus_1) > Len(N_minus_2) Then N_minus_2 = "0" & N_minus_2
      For Z = Len(N_minus_1) To 1 Step -1
        PositionSum = Val(Mid$(N_minus_1, Z, 1)) + Val(Mid$(N_minus_2, Z, 1)) + Carry
        Mid$(N_minus_0, Z, 1) = Right$(CStr(PositionSum), 1)
        Carry = IIf(PositionSum < 10, 0, 1)
      Next
      If Carry Then N_minus_0 = "1" & N_minus_0
      N_minus_2 = N_minus_1
      N_minus_1 = N_minus_0
    Next
    FN = N_minus_0
  End If
End Function
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

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