binary-com / binary-bot

Visual automation for binary.com
binary-bot.binary.sx
MIT License
231 stars 516 forks source link

Masaniello Money Management #617

Closed Eshhh closed 6 years ago

Eshhh commented 6 years ago

Hi,

I found this Italian Money Management on the Internet with the help of an Italian friend of mine and found it interesting. But i was unable to find any Algorithms or formulas on google except for some Excel sheets and a Program which calculates the MM. I was unable to decipher the formulas in the excel sheets as it looks very complex.

Basically how it works is, it calculates the Target Balance, Initial Stake and the Stake when you win or lose based the data of Initial Balance (How much money you are willing to risk per session), No of trades that we want to take in that session, Win/Loss ratio and Percentage Payout, that needs to be provided manually.

Everything that i found about it on google and YouTube is in Italian (need to use google translate), I'm attaching them all. If someone could decipher the formulas in the Excel and code it as a bot that would be great.

@binary-ex-machina you are the right man.

Youtube Video - https://www.youtube.com/watch?v=xpFNBsnULpw&t=151s

Masaniello MM.zip

P.S.: 7MM-Masaniello Excel file looks simpler to use.

binary-ex-machina commented 6 years ago

this is very similar to the Kelly criterion strategy: https://en.wikipedia.org/wiki/Kelly_criterion. Win/loss ratio is the win rate.

the main problem is the win rate. It needs to be above 50% if uses Even/odd.

Rise/fall the calculation of the probability of winning is very complex, analyzing the market, timeframe, news, etc. The same for touch.

let's make an example using digit match: prediction is 0, so you have 10% of winning each trade to profit around 800%. Based on the calculations from the formula, you need at least 11,11%, otherwise the values will be always negative. The number of winnings are irrelevant, because you are using digits, total random. This idea will not work for this trade type.

Now go for even/odd. Using the formula, you have mixed results, some are loss, some are wins, because the chance is 50%. The only way to have profit guaranteed is to have 58% chance of winning. So this can't be used either.

Now rise/fall. Your strategy on analyzing the market needs to be at least 60% of the time correct, following the formula, because the payout is 94% of the stake. If you have a strategy like this, you can use compound strategy instead.

I already tried Kelly Criterion, but the strategy to get the winning rate is the complex part.

Eshhh commented 6 years ago

Hi @binary-ex-machina

How you doing..

I studied the Kelly's Criterion and compared it with Masaniello and the main difference i found is that Kelly's does not take into consideration the Initial balance to distribute the stake over a Number of runs, but gives you a percentage of the balance to use as stake, which is a constant and we have to achieve a fixed W/L ratio. This will be profitable only in the long run provided if we achieve that fixed W/L ratio (calculated manually).

But Masaniello gives you a Target Balance based on Initial balance and No of runs and calculates the distribution of stake for that constant No of runs. And any strategy above 50% w/l ratio will be profitable with this money management as far as Ive studied about it..

Coming to the strategy, to achieve >50% w/l ratio consistently we cannot consider Even/Odd, or fall/rise or Diff/match as their results are highly uncertain. The only logical strategy based on my studies that i feel like we can consider to give us >50% w/l ratio in the long run on a consistent basis is Over/under strategy.

Now i applied Kelly's Criterion to Over 3 with a Payout of 63% and it requires a minimum >62% w/l ratio to be profitable, with the constant stake, anything below it the results in negative balance. 62% is a very high number to achieve for 100 runs and even for 1000 runs on a consistent basis.

I applied Masaniello to Over 3, and found it requires only >52% w/l ratio to be profitable, so now its very easy to achieve that ratio for 100 runs or even 1000 runs. There is also a possibility that it can be <52% in worst case scenarios, but we can keep stop losses. Sometimes we have bear those losses in the long run.

I have made the calculations with a real w/l configuration (over 3) that i was testing for 54% w/l ratio to achieve $5 profit per session with $100 balance and for 100 runs (unable to calculate for 1000 runs as there were restrictions in the Excel). The stake distribution varies based on the result of the last trade and they seem promising. Please look into it. I have attached the file and Ill test for Over 2 and other numbers too.

