Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Tomy45

Pages: [1]
1
Hi Seuntjie,

In simulate mode bot calculate always 1 roll less, look here:   https://postimg.cc/fJgthC4M
Could you fix it? I have described it in more detail here:   https://forum.seuntjie.com/index.php?topic=1805.0

Cheers

2
Programmer Mode / Stats Analyzer
« on: May 01, 2021, 02:04:32 am »
Hi. This is not strategy/system but just only the Stats analyzer. It displays in console: Current Currency, Time Running, Base Bet,Chance: Constant or Variable (depends of the strategy) + %, Seconds Per Bet, Status:  WIN/LOS, Bets Per Second, Total Bets, Bet ID, Total Wins, Total Losses, Expected Wins, Over/Under Wins, Maximum Over Wins, Maximum Under Wins, Current Streak, Best Win Streak, Worst Lose Streak, Last Profit,  Highest Profit, Current Profit, Lowest Profit, Current Balance, Highest Balance, Starting Balance, Lowest Balance, Status of Current Worst Drawdown: YES/NO, Current Roll, Maximum Rolls, Current Drawdown, Maximum Drawdown, Maximum Risk, Maximum Drawdown per Basebet 1 Satoshi, Maximum Risk per Basebet 1 Satoshi, Wins and Losses in Maximum Drawdown, Highest Bet, Current Bet, Lowest Bet, Profit per Bet at Current Basebet, Profit per Bet at Basebet 1 Satoshi, Wagered Total, Wagered Wins, Wagered Losses, Wagered Per Bet, Wagered Per Profit, Profit Per Wagered, Strategy Effectiveness - Profit vs Risk (Max. Drawdown) and multiplication bigger advantage, Profit per Hour/Day/Week/Month in crypto and $.

How it works:
Displays full statistics of strategy. The Stats analyzer is completely independent of the strategy. It only collects informations and calculates everything in own, separate block. Does not infringe and affect the strategy in any way, does not modify or alter the settings, placing of bets, chance etc. Doesn't change anything at all.

What for is it:
As you know or not, many strategies contains "resetstats()" command for reset nextbets when reached new profit or after x rolls. After this all stats in the bot stats window are reseting. The statistics in the simulate window are also reseting. You loosing all data and can not verify effectiveness of strategy, look here:   https://postimg.cc/dZyRTfcm
I designed this analyzer for two main reasons:
1. This stats analyzer NEVER reset even if the strategy uses the "resetstats()" command and resets the stats in the bot.
2. For more useful statistics.

I recommend to open and edit analyzer (and any other strategies) in Notepad++ for three main reasons:
1. In DiceBot writing the comparison sign == is a pain. All the time is spliting on two equals = =. Just try to change value in:  if nextbet   == 2.  Seuntjie, if You could fix it it would be great. Cheers
2. In Notepad++ you can easy cut/copy/paste using mouse.
3. Much much more useful functions.

The analyzer contains three blocks:
1. function Initial()
2. function Analyzer()
3. function display()

Now, all what you have to do it's implement this stats analyzer to your strategy:
1. Copy everything from line 3 to line 96 and paste it in your strategy just above line function dobet().
2. Copy line 101 and paste it in strategy just below line function dobet().
3. Copy everything from line 106 to line 290 and paste it in strategy below, beyond function dobet().
If anyone have the problem with find end of the function dobet() in strategy, then just click on the line function dobet() at begin. In Notepad++ you will see red line on the left side. Follow the line until you see its end.

