Bitcoin Forum
December 09, 2016, 12:11:54 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 »
  Print  
Author Topic: Chrome Browser extension: MtGox trading bot  (Read 67300 times)
rikigst
Jr. Member
*
Offline Offline

Activity: 46


So long and thanks for all the fish


View Profile
May 12, 2013, 06:41:20 PM
 #361

eduk, I've noticed you happen to know how far fible1's paid version has developed. As per 2 days ago, Tobbelino's one was much better (not to mention, free). This volatility check addition is a must-have, and I saw it was implemented in fible1's version, too. Any clue on how it performed? Is tobli's version always the best one?

bitboat.net - Compra Bitcoin con ricarica Superflash!
1481242314
Hero Member
*
Offline Offline

Posts: 1481242314

View Profile Personal Message (Offline)

Ignore
1481242314
Reply with quote  #2

1481242314
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481242314
Hero Member
*
Offline Offline

Posts: 1481242314

View Profile Personal Message (Offline)

Ignore
1481242314
Reply with quote  #2

1481242314
Report to moderator
eduk
Newbie
*
Offline Offline

Activity: 14


View Profile
May 12, 2013, 06:48:58 PM
 #362

eduk, I've noticed you happen to know how far fible1's paid version has developed. As per 2 days ago, Tobbelino's one was much better (not to mention, free). This volatility check addition is a must-have, and I saw it was implemented in fible1's version, too. Any clue on how it performed? Is tobli's version always the best one?

Here is the volatility one I made yesterday https://bitcointalk.org/index.php?topic=67591.msg2122016#msg2122016 which is free because most of it is other peoples work as it is TobbeLino's version with a volatility check, I'm still testing though, I literally finished coding the modification last night and have only run it for about 10 hours today. But it is avoiding sells and buys.

I'm also figuring out other ways to make it smarter, as during stable periods like we've seen these last few days it an be too agressive.

maverick1337
Jr. Member
*
Offline Offline

Activity: 38


View Profile
May 12, 2013, 07:18:52 PM
 #363

eduk, I've noticed you happen to know how far fible1's paid version has developed. As per 2 days ago, Tobbelino's one was much better (not to mention, free). This volatility check addition is a must-have, and I saw it was implemented in fible1's version, too. Any clue on how it performed? Is tobli's version always the best one?

Here is the volatility one I made yesterday https://bitcointalk.org/index.php?topic=67591.msg2122016#msg2122016 which is free because most of it is other peoples work as it is TobbeLino's version with a volatility check, I'm still testing though, I literally finished coding the modification last night and have only run it for about 10 hours today. But it is avoiding sells and buys.

I'm also figuring out other ways to make it smarter, as during stable periods like we've seen these last few days it an be too agressive.


Is there anyway to avoid having the bot sell at a loss? I was on the unfortunate end of my bot buying at the top and selling at the bottom and would of rather saved those coins. Or is it simply better to have the bot do its thing and eventually come out on top?
rikigst
Jr. Member
*
Offline Offline

Activity: 46


So long and thanks for all the fish


View Profile
May 12, 2013, 08:22:42 PM
 #364

eduk, I've noticed you happen to know how far fible1's paid version has developed. As per 2 days ago, Tobbelino's one was much better (not to mention, free). This volatility check addition is a must-have, and I saw it was implemented in fible1's version, too. Any clue on how it performed? Is tobli's version always the best one?

Here is the volatility one I made yesterday https://bitcointalk.org/index.php?topic=67591.msg2122016#msg2122016 which is free because most of it is other peoples work as it is TobbeLino's version with a volatility check, I'm still testing though, I literally finished coding the modification last night and have only run it for about 10 hours today. But it is avoiding sells and buys.

I'm also figuring out other ways to make it smarter, as during stable periods like we've seen these last few days it an be too agressive.


Is there anyway to avoid having the bot sell at a loss? I was on the unfortunate end of my bot buying at the top and selling at the bottom and would of rather saved those coins. Or is it simply better to have the bot do its thing and eventually come out on top?