7MM-Masaniello.zip

Eshhh commented 6 years ago

Over2 requires >62% win ratio which is achievable for 100runs. Results for 100runs, $100 stake with 64% wins is attached.

7MM-Masaniello Over2.zip

binary-ex-machina commented 6 years ago

you calculations are wrong.

Over 2, winrate is 70% (if you fall into 0,1,2 you loose) The payout for $1 stake is $0,4 or 40% so you have:

Winrate: 70 Payout 40% trades 100

Based on the formula, you the minimum win rate to not have negative profit is %71,42. You can get some positive profits, but it's uncertain. With 100 attempts you need at least 80% with that payout to always be profitable.

checking you xlsx i saw the stake $1,52 at nº1 returning $0,61 and it returns $0,62. On stake $3,2 it returns $1,28 instead of $1,31, so there is some wrong calculations.

I couldn't use the file on google drive sheet so i can't test it. Also this is a set of winnings and losses. Did you tried to change that?

take a look at this generator: http://boturbotrader.tumblr.com/masaniello_money_management

binary-ex-machina commented 6 years ago

the rate of success on binary.com digits are even lower then 70% for over 2. Try running a bot only with over 2 during all day. You will never have profit. for even odd i think you chance are 45% at max.

Eshhh commented 6 years ago

@binary-ex-machina I think you got me wrong brother. My calculations are based for worst case scenarios. I think the idea of this MM is to not keep you in profit always but to win a certain target profit at a certain no of trades.

To make it simple. Lets consider 100 trades to be 1 session.

For example for this MM, trading Over 3 with Initial balance $100, Payout 63% (constant for any stake) I take 100 trades, I win 54 and lose 46, I make a profit of $5.77 (target). I take 100 trades, I win 52 and lose 48, I make a profit of $2.30 (target). Here my worst case scenario is winning only 54 and 52 respectively. If the winning % is better, the target is reached even before making 100 trades.

Trading Over 2 with Initial balance $100, Payout 40% (constant for any stake) I take 100 trades, I win 64 and lose 36, I make a profit of $4.39 (target). I take 100 trades, I win 62 and lose 38, I make a profit of $1.61 (target). If the win% is 70% for Over 2, it is even better coz you end the session before 100 trades.

The returns on the xlsx is constant at 40%... 40% of $1,52 is 0.61, but binary.com gives a return of 40.8% which is 0.62 and 40% of $3.2 is $1.28 but the actual returns is 40.9% i.e. $1.31.. this can be sorted out. Ive kept it 40% for simplification purpose.

The wins and losses in the xlsx are entered by me based on the results i got from the Over 3 and Over 2 bots i ran. Ive pasted my google drive link with the files below. You can open them with Google sheets. But im getting errors in the formula when i open it with google sheets. See if you can rectify it or please use Microsoft Excel.

https://drive.google.com/drive/folders/1BHQ-nhxA4J580ogqxLllk7MHcj-Li6L5?usp=sharing

janps1712 commented 6 years ago

@Eshhh Do you use a bot to trade this MM?

Eshhh commented 6 years ago

@janps1712 the algorithm is no where to be found buddy..

binary-ex-machina commented 6 years ago

image

this what appear. Its because the hidden tab that has wrong calculations when you convert to google Sheets.

Now check your 1st scenario. Payout for over 3 is is 63% for a winning rate 60% (4,5,6,7,8,9), right? so in a worst case scenario using stake $1 and you win 55 times = $34,65 and lose $45. This of course without using the MM. But on binary.com your winning rate is lower then that.

Do this test: create a bot with over 1 (80% of win chances) and let it run 1000 times. You will loose more then 200 times. A Lot more, around 290 on my tests. Over 2 your win percentage will be 60-65.

You can test Even/Odd. 50% right? no, around 40% on 1000 trades on my experiments. that's why i'm don't trust MM to be used on binary.com that depends of the winning rate.