In block/function Initial() we have 6 settings.
1. line 13: "Display".  If you put here value 1 then analyzer will display statistics in each roll. If value will be set on 2 then analyzer will display statistics in every x roll that is set below in line 14 and will display additionally whole worst drawdown. Value 3 = displays only x roll that is set below in line 14. Value 1 is recommend for checking and control of strategy at each roll in real game. Value 3 is recommend for fastest testing of strategy e.g. in simulation. Example: If you want to run simulate of strategy for 10000 rolls then set 3 in line 13 and set 10000 in line 14. Analyzer will display results only at roll 10000. You don't need to slow down the bot and kill the CPU. Note! Currently in simulate mode the bot counting always 1 roll less than should, so in example above bot will do 9999 rolls so will not display roll No. 10000. For display roll No. 10000 you need to set in Simulate window Amount of bets: 10001.
This is a bug and I'll report this asap, look here:   https://postimg.cc/fJgthC4M
2. line 14: If you set lets say 100 then analyzer will display results at every 100 roll. Active only if is set value 2 or 3 in line 13.
3. line 51: "if nextbet > 0.00100000"   << here you set your max starting basebet you can place in any strategy. This option is to prevent loss your money when basebet of strategy is higher than you can place, but you forgot to check or set it before run. If basebet of strategy is higher than is set here then analyzer automatically will reduce basebet to 1 satoshi = 0,00000001 and will stop the bot.
4. line 86: "Type of Test" If value here is 1 then analyzer using clock of CPU to calculates Profit per Hour/Day/Week/Month. Set 1 when you play a strategy normally. If value is 2 then analyzer using value of line 87 "SecSimulate"  to calculates Profit per Hour/Day/Week/Month. Set 2 only when you Simulate strategy.
Example: Now we want to play normally but later also to simulate strategy:
We set value to 1 and play. In console we see on the bottom real profit per Hour...Month, and also in the upper right corner seconds per bet.
After x rolls we stop the bot and want to Simulate strategy.
Now we set value to 2 in line 86 "Type of Test". In line 87 "SecSimulate" we putting value of seconds per bet from real previous game from console. Open the window Simulate and run strategy simulation. Analyzer will use seconds from real game to correctly calculations profit per Hour...Month.
5. line 87: Input seconds per bet from normal game if you want to simulate strategy. Only used then if is set value 2 in line 86.
6. line 90: "CryptoCourse" Set the cryptocurrency course for calculations "Profit per Hour/Day/Week/Month".

Explaination some statistics:
Maximum Rolls - Is counted from previous highest profit to the last highest profit cointains largest drawdown, look here:   https://postimg.cc/3y3HfMLN
Maximum Drawdown - Is calculated of last highest profit to the lowest drawdown, look here:   https://postimg.cc/1ng7JJZ4
Maximum Risk =  (Maximum Drawdown + nextbet)  = our worst moment. Maximum Drawdown and Maximum Risk is useful stats to evaluate the risk of strategy. I brought this stats from Roulette Xtreme, look here:   https://postimg.cc/gxQgr3hW   
Strategy Effectiveness - Profit vs Risk (Max. Drawdown). This is not compare current profit vs maximum drawdown but compare highest profit vs maximum drawdown within whole session. This option is helpfull to compare effectiveness your strategy vs effectiveness of others strategies and between them, look here:   https://postimg.cc/WtYg2TgR
In the calculations:   if larger Profit:   ( ( HighestProfit + MaximumDrawdown ) / HighestProfit ) * 100    if larger Max. Drawdown:   ( ( HighestProfit + MaximumDrawdown ) / + MaximumDrawdown ) * 100
Example: Lets say that our profit = 100 and MaximumDrawdown = -80.   ( ( 100 + -80 ) / 100 ) * 100 = 20%.     Now our profit = 80 and MaximumDrawdown = -100.   ( ( 80 + -100 ) / 100 ) * 100 = -20%.
Profit is x...  ...%  >  Max. Drawd.  or   Max. Drawd. is x...  ..%  >  Profit    Comparison as above so Highest profit vs maximum drawdown within whole session.
Example: Our profit = 350 and MaximumDrawdown = -100  then  Profit is x2.5  250%  >  Max. Drawd.
                Our profit = 100 and MaximumDrawdown = -500  then  Max. Drawd. is x4  400%  >  Profit 

Speed of the bot using the analyzer:
Used simplest strategy for test, cryptocurrency: doge, site 999dice:

base    = 0.00000001   nextbet = base   chance  = 49.5   HighProfit = 0
function dobet()
  if win then nextbet += 0.00000001
         else nextbet += 0.00000001
  end
  if profit > HighProfit then nextbet = base HighProfit = profit end
  end 

1. Normal run (speed was tested on 30 rolls, average CPU usage was tested over 100+):
Just a strategy: 01m:08s  = 100% of speed,   Average CPU usage:  0,47%
Strategy + analyzer, display at 30 roll: 01m:08s  = 100% of speed,   Average CPU usage:  0,48%
Strategy + analyzer, display each roll: 01:12s  = 94% of speed,   Average CPU usage:  1,14%

