binary-com / binary-bot

Visual automation for binary.com
binary-bot.binary.sx
MIT License
232 stars 523 forks source link

Martin Gale if Result is "Loss" not working #2618

Closed eriksonssilva closed 4 years ago

eriksonssilva commented 4 years ago

Hey buddies, what's up! Hope you're doing fine and staying safe! Well, as the title states, I am trying to implement a martin gale after a loss, but for some reason I can't! I have done some other bots and all the topics here always seemed to be enough helping me get my way around, but not this time.

My strategy is really simple: I will get the last two candle colors and the third one I will do an operation for the same direction. So if the last two candles were green, I will do a Call operation, that simple.

If I win, I will wait for the next oportunity. But if I lose, I would like to change my stake and operate again on the next candle, but I couldn't find a way.

Here's my actual bot. Git Help.xml.txt

And here's one topic where I learned how to "count" the candles:

https://github.com/binary-com/binary-bot/issues/2374

Thanks in advance! Cheers,

Erikson

Martinez222 commented 4 years ago

@eriksonssilva i realy don't know what is counting your bot..but here u go modyfied with mrtg 3.5 :) vvvv eriksonssilva.zip

eriksonssilva commented 4 years ago

@eriksonssilva i realy don't know what is counting your bot..but here u go modyfied with mrtg 3.5 :) vvvv eriksonssilva.zip

Hey @Martinez222, thanks for your reply! It counts the following: if G,G,R, it will do a R (Sell) operation. if R,R,G, it will do a G (Buy) operation.

Your bot did halfway what I wanted. Now it applies the Martin Gale. However, it is still waiting for the next pattern to be identified, and only after that, it will apply the martin gale and enter an operation. Pattern Sample

Take a look on the image. On pattern one it was G,G,R. It has put a Sell operation and won. Then the second pattern was R,R,G. It has put a call Operation and lost. I would like it to imediatelly put an operation (next candle). But I couldn't achieve it... Any ideas ?

Cheers!

Martinez222 commented 4 years ago

@eriksonssilva your bot is trading at 1 minute duration and it's enter in the next trade on sec 57 therefore what u want is impossible!Put your trade duration in seconds 52..54 so the bot can enter with mrtg on the next candle..

eriksonssilva commented 4 years ago

Hmm Interesting! I didn't know that I shouldn't use the 1m period. But ok, I have changed the period to 54 seconds, but it still doesn't work. What I think is not working on my bot is the "seconds since epoch" part. I have tried this:

54secs

And it isn't working. I think you have helped me to come closer to what I want, but I can't make it work yet...

Martinez222 commented 4 years ago

Bot needs 3-5 seconds to enter the trade depending in the cpu performance or net speed.Try to a lower duration...

eriksonssilva commented 4 years ago

I did change this treshold, but I still didn't achieve the "immediate" trade in case of loss. But I think you have put me on the right track. I will keep on trying. Do you think it's needed to close this already or do I wait a bit longer?

eriksonssilva commented 4 years ago

Okay, I have finaly found a solution! The problem was that the bot didn't know which operation to do (rise/fall) to start right after. So I have created a logic: If it is searching for a pattern, it will stay inside the "seconds after epoch". If it has found a pattern and lost, it will continue with the same operation applying MGale.

Here's the corrected bot. Git Correct.xml.txt

But then I came across another little issue. I know you said that the bot needs 3-5 seconds to enter a trade. But there's a noticeable delay when entering an operation after a Loss, but no delay when the operation was won? Delay

Would there be a way around, or would I have to hope that those seconds don't affect my trading?

Martinez222 commented 4 years ago

Okay, I have finaly found a solution! The problem was that the bot didn't know which operation to do (rise/fall) to start right after. So I have created a logic: If it is searching for a pattern, it will stay inside the "seconds after epoch". If it has found a pattern and lost, it will continue with the same operation applying MGale.

Here's the corrected bot. Git Correct.xml.txt

But then I came across another little issue. I know you said that the bot needs 3-5 seconds to enter a trade. But there's a noticeable delay when entering an operation after a Loss, but no delay when the operation was won? Delay

Would there be a way around, or would I have to hope that those seconds don't affect my trading?

My friend i do not understand the logic behind your bot.There is no way you can trade on 1 minute and imediately enter on the next trade respectig your bot condition because there is no time for bot to check and enter the trade.U can do it like u put it in the bot but is not respecting the condition is just enter the trade imediatelly in the direction of loosing.

Check this version for a change :
mima 3 candle bot my version.zip

P.S the delay after loss is because of a broken bot.. :)

Martinez222 commented 4 years ago

On a different note this kind of bot will lose big time on strong trends!! May be is better to put a filter and trade with the trend not against it!

eriksonssilva commented 4 years ago

Hey @Martinez222 ! Thanks a lot for your help so far! I will test your version of the bot, thanks! I am sure my logic is not very well done... I have a lot to learn!

"U can do it like u put it in the bot but is not respecting the condition is just enter the trade imediatelly in the direction of loosing."

Yes, you're right! I will see what I can do!

On a different note this kind of bot will lose big time on strong trends!! May be is better to put a filter and trade with the trend not against it!

Yes, my idea actually is to trade only if the market is sideways! But I was first learning how to pick the candle sequence. But thanks for the advice!