Eshhh commented 6 years ago

i did the calculations based on results i got for 1000 real trades, dividing them into 10 session, each sessions with 100 trades. these were the results.

image

image

Based on these results we can test some variations by keeping the stop losses at $10 and increase the initial balance from $100 to $300. This way we can minimize risk. But out of 10 sessions at least 7-8 sessions must be won to be profitable.

binary-ex-machina commented 6 years ago

I manage to create the Masaniello MM and omg, a lot of calcs. masaniello.xml.zip

What you where forgetting was the table necessary to run the strategy. I manage to generate the table in a matrix level. The prices are pre calculated for each run, so you have predefined stakes, similar to Labouchere strategy, but they are fixed all the time. I manage to get the target balance with the same precision as your excel calculations, as well the stake. Its customizable any number of trades.

the bot will stop working for some seconds when you play it, because it will generate the table to follow the stakes %. It also has the stop by number of runs or by target balance.

I hope it is all good, because analyze a 100x100 table is hard, but on my tests with 5x5 table, show the same values of the excel formula. (take a look at the hidden tab "algortimo" and see the table to compare)

100 runs takes around 20min to finish, but i manage to reach the target profit before the completion The target profit was reached before the 100 trades (the total profit has plus $4 because my tests)

image

On other test with 35 trades, the results where not good. I think the minimum trades needs to be 100. image

Anyway, it was a good challenge and i hope it's all good.

janps1712 commented 6 years ago

@binary-ex-machina When I try to run the bot I get the error "Amount must be a positive number" Do you know how to fix this?

Eshhh commented 6 years ago

@binary-ex-machina you are a genius bro.. and im sorry if i didn't give you the right information and ate your head, lol. im excited to test it. thanks

Eshhh commented 6 years ago

@binary-ex-machina Same problem "Amount must be a positve number".. tried changing the maxNumberOfTrades and wins variables, but no change.

binary-ex-machina commented 6 years ago

corrected masaniello.xml.zip

Eshhh commented 6 years ago

image

The calculations are so precise compared to the excel.. Awesome job.. @binary-ex-machina

binary-ex-machina commented 6 years ago

@janps1712 firs thing you need to do is understand the concept. Read the first post of this issue.

janps1712 commented 6 years ago

I did understand it right after :)

binary-ex-machina commented 6 years ago

100 runs with Over 2, 70%. Target profit was $149.28. At some point the stake gets very dangerous. I think the best is go with %5 lower then the expected all the time.

image

Eshhh commented 6 years ago

image

@binary-ex-machina

It would be great if the bot stops when it already reached the target balance so we can avoid the stake reaching ridiculous levels.

binary-ex-machina commented 6 years ago

It is "or" on my file. Put to "and" image

Eshhh commented 6 years ago

Fixed it. Thanks.. We can also keep another stop if bot reaches a percentage of balance in negative. Would 10% of negative balance be too high?

binary-ex-machina commented 6 years ago

i think you don't have to limit the balance. It will use all of it, maybe more. The idea is that it will never use more then the balance, but i can happen. Your chances are lower to 5% at least on every type of trade. 75% with Over1 is very sad :(

Eshhh commented 6 years ago

@binary-ex-machina Ive entered the number of trades as 1000 and 200 and it is yet to take a single trade.. and the page hangs.. im unable to get the data in the excel too.. are these logical numbers, or does the bot take more time to calculate? But Its running fine for 150 trades..

binary-ex-machina commented 6 years ago

1000 trades is impossible for the bot to handle. 200 maybe can load. Imagine a spreadsheet with 1000 columns and 1000 lines, each one with a number, coming from a moderated calculation.

the binary bot system was not designed to make such calculations

Eshhh commented 6 years ago

150 trades and 96 wins to gain $1.97 target profit looks like a promising settings.. and the stake does not reach very high levels.. more number of trades would mean allowing more time for the bot to reach the target.

Running it on all volatility indices simultaneously will also reduce the time to achieve our daily targets too.. Any suggestions?

binary-ex-machina commented 6 years ago

test more. I don't think this will work for too long. We need to see if it hit 0 on balance and how often

Eshhh commented 6 years ago

Ahh my bad with the 1000 trades lol.. 200 trades also doesn't load.. its been like more than 30 mins and yet to take a trade.. 150 is working fine..

Eshhh commented 6 years ago

Sure.. Will test more.. Awesome job btw.. thanks again..

binary-ex-machina commented 6 years ago

the main problem with this strategy is when is ending. The stake will always hit high numbers. Maybe you should stop when it hits half the target

binary-ex-machina commented 6 years ago

this is what i was talking about

199 wins and 82 losses (3 runs), not near the expected winrate 70% or even 65%. this is around 61% for Over 2.

image

Eshhh commented 6 years ago

yes, that is why i was suggesting to have a stop loss because i saw the balance reach to 0 twice in 500 runs while testing with the excel.. a tiny $1 profit per run would also be less risky by keeping the expected winrate a little higher..

binary-ex-machina commented 6 years ago

now you understand that this strategy will not work on binary.com? the win rate is worse then the payout can recover.

Eshhh commented 6 years ago

And you had to figure out a whole new strategy to prove me that.. lol. Apply it to one of your best strategies and maybe its positive..

Eshhh commented 6 years ago

image

image

Not really great results for Over 4 and under 5 even for the lowest target profit.

Eshhh commented 6 years ago

Hi. @binary-ex-machina How you doing..

I think i might have found a strategy which might work for this money management. It uses your technique for Touch with a couple of EMAs and produces more than 85% winrate consistently with 17% payout. Now for this strategy to be profitable with Masaniello MM it needs to generate min 78% winrate, and the results of my testing is greater than this. Below are the results.

image

I tried this strategy with other MM too.. still produces >85% winrate as below.

image

image

image

The negative balance is for Oscar grind.. I'm not sure if i have the right settings for it.

But All the other MM proved to be risky with this strategy as it produced 4 consecutive losses, zig zag losses and what not.. and with masaniello the negative balance was only $89 which happened once in over 600 trades which makes me think that it is safe. still needs more testing.

So i have a request for you to make some upgrades to the bot so it'll be more easy to test.

There is a situation where according to masaniello the stake is lower than $0.35. obviously the bot stops at this point. So if you can make a tweak where the bot restarts itself again with the initial conditions of the masaniello, when this situation arises, that would be great. Also the bot stops when it reaches the target, instead it should continue trading by restarting with initial conditions. We can make new Take Profit variable and the bot should only stop when the take profit is reached. Hopefully it sounds logical to you.

Please look into the strategy too and see if you can improve it. If we can achieve 90% win rate that would be great. Also if you can please check the logic of Oscar grind if it is correct, I'd appreciate it.. Thanks in advance..

Touch EMA.zip

binary-ex-machina commented 6 years ago

Hello, you need to understand that the winrate on binary.com are not even. 90% win rate is impossible, or the site would break. Oscar's grind will not work as well, because when you have a supposedly 50% win rate, you lose money at the end. If you are stuck in a zigzag price changes, the stake would be very very higher.

Using compound or kelly criterion or masaniello, the problem continues, because you loose more then win. All the time. You can even let a Differ bot all day, that again, supposedly the win rate is 90%, because you are betting agains one number, you will loose money.

Unfortunately Martingale is the only money management the will work, because you can loose 6 times, and then recover all of it in the 7th trade.

What we need to find is a strategy of play management. Not playing 600 runs, but 4-5 and stop.

gokula-krishna-dev commented 6 years ago

We're closing this issue due to inactivity, you're welcome to open it again if you still haven't got your answer.

Eshhh commented 6 years ago

Hi @binary-ex-machina Hows it going..

Could you please check if this strategy could work with this money management..

Touch WMA SMA Masaniello.zip

janps1712 commented 6 years ago

@Eshhh