2. Simulate run (speed was tested on 1000 rolls, average CPU usage was tested over 5000+):
Just a strategy: 00m:14s  = 100% of speed,   Average CPU usage:  0%
Strategy + analyzer, display at 1000 roll: 00m:15s  = 93% of speed,   Average CPU usage:  0%
Strategy + analyzer, display each roll: 02:03s  = 11% of speed,   Average CPU usage:  10,98%    - not recommended for use, kills your time and CPU!

That's all. I designed analyzer for myself and also share here for you guys.
The code is in next post. Enjoy and good luck.



3
Hi,
First roll never displays on the sliding chart in the bot no matter how was started: manual betting, by advance mode or programmer mode. Appears only on live bet panel. Can you fix it? Cheers.

4
Hi Seuntjie,

1. Could you change default bet from 1.00000000 to 0.00000001 if is no nextbet = base before Function dobet?
I had a few times the balance over 1.00000000 and during test scripts a lost 1.00000000 because some scripts has no nextbet = base. On my lucky I played free money, but if I start playing for real money and I'll forget add this line to the script then I'll lose 1 BTC = around 10k USD. I programming and using only programmer mode. I thing this is most huge bug and can cost me 10k USD. Can you fix/change it?

2. Window of simulate:
During simulate the scripts in window "Simulate" the parameters "Win streak" and "Lose streak" never reset after each "Run Simulate".
Example:
Put 100 to "Amount of bets" and run simulate. After finish run look on value of these two options "Win and Lose streak" and remember it. Now put ....lets say 2 to "Amount of bets" and run simulate again. As you see the values of these two options was not change. Only bigger values can overwrite them but not lower. Only the button "Reset" in "Statistic" window can completely reset them but this is not properly solution I guess. Each press of the "Run simulation" button should first reset the last stats and then start calculating new ones.

3. The starting balance displayed in the console is always a different value than that set in the window.
Example:
Copy the script below to dicebot for a quick reference where is the problem I'm talking about.

Code: [Select]
chance             = 49.50
basebet            = 0.00000001
nextbet            = basebet
StartingBalance    = balance
LowestBalance      = balance
CurrentProgression = 0
MaximumDrawdown    = 0

function dobet()
    CurrentProgression += 1
    nextbet = previousbet * 1.25
    LowestBalance -= previousbet
    MaximumDrawdown -= previousbet
    print("")
    print("")
    print("Current Progression:   "..CurrentProgression)
    print("")
    print("Starting Balance  :"..StartingBalance)
    print("Max Drawdown:  "..MaximumDrawdown)
    print("Lowest Balance:  "..LowestBalance) 
    print("nextbet:                "..nextbet)
    if LowestBalance < nextbet
      then
        print("")
        print("BANKROLL IS OVER !!!")
        print("")
        stop()
      end
end

Put any amount to "Starting Balance". Lets put 0.50000000 for example.
Press "Run simulate" go to Console and look what displays Starting balance. The first run displays the same "Starting balance" value as was set in the input option. Run again. You will note that in each next run this value of Starting balance is different. Should be always the same, constant.

4. My suggestion. Could you put very usefull statistics in Simulate window like: Current Drawdown, Maximum Drawdown, Lowest Balance. I coded it but would be great to see that in "Simulate" window.
Example:

Code: [Select]
chance = 13.34
bethigh = true
basebet = balance/18000000
nextbet = basebet

CurrentProgression = 0
CurrentDrawdown = 0
MaximumProgression = 0
MaximumDrawdown = 0

function dobet()
    if win then
      nextbet = basebet
      CurrentProgression = 0
      CurrentDrawdown = 0
    else
      nextbet = previousbet * 1.25
      CurrentProgression += 1
      CurrentDrawdown -= previousbet
      if CurrentDrawdown < MaximumDrawdown
        then
          MaximumProgression = CurrentProgression
          MaximumDrawdown = CurrentDrawdown
        end
    end
    print("")
    print("")
    print("CurrentProgression:    "..CurrentProgression.."   CurrentDrawdown:     "..CurrentDrawdown)
    print("")
    print("MaximumProgression: "..MaximumProgression.."   MaximumDrawdown:  "..MaximumDrawdown)
    print("")
end

Thanks a lot.

Pages: [1]