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
if win then nextbet += 0.00000001
else nextbet += 0.00000001
if profit > HighProfit then nextbet = base HighProfit = profit 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.