In my opinion, the volatility check wouldn't have let the bot buy btcs in the first place, thus it wouldn't have sold at a loss: what we've been experiencing for the last days were strong price raises which weren't supported by the market itself for the following hours (letting the price fall again).
By checking for AT LEAST two intervals that the volatility is above the threshold, your situation could be avoided (the sample immediately after the price explosion would have had a low volume, not allowing the bot to buy).


Since this is turning into community-driven development, I think that strategy-based commits should be done one at a time, evaluating each time which improvents can be done, and how. (this is because, IMHO, stop-loss strategy would be redundant w/ volatility check, but I could be proven wrong easily once everybody gets the volume-check version)

bitboat.net - Compra Bitcoin con ricarica Superflash!
CMMPro
Hero Member
*****
Offline Offline

Activity: 574



View Profile
May 12, 2013, 08:52:01 PM
 #365

Beautiful! Thanks for this. I just got out of newbie jail and also wanted to thank Tobbelino for his work as well.
Once I get these up I will definitely send some mBtc your guys way!

I would love to see a better indicator used for the crossover....ideally MACD.
Since we have the two EMA's MACD is simple calculation really...but right now out of my coding talent level.

http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:moving_average_conve&gclid=CJXQ7ZX6kLcCFUNlMgodKXkAxA

MACD Line: (12-day EMA - 26-day EMA)
Signal Line: 9-day EMA of MACD Line
MACD Histogram: MACD Line - Signal Line

That calculation using a multiple day EMA is currently out of the scope of the bot because it will only collect the last 144 samples from Mt Gox. This can be extended to 1000 if you change "const MaxSamplesToKeep = 144;" at the top of background.js but at small intervals won't reach that far to collect that amount of data.

Alternatively the calculation could be done over a shorter time period, or the bot would need to be upgraded to store past data somehow or get it from somewhere else.


Thanks for spending some brain power on thinking about MACD.

I believe in this case you can use the term "period" as opposed to "day".

ie:
MACD Line: (12-period EMA - 26-period EMA)
Signal Line: 9-period EMA of MACD Line
MACD Histogram: MACD Line - Signal Line

With Bitcoin trading operating 24/7 we don't really have a "daily close" to use for reference...so I think that a 15 min-1 hour "period" would suffice.
In all reality I believe the market speed is way faster than anything going on a daily close on Wall St.
I don't think even Forex is moving this fast for the most part...it is running something closer to commodity trading speeds.
viperzero
Jr. Member
*
Offline Offline

Activity: 39



View Profile WWW
May 12, 2013, 09:58:24 PM
 #366

Thankyou for all developers and Eduk for implementing volatility check. It's crucial not to make trades in ranging markets because Risk/Reward ratio is negative with this kind of approach. MtGox .45-.6% fee is so high. Also This MACD approach can be manipulated pretty easily imho on short timeframes.

Equity preservation is necessary, if somebody remembers flashcrash....seems this happens in bitcoin market nearly every month (after 5 years i can put this--> Cheesy ), so I wouldn't take more than 3,5% hit on a single trade.

I haven't coded for a long time but I also try to tinker & test some strategies, perhaps on MT4/MT5 platform.  Found just looking for graphs few indicator combinations which I like to test. Have to check can I incorporate them on Eduk botversion too if they prove worthy.

Now we are on a verge of magical VWAP range 112-115  and volumes are low so good time to run Eduk's latest addition in test mode. but if it breaks under 112$ with strong volume I keep in cash and buy back around 80-85$ Wink, manually.

Forex is actually tenfold faster HFST automated market but price changes are smaller,  leverage is just because of that. There are floorfull of mathematicians and programmers...in one company. Interesting to see how new currency takes babysteps and how different strategies come in play.
eduk
Newbie
*
Offline Offline

Activity: 14


View Profile
May 12, 2013, 10:11:46 PM
 #367

Updated version of bot posted on https://bitcointalk.org/index.php?topic=67591.msg2122016#msg2122016