I have been testing this bot and so far it have showed great results.

Eshhh commented 6 years ago

@janps1712 Please post your results and settings.. Thanks

Kanjowuu commented 5 years ago

hi why i have a problem of cannot read property of slice "null" ?? @@

Brajuh commented 4 years ago

I am having problem with this bot also, can someone help me resolve this I need the bot Touch WMA SMA.txt

mosesjohn6969 commented 3 years ago

Hi,

I found this Italian Money Management on the Internet with the help of an Italian friend of mine and found it interesting. But i was unable to find any Algorithms or formulas on google except for some Excel sheets and a Program which calculates the MM. I was unable to decipher the formulas in the excel sheets as it looks very complex.

Basically how it works is, it calculates the Target Balance, Initial Stake and the Stake when you win or lose based the data of Initial Balance (How much money you are willing to risk per session), No of trades that we want to take in that session, Win/Loss ratio and Percentage Payout, that needs to be provided manually.

Everything that i found about it on google and YouTube is in Italian (need to use google translate), I'm attaching them all. If someone could decipher the formulas in the Excel and code it as a bot that would be great.

@binary-ex-machina you are the right man.

Youtube Video - https://www.youtube.com/watch?v=xpFNBsnULpw&t=151s

Masaniello MM.zip

P.S.: 7MM-Masaniello Excel file looks simpler to use.

i have written a program to perform that same task, i can handle this job, i make bots tooo.

mosesjohn6969 commented 3 years ago

if you can contact me i will show you a short video of what i have done with massaniello calculator.

mosesjohn6969 commented 3 years ago

hi why i have a problem of cannot read property of slice "null" ?? @@

me too, i'm having the same problem.

contact me on mosesjohn12345@gmail.com i have the solutions to your problems, i will show you a video of what i have done then we talk from there. or hit me up on whatsapp +2348133280825.

binary-ex-machina commented 3 years ago

@mosesjohn6969 no need to pass numbers or emails to solve this simple issue, post the idea here and let everyone test, no private contacts to avoid scammers

@Brajuh fixed file masaniello money management.xml.zip

mosesjohn6969 commented 3 years ago

I was only trying to say I can write codes to perform automation, I have used Massaniello before, I wrote a code to consume Data from the excel massaniello calculator, and then write back to the excel file in real time, it writes back to except wether last round was win or loss and then takes the next stake, I used it on a local casino game in my country. So basically I can perform automation and web scraping.

On Mon, Jun 28, 2021, 17:54 Binary Ex Machina @.***> wrote:

@mosesjohn6969 https://github.com/mosesjohn6969 no need to pass numbers or emails to solve this simple issue, post the idea here and let everyone test, no private contacts to avoid scammers

@Brajuh https://github.com/Brajuh fixed file masaniello money management.xml.zip https://github.com/binary-com/binary-bot/files/6728027/masaniello.money.management.xml.zip

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/binary-com/binary-bot/issues/617#issuecomment-869846352, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATKESFCAENVPV5XQAQAL6JTTVCSLHANCNFSM4EXKRG5Q .

jeskrill22 commented 2 years ago

Hello brother, I have been testing the robot and the truth is that I appreciate your work, I am working on a configuration in which I would like the bot to work in a loop, once I close the cycle of established orders, it starts again ... and also sometimes I get problems like the ones in the screenshot "cannor read property" that this leads to problems in its calculation..

You can help me with that? Once this is fixed, the system will work in a way that generates an approximate of 50% on a daily basis and in a more conservative way without endangering the capital ... I attach the file as well. Thank you so much!

Screen Shot 2021-11-29 at 22

binary-bothcheck.xml.zip

Bebindas commented 2 years ago

corrected masaniello.xml.zip

Hi your work is amazing. i tried this money management with some bots. Money management working really fine. but one thing is missing in this. Progressive Masaniello (3).xlsx Can u add compounding progressive money management. please help. i will attach the excel file here. in this excel file whenever we win a trade it increase the amount a little. please look in to it.