dicekode

dicekode-edited-doublemartingale

Nov 4th, 2020
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.60 KB | None | 0 0
  1. -- edited by DICEKODE
  2. -- youtube: https://www.youtube.com/channel/UC-BpueviNmn12aV_pBRY3gQ
  3. -- blog: https://dicekode.blogspot.com
  4. -- whatsapp: https://chat.whatsapp.com/Faes925uLw9HkhZeFHchFf
  5. -- linkdonasi: berikan pada yang "berhak"
  6. -- This is GAMBLING! -- DWYOR (Do With Your Own Risk)
  7.  
  8. -- Double martingale. Main one with high chance of winning and Bonus one with a 990 factor.
  9. -- Best to use with a balance of at least 0.1 BTC or 1 ETH (or anything equivalent in other cryptos)
  10. -- The main martingale stops when the threshold is reached, this will kick in the bonus martingale.
  11. -- The profits from the main martingale will fund the bonus martingale.
  12. -- If during the bonus martingale the profit goes negative, the robot will return to the main martingale.
  13. -- Main Martingale. Return is x2.
  14.  
  15. chance    = 49.5
  16. revchance = 50.5
  17.  
  18. -- Bonus martingale. When the threshold is reached the robot switches to this x990 martingale
  19. -- If the martingale does not succeed it stops when profit from the main martingale has been consumed.
  20. -- Hopefully this should be rare and the consequence is not dramatic anyway.
  21.  
  22. jackpot    = 99.89
  23. revjackpot = 0.1
  24.  
  25. -- Main martingale uses a x2.05 to increase profits when there is a streak of losses/wins.
  26. -- Bonus martingale uses a 0.14% increase for the x990.
  27.  
  28. multup      = 2.05
  29. multjackpot = 1.0014
  30.  
  31. -- Base bet as calculated below allows to sustain 19 consecutive losses on the main martingale. This corresponds to 1 chance out of 433,000 to go bust.
  32. -- You can adjust the number of sustained losses by increasing/decreasing the "20" in the base expression
  33. -- Bonus martingale uses the same base as the main one, but this can be set to anything you like. I recommend using the same one.
  34.  
  35. base        = balance*1.1/(multup^20-1)
  36. basejackpot = base
  37.  
  38. -- Main martingale kicks in only after 3 consecutive losses or wins to increase average profit. You can adjust this but I found 3 is the optimal value.
  39.  
  40. initial = 3
  41.  
  42. -- Bonus martigale kicks in after 2000 pre-rolls. You can increase/decrease the threshold at your convenience.
  43.  
  44. threshold = 2000
  45.  
  46. -- Technical variables to make the two martingales properly work together
  47. -- don't touch.
  48.  
  49. bethigh         = true
  50. currentstreak   = 0
  51. counter         = 1
  52. reversecounter  = 0
  53. countjackpot    = 1
  54. revcountjackpot = 0
  55. nextbet         = base
  56. main            = 1
  57.  
  58. function dobet()
  59.  
  60.     -- Technical part of the code to set the counters which will determine the chance, bet amount and direction
  61.  
  62.     if bethigh then
  63.         if lastBet.roll>revchance then
  64.             counter = 0  
  65.         else
  66.             counter = counter+1  
  67.         end
  68.    
  69.         if lastBet.roll<chance then
  70.             reversecounter = 0  
  71.         else
  72.             reversecounter = reversecounter+1  
  73.         end  
  74.     else
  75.  
  76.         if lastBet.roll<chance then
  77.             counter = 0
  78.         else
  79.             counter = counter+1
  80.         end
  81.    
  82.         if lastBet.roll>revchance then
  83.             reversecounter = 0
  84.         else
  85.             reversecounter = reversecounter+1
  86.         end
  87.     end
  88.  
  89.     if lastBet.roll>=revjackpot then
  90.         revcountjackpot = revcountjackpot+1
  91.     else
  92.         revcountjackpot = 0
  93.     end
  94.  
  95.     if lastBet.roll<=jackpot then
  96.         countjackpot = countjackpot+1
  97.     else
  98.         countjackpot = 0
  99.     end
  100.  
  101.     -- --------------------------------------
  102.     -- Main Martingale ----------------------
  103.     -- --------------------------------------
  104.  
  105.     if (main==1) then  
  106.         if win then  
  107.             if reversecounter<initial then
  108.                 counter = 0
  109.                 nextbet = base
  110.             else
  111.                 bethigh        = !bethigh
  112.                 counter        = reversecounter
  113.                 reversecounter = 0
  114.                 if counter>=initial then
  115.                     nextbet = base*(multup^counter)
  116.                 else
  117.                     nextbet = base
  118.                 end
  119.             end
  120.             if countjackpot>threshold then
  121.                 bethigh = true
  122.                 chance  = revjackpot
  123.                 nextbet = basejackpot
  124.                 main    = 2
  125.             end
  126.             if revcountjackpot>threshold then
  127.                 bethigh = false
  128.                 chance  = revjackpot
  129.                 nextbet = basejackpot
  130.                 main    = 2
  131.             end
  132.         else
  133.             if counter>=initial then
  134.                 nextbet = base*(multup^counter)
  135.             else
  136.                 nextbet = base
  137.             end
  138.         end
  139.     else
  140.  
  141.         -- -------------------
  142.         -- Bonus martingale --
  143.         -- -------------------
  144.  
  145.         if win then
  146.             --ching()
  147.             main    = 1
  148.             nextbet = base
  149.             chance  = 49.5
  150.             bethigh = true
  151.         else
  152.             nextbet = previousbet*multjackpot
  153.         end
  154.  
  155.         -- ----------------------------------
  156.         -- Stop Loss for the bonus martingale
  157.         -- ----------------------------------
  158.  
  159.         if profit<0 then
  160.             --ching()
  161.             main            = 1
  162.             nextbet         = base
  163.             chance          = 49.5
  164.             bethigh         = true
  165.             countjackpot    = 0
  166.             revcountjackpot = 0
  167.         end
  168.     end
  169.  
  170.     print("streak " ..counter)
  171.     print("reverse streak " ..reversecounter)
  172.     print("jackpot " ..countjackpot .." " ..revcountjackpot)
  173.  
  174.     -- ------------------
  175.     -- Take Profit ------
  176.     ---------------------
  177.     if profit>balance*5 then stop() end
  178. end
Add Comment
Please, Sign In to add comment