Download: https://mega.co.nz/#!B9sk3ApC!P4VC-HyInOz6fL2o6FRXTEcrofUSHFY69CDcOOLbdNE


Added volatility to the graph
Made the sound only play when a real transaction goes through because in simulation mode it plays too often.

Added an additional check that the final sample of the EMA is actually trending, so if you have say 2 or 3 EMA samples and the latest sample is actually against the EMA trend it will spot the slight change in direction and wait for the next sample to buy (if it is again back on the trend). This makes the bot slightly smarter and really is a necessity in case the EMA is still above your threshold but volatility is suddenly high because of a sudden change in direction (I will add option to turn that on/off in options later but I believe it should be a default setting to on).

So for example you have EMA set to 3 samples and the EMA comes out in order 0.15% 0.24% 0.21%: this will not buy as the 0.21% suggests trend is not continuous, the previous versions would have still bought in here!.
If it comes out 0.15% 0.24% 0.26%: then this is a continuous trend and should buy.
If it comes out 0.15% 0.24% 0.21% 0.25%: then it skips the 0.21% and because the next one is 0.25% and again higher suggesting trend is staying and should therefore buy.

I think this is smarter, thoughts?
maverick1337
Jr. Member
*
Offline Offline

Activity: 38


View Profile
May 12, 2013, 10:38:50 PM
 #368

Updated version of bot posted on https://bitcointalk.org/index.php?topic=67591.msg2122016#msg2122016

Download: https://mega.co.nz/#!1lUVAC4J!P6KIlB7NRSCTMk66Y1v9xndDZFNTadSI5qfnMVc5NAE

Added volatility to the graph
Made the sound only play when a real transaction goes through because in simulation mode it plays too often.

Added an additional check that the final sample of the EMA is actually trending, so if you have say 2 or 3 EMA samples and the latest sample is actually against the EMA trend it will spot the slight change in direction and wait for the next sample to buy (if it is again back on the trend). This makes the bot slightly smarter and really is a necessity in case the EMA is still above your threshold but volatility is suddenly high because of a sudden change in direction (I will add option to turn that on/off in options later but I believe it should be a default setting to on).

So for example you have EMA set to 3 samples and the EMA comes out in order 0.15% 0.24% 0.21%: this will not buy as the 0.21% suggests trend is not continuous, the previous versions would have still bought in here!.
If it comes out 0.15% 0.24% 0.26%: then this is a continuous trend and should buy.
If it comes out 0.15% 0.24% 0.21% 0.25%: then it skips the 0.21% and because the next one is 0.25% and again higher suggesting trend is staying and should therefore buy.

I think this is smarter, thoughts?
I think that is a great idea. But I'm worried about the amount of samples taking too long. Usually when there is a trend it spikes very quickly and can gain a couple dollars within the hour or two you waited for the samples. The same could be for selling. You see the lines go down and you figure you want to sell as quickly as possible but now you want to wait another hour or 2 to see if it's really going down. More often than not it declines very rapidly and spikes up a little and then back down. I try to buy in when there is a clear trend and get out as soon as it looks bad. I guess this is a way to play it safe for the long term but I was wondering what your thoughts are.
TobbeLino
Jr. Member
*
Offline Offline

Activity: 42



View Profile WWW
May 12, 2013, 10:45:14 PM
 #369

Hi all, I'm new to Bitcointalk been waiting hours to get out of newbie mode to post this. Yesterday I spent quite a long times learning the inner workings of this bot, I took TobbeLino's version and have made some modifications to attempt to start making the bot a bit smarter.

I have added some volatility data with a volatility buy threshold/sell threshold that must also be passed before a trade is executed.

The volatility data is worked out by taking X amount of samples (which you can set in options) and then finding the lowest and highest sample from within them. The lowest is then taken away from the highest to give the difference. This volatility score is the added to the volatility score from a couple of samples ago and divided by 2 to smooth it out slightly.

Whether this is the best way of working out volatility, I'm not sure. I found this true range and average true range from this link and basically simplified it http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_true_range_atr

So if anyone has any ideas how to improve this volatility score, just let me know.

Also please test it with small amounts as I've only been using it for 5 minute samples so far, there have also been some changes to the section which determines whether to execute a trade and so use at your own risk. I used this morning and it made a sell at 11:40 BST as in image below.



Options have been added to set it up. I'm liking the look of 3 volatility samples with about a 0.9 to 1.2 threshold on each. I believe that this volatility check will  also allow you to lower the main buy sell thresholds.

Download: https://mega.co.nz/#!k9EERBpI!fr0EdklaQIZPyfVqF7C-aRYeBRwkqc0bdzbitz4Xho4
(Copy/Paste this as forum screwed it up)

As a bonus I have also added a sound notification so that when a trade gets made you can hear it happening.

@TobbeLino, if you like this update, feel free to add to it to your GitHub / improve upon it or contact me.

Thanks! I'll have to think about this before adding it to my bot...
My spontaneous reaction is that this seems to a over-simplistic way to get a volatility indicator (but I'm no expert in this), so it will not be very reliable. Each sample is only ONE single trade on ONE point in time, so you are only looking at three trades (out of all hundreds or thousands that take place during an interval).  Maybe for very short intervals you could get some useful data if you're lucky, but with trading intervals of 30 minutes or more (or even 15 minutes) I'm think that your volatility indicatior will not reflect the true volatility.

Personally, I'm also a bit sceptical about using volatility as an indicator at all (at least in this way).
I'd much rather use a volume indicator. But to implement that, the bot needs to fetch a whole different kind of data (total volume between sample intervals for instance).

I see mostly "Jr. Members" (including me) commenting and suggesting features for the bot - are there anyone who actually know the theories here? Unfortunately I think that MtGox APIs (which are not very good in my opinion) will probably limit how complex indicators this bot can calculate.

In general, I think that there seems to be some misconceptions of what to expect from a trading bot.
A bot is not a "magic money making machine" Smiley
Any bot (or human) will make bad trades sometimes - no matter how "smart" it is.
But the goal is that it should be able to make more good trades than bad trades, and that it will make money, slowly, steadily in the long run.  And I don't think it's possible to just "speed up" the process and make more money in shorter time, simply by setting a shorter sample interval - the trading fees will probably take all your profit away.

But as I've said before: I'm better at programming and software development that at trading - thats why I need a bot! Smiley
So if there are any true experts here with real experience with designing trading bot strategies, please feel free to comment!

Try my modified trading bot for Chrome:
https://github.com/TobbeLino/GoxTradingBotTobli
TobbeLino
Jr. Member
*
Offline Offline

Activity: 42



View Profile WWW
May 12, 2013, 11:07:52 PM
 #370

eduk, I've noticed you happen to know how far fible1's paid version has developed. As per 2 days ago, Tobbelino's one was much better (not to mention, free). This volatility check addition is a must-have, and I saw it was implemented in fible1's version, too. Any clue on how it performed? Is tobli's version always the best one?

Here is the volatility one I made yesterday https://bitcointalk.org/index.php?topic=67591.msg2122016#msg2122016 which is free because most of it is other peoples work as it is TobbeLino's version with a volatility check, I'm still testing though, I literally finished coding the modification last night and have only run it for about 10 hours today. But it is avoiding sells and buys.

I'm also figuring out other ways to make it smarter, as during stable periods like we've seen these last few days it an be too agressive.


Is there anyway to avoid having the bot sell at a loss? I was on the unfortunate end of my bot buying at the top and selling at the bottom and would of rather saved those coins. Or is it simply better to have the bot do its thing and eventually come out on top?

I think the philosofy with bots is that they "win some and lose some", but if tuned, they should win more than they lose and make a steady profit in the long run. But the last days have been hard for the bots or any swing trader - the market is too clam, low volumes and no swing to trade on...

I think (my opinion of course) that it would be very risky to "forbid" a bot to sell at a loss. Becuase then you have already decided that the market eventually "must" go up above what you paid. But this may never happen, or may take a very long time, and the bot can't trade while you wait for the market to recover (if you had a bot like that running when the market dove from $250 last month, it would not have sold if it made any trades near the peak, and it would now be sitting here, waiting, waiting for the market to reach ~$250 again).  The only thing that matters is: where will the price go from now? If up: buy/keep! If down: sell/stay out - no matter what you paid or how you traded "yesterday". Even if it sells at a loss, it's no point in follow the trend down, losing even more. Better to sell and buy later and follow the trend up again.

Try my modified trading bot for Chrome:
https://github.com/TobbeLino/GoxTradingBotTobli
TobbeLino
Jr. Member
*
Offline Offline

Activity: 42



View Profile WWW
May 12, 2013, 11:11:51 PM
 #371

In my opinion, the volatility check wouldn't have let the bot buy btcs in the first place, thus it wouldn't have sold at a loss: what we've been experiencing for the last days were strong price raises which weren't supported by the market itself for the following hours (letting the price fall again).
By checking for AT LEAST two intervals that the volatility is above the threshold, your situation could be avoided (the sample immediately after the price explosion would have had a low volume, not allowing the bot to buy).

Since this is turning into community-driven development, I think that strategy-based commits should be done one at a time, evaluating each time which improvents can be done, and how. (this is because, IMHO, stop-loss strategy would be redundant w/ volatility check, but I could be proven wrong easily once everybody gets the volume-check version)

Are you confusing volatility with volume?
That's two very different things...
And the function of a stop-loss can't be replaced by volatility- or volume checks

Try my modified trading bot for Chrome:
https://github.com/TobbeLino/GoxTradingBotTobli
maverick1337
Jr. Member
*
Offline Offline

Activity: 38


View Profile
May 12, 2013, 11:23:31 PM
 #372

.
Does the succession have to be past your threshold? Say your threshold is 0.2 and the last three samples are 0.15 0.19 and 0.23. Does it buy based off the current trend even before the pass in threshold or do all samples have to be past the threshold (ie 0.21 0.24 0.26 --> BUY!)?
TobbeLino
Jr. Member
*
Offline Offline

Activity: 42



View Profile WWW
May 12, 2013, 11:23:39 PM
 #373


I think that is a great idea. But I'm worried about the amount of samples taking too long. Usually when there is a trend it spikes very quickly and can gain a couple dollars within the hour or two you waited for the samples. The same could be for selling. You see the lines go down and you figure you want to sell as quickly as possible but now you want to wait another hour or 2 to see if it's really going down. More often than not it declines very rapidly and spikes up a little and then back down. I try to buy in when there is a clear trend and get out as soon as it looks bad. I guess this is a way to play it safe for the long term but I was wondering what your thoughts are.

I think you misunderstand a bit how a bot works. A bot will never "buy at the bottom and sell at the top". It will always wait and see if the trends seems solid. That's just how it's supposed to work, and that's why it is often (but not always) more successful than myself trading manually Smiley  If you try to buy at the very bottom of a swing, and sell at the very top, you will have to take way to high risks all the time, and you will very often find yourself out of synch with the trends (because you bought or sold to early, thinking you where at the bottom/top), and you start losing...

Try my modified trading bot for Chrome:
https://github.com/TobbeLino/GoxTradingBotTobli
maverick1337
Jr. Member
*
Offline Offline

Activity: 38


View Profile
May 12, 2013, 11:58:35 PM
 #374


I think that is a great idea. But I'm worried about the amount of samples taking too long. Usually when there is a trend it spikes very quickly and can gain a couple dollars within the hour or two you waited for the samples. The same could be for selling. You see the lines go down and you figure you want to sell as quickly as possible but now you want to wait another hour or 2 to see if it's really going down. More often than not it declines very rapidly and spikes up a little and then back down. I try to buy in when there is a clear trend and get out as soon as it looks bad. I guess this is a way to play it safe for the long term but I was wondering what your thoughts are.

I think you misunderstand a bit how a bot works. A bot will never "buy at the bottom and sell at the top". It will always wait and see if the trends seems solid. That's just how it's supposed to work, and that's why it is often (but not always) more successful than myself trading manually Smiley  If you try to buy at the very bottom of a swing, and sell at the very top, you will have to take way to high risks all the time, and you will very often find yourself out of synch with the trends (because you bought or sold to early, thinking you where at the bottom/top), and you start losing...


Well what happened was I had it set to 30 min. intervals and by the time it passed my thresholds it bought but it was at the very top. I went to bed and it happened to just tank after it bought, then it passed my sell threshold and sold at a loss and I lost $40. I'm trying to figure out how to avoid this happening in the future, any thoughts?
JRam
Jr. Member
*
Offline Offline

Activity: 31


View Profile
May 13, 2013, 05:54:10 AM
 #375

Hello all,

Is there a trading bot that just gives a trailing stop loss option? I simply want the bot to sell my BTCs on Mt. Gox if the current price of BTC drops 10% within a specified time span. I prefer to do all BTC buying myself but cannot monitor my BTC investments 24/7. If Mt. Gox ever implemented a trailing stop loss function, I would absolutely use it for its convenience. In the meantime, I'm looking for a bot that can perform this function. Thanks.

1NPbGcu1MkCHuZXDwm4Krp8vQxm3HLDPRj
SpandexMonkey
Newbie
*
Offline Offline

Activity: 8


View Profile
May 13, 2013, 11:58:59 AM
 #376

I've been running this bot for about 5 days so far.

I started with 0.5btc and now I'm down to 0.4btc. I have the standard settings, and every single trade has been at a loss Sad

Has this happened to other users of this bot recently?
Razick
Hero Member
*****
Offline Offline

Activity: 756


Romans 3:23-24


View Profile
May 13, 2013, 02:50:49 PM
 #377

Hello all,

Is there a trading bot that just gives a trailing stop loss option? I simply want the bot to sell my BTCs on Mt. Gox if the current price of BTC drops 10% within a specified time span. I prefer to do all BTC buying myself but cannot monitor my BTC investments 24/7. If Mt. Gox ever implemented a trailing stop loss function, I would absolutely use it for its convenience. In the meantime, I'm looking for a bot that can perform this function. Thanks.

If Mt.Gox implemented a stop loss feature, it would likely result in much larger crashes any time the market drops. I'm not a fan of that anyway because I like to buy low, instead of selling low.  Wink
IdiotHole
Newbie
*
Offline Offline

Activity: 13


View Profile
May 13, 2013, 03:52:39 PM
 #378

I've been running this bot for about 5 days so far.

I started with 0.5btc and now I'm down to 0.4btc. I have the standard settings, and every single trade has been at a loss Sad

Has this happened to other users of this bot recently?
I don't think current market conditions are suited to bot use.

That said, I'm currently running eduk's version just to see how things go.

The only time I've lost money was when I stupidly started the bot in the middle of a downward trend and it did an instant sell.
eduk
Newbie
*
Offline Offline

Activity: 14


View Profile
May 13, 2013, 04:05:12 PM
 #379

I've managed to get the bot to get the latest ask and bids prices from the market depth. I'm thinking that we could do a check to see how much it would cost to buy say 500 bitcoins and if that figure is below say $1 above the current latest price then it will stop a buy taking place and vice versa for sells. Basically spotting where the buy and sell walls are, this can definitely be done.
telemaco
Sr. Member
****
Offline Offline

Activity: 369



View Profile
May 13, 2013, 05:47:24 PM
 #380

Thanks for your great work,

Cannot download version 2. Mega says it is currently unavailable. Do you have other address?

Another thing. Would be possible to have a bigger graph? (even full screen).
And last one. Would be great if the Keep BTC could be in percent, in that way you could always save an amount of BTC and that would go and grow with your savings

Thanks,
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!