Pages:
Author

Topic: Chrome Browser extension: MtGox trading bot - page 10. (Read 72509 times)

newbie
Activity: 40
Merit: 0

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?
newbie
Activity: 42
Merit: 0

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...
newbie
Activity: 40
Merit: 0
.
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!)?
newbie
Activity: 42
Merit: 0
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
newbie
Activity: 42
Merit: 0
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://bitcointalksearch.org/topic/m.2122016 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.
newbie
Activity: 42
Merit: 0
newbie
Activity: 40
Merit: 0
Updated version of bot posted on https://bitcointalksearch.org/topic/m.2122016

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.
newbie
Activity: 14
Merit: 0
Updated version of bot posted on https://bitcointalksearch.org/topic/m.2122016

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?
member
Activity: 301
Merit: 10
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.
hero member
Activity: 588
Merit: 500
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.
newbie
Activity: 46
Merit: 0
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://bitcointalksearch.org/topic/m.2122016 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)
newbie
Activity: 40
Merit: 0
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://bitcointalksearch.org/topic/m.2122016 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?
newbie
Activity: 14
Merit: 0
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://bitcointalksearch.org/topic/m.2122016 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.

newbie
Activity: 46
Merit: 0
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?
newbie
Activity: 12
Merit: 0
Thanks Smiley

I'll look into this and run it for a while in sim mode along side TobbeLino's bot to see how it behaves...
newbie
Activity: 14
Merit: 0
I found one ranging market indicator which worked well on forex: Damiani volatmeter. Heres a link to discussion and source codes (in MQ4) for that. As you can see from the picture filtering is crucial for systems like this.

http://www.tradingsystemforex.com/indicators/431-how-to-determine-if-a-market-ranging.html
This looks very interesting indeed.  With this kind of ranging market detection in place the bot could be left running even in flat periods like the last few days without worrying about losing money.  Given that the source is included, I wonder how hard this would be to incorporate into the bot?  I've not done any coding for a while but might have to look into this if I ever get the time.

Have a look at the one version I posted above with added volitality check. You should be able to just change the function "updateVol" to do a completely different calculation and therefore use a different indicator. The work of adding new thresholds and checking for them is all included.
newbie
Activity: 14
Merit: 0
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.
newbie
Activity: 12
Merit: 0
I found one ranging market indicator which worked well on forex: Damiani volatmeter. Heres a link to discussion and source codes (in MQ4) for that. As you can see from the picture filtering is crucial for systems like this.

http://www.tradingsystemforex.com/indicators/431-how-to-determine-if-a-market-ranging.html
This looks very interesting indeed.  With this kind of ranging market detection in place the bot could be left running even in flat periods like the last few days without worrying about losing money.  Given that the source is included, I wonder how hard this would be to incorporate into the bot?  I've not done any coding for a while but might have to look into this if I ever get the time.
hero member
Activity: 588
Merit: 500
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
newbie
Activity: 14
Merit: 0
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.

http://i.imgur.com/N3zkxVu.png

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.
Pages:
Jump to: