Pages:
Author

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

full member
Activity: 126
Merit: 100
How long does it take for the plugin to access the account via the API key & Secret?
I added the two keys in the settings, but it still says:

Problem accessing MtGox account.
Go check the Options page.
newbie
Activity: 12
Merit: 0
Thanks a bunch for the bot, im only for the last few days fooling around with it. The BTC market hasnt been doing shiz for the last few days, so I havent gotten anymore than one trade through the bot. I HAVE noticed two times my bot has disabled itself within the last few days, I was wondering if this was a known issue..?

Thanks again for the bot! Cheesy

edit>> This is in relation to TobbeLino's version!
newbie
Activity: 42
Merit: 0
Right, but do you agree with the idea of considering not only the current value of ema-diff, but its trend, too?

Interesting idea, but all EMA bots at the moment are based on the Goomboo's Journal. Goomboo, as a trader, suggested that the more simple rules such a trading system has, the more profit it will generate in the long run.

Well, Goomboo didn't say anything about thresholds or 'buying after N samples above threshold', but those are working tricks! While we don't get too far from the original idea, I think that improvements are still to be done! (the 99 bucks bot guy sorta implemented this, allowing negative thresholds, but that's rough)

Well, I don't think "the 99 bucks bot guy" has based his work on any scientific knowledge really Smiley He will probably implement any crazy idea as long as someone pays him to do so and it looks good in the feature list of his bot. But the only strategy he is pursuing is probably the one that makes himself earn a buck Wink
newbie
Activity: 42
Merit: 0

How about peaks 1 & 2? They have to be ignored! Peak 4 (which is the actual price maximum btw) is going to be ignored? (should be!)
Any help is appreciated, thank you.


Well, finding the actual, true peaks in the EMA-diff graph is just as hard as finding the true peaks in the price graph.
If we could do that without errors, we would all be rich Smiley
Right, but do you agree with the idea of considering not only the current value of ema-diff, but its trend, too?

It's hard to say as it's a totally different strategy, but I think no (at least for this kind of bot).
Isn't the point when the derivative of the EMA-diff = 0 (i.e. when it has a peak or a bottom) probably the same point as when the price itself turns up or down?
In that case the bot could just as well simply look at the price itself: If it's turning down: Sell! It's turning up: Buy!
But unfortunately trading is not that easy, and that's exactly what the EMA-bot tries to help us with in the first place...

Goomboo's EMA-strategy is designed to not make too hasty decisions, so it will never be able to hit the exact peaks or bottoms. It's designed to wait until a trend has been identified, and that takes (per definition) time. The whole reason for the bot reacting "slowly" (and sometimes buys at the top and sells at the bottom - out-of-sync with the market) is because detecting the "true" peaks/bottoms IS the whole problem here, and it's a very hard problem! (and in some way it's an "impossible" problem, because the very moment people find a way to predict the market, the market itself will change because of this).
The problem of finding the peaks/bottoms is very deceptive because it looks SOOO easy when looking at a chart afterwards Smiley But as we all know, it's a whole different story to try to predict where the price will go "from here"...

So, I think the bottom line is that any attempt at trying to "speed up" the EMA-bot and make it react faster to the market is actually short circuiting the whole strategy of the bot. It's not designed to react quickly, and making hasty decisions is what humans do! Smiley
newbie
Activity: 46
Merit: 0
Right, but do you agree with the idea of considering not only the current value of ema-diff, but its trend, too?

Interesting idea, but all EMA bots at the moment are based on the Goomboo's Journal. Goomboo, as a trader, suggested that the more simple rules such a trading system has, the more profit it will generate in the long run.

Well, Goomboo didn't say anything about thresholds or 'buying after N samples above threshold', but those are working tricks! While we don't get too far from the original idea, I think that improvements are still to be done! (the 99 bucks bot guy sorta implemented this, allowing negative thresholds, but that's rough)
sr. member
Activity: 287
Merit: 250
Right, but do you agree with the idea of considering not only the current value of ema-diff, but its trend, too?

Interesting idea, but all EMA bots at the moment are based on the Goomboo's Journal. Goomboo, as a trader, suggested that the more simple rules such a trading system has, the more profit it will generate in the long run.

I'm currently working on implementing a backtesting feature for Gekko, when this is done it's pretty easy to test such a system against a lot of data (say the last 12 months). That way it will be a lot easier to say wether such a system will have more success. (Note that are a lot of trading tools already available that support backtesting).
newbie
Activity: 46
Merit: 0

How about peaks 1 & 2? They have to be ignored! Peak 4 (which is the actual price maximum btw) is going to be ignored? (should be!)
Any help is appreciated, thank you.


Well, finding the actual, true peaks in the EMA-diff graph is just as hard as finding the true peaks in the price graph.
If we could do that without errors, we would all be rich Smiley
Right, but do you agree with the idea of considering not only the current value of ema-diff, but its trend, too?
newbie
Activity: 42
Merit: 0

How about peaks 1 & 2? They have to be ignored! Peak 4 (which is the actual price maximum btw) is going to be ignored? (should be!)
Any help is appreciated, thank you.


Well, finding the actual, true peaks in the EMA-diff graph is just as hard as finding the true peaks in the price graph.
If we could do that without errors, we would all be rich Smiley
newbie
Activity: 46
Merit: 0
What I've been noticing lately, is that lowest and highest prices occurr when the EMA diff. percentage stops growing (or decreasing).
Looking at the bot's popup, I noticed how the lowest prices often have the lowest ema difference percentage, as the highest prices occurr when ema-diff is inverting its trend.
With the current strategy, the bot's behaviour would be this: (graph w/actual bot data, interval is 30m, thresholds in grey +/- 0.25%, first graph is ema-diff, second is price)

So, the bot would have bought around 119 (friday 17 @ 13.30 utc+2) and sold around 120 (yesterday, sunday 19 @ 19.00 utc+2), with a price difference of 0.8% (diff=1$), just enough to cover Mtgox fees.

This is because of the ema indicator's inertia: once price has begun to decrease, ema stays positive for another X samples (X varies greatly), and while the SELL threshold is reached, price has lowered a lot.

If we search for price maximums and minimums in the bot's popup, one may notice how price peaks occur at the same time of EMA-diff peaks. In other words, we should need another indicator for monitoring ema-diff, not the price! (Like two emas based on the ema-diff as the signal, not the price. Like we need the second derivative, not the first one.)

Look at this:


Let's concentrate on points 3 and 6 for now, ignore those yellow circles. So, once we've established point #3 is a maximum of ema-diff, it should be a good time to sell: price is likely going down for the next samples (the bot would have bought around 113/115, check for yourself as the bot doesn't return older data). Similarly, buying @point #6 would be a good choice.

Now: since at present time we don't know shit about the future trend of ema-diff, how do we know we're in a good peak?
First of all, we're not in a peak if the following ema-diff is greater than the current one. (So a trading delay of minimum 1 sample is intrinsic)
Second, peaks around the 0% line (like 5, 7, 8 ) are to be ignored.

So, it seems like accepting as maximums/minimums those points
1) above a certain threshold
2) followed by a trend-inverting sample
is a good solution.

How about peaks 1 & 2? They have to be ignored! Peak 4 (which is the actual price maximum btw) is going to be ignored? (should be!)
Any help is appreciated, thank you.
newbie
Activity: 40
Merit: 0
What happened was the lines were already crossed to buy. When you started the ability to trade the buy threshold was passed and it bought. Well it went down and it passed your sell threshold then sold. Basically, you need to "turn on" your bot when your settings will not automatically make a trade.
member
Activity: 95
Merit: 10
I downloaded this (the modified version by tobbeLino) earlier today and I haven't been running it very long, only one buy and one sell executed. However it seems backwards...I'm sure it's probabley just me but take a look:
    2013/05/19 20:15:50    
BTC bought: 0.32390822 BTC at $122.42764
   2013/05/19 18:35:51              
BTC sold:  0.33231729 BTC at $120.05000

I have thresholds set at: Buy: 0.25% Sell: -0.25% (default settings) so I can see why it sold low and bought high. Shouldn't it buy when the EMA is trending down and sell when the EMA is trending up? Is there a VWAP cross or something else in the bid/ask logic thats not visible?
I had my sample intervals set pretty short at the time so I expected some messy results but even when I look at the built in chart when the sample is set to 30min/1hr it still looks backwards. Looking at the default settings (except show last 5 days) at 5/15 08:00 the price is 112.76 with an EMA divergence of -0.602% which would trigger a sell (say 1 btc at 112.76, ignore fees for simplicity) thus leaving 112.76 in my gox acct. Then at 5/15 21:00 the price is 115.00 with a convergence of 0.281%, the first one meeting the buy threshold, so a buy order would go in for 0.98 btc, causing a loss of 0.02 btc.
I'm aware it may seem like I'm cherry picking data but I picked it rather arbitrarily. I also realize there are scenarios where the current settings would result in a profit; however when looking at shorter sample intervals I'm confused as to how the buy high sell low makes sense (at least without adding additional variables like VWAP or something). Maybe I've been staring at the charts and fooling with ATPs too much today and my brains burning out but can anyone clarify this?

Mucho gracias
hero member
Activity: 514
Merit: 500

Be careful, eduk's version is not implementing fixes from tobli's v0217 and v0218 (v2 api etc.). Furthermore, I strongly advise you not to use sampling intervals shorter than 15 minutes: I started with 10m, and lost a lot even with high thresholds. I'm better off with 30m now!

Yes, be careful with very short intervals...
I advice everyone that uses this bot to check out Goomboo thread that describes the strategy that this bot uses: https://bitcointalksearch.org/topic/goomboos-journal-60501.

I quote from his second post in that thread:
"I caution against the lower timeframes because for the most part, they are just noise.  The spread is so large and the market is so thinly traded that if you are trying to make money on a chart of less than an hour, it can be very difficult."
I havent studied this but would not using for example 10/21 on a one hour chart be the equivalent of using 20/42 on a 30 min chart?

i'm afraid that's not true, try yourself @ bitcoincharts.com
just had another look and if there is a difference its very slight, to my eye anyway
newbie
Activity: 42
Merit: 0

100% agreed, but I would add that Goomboo said that in January 2012, a time when the market was a lot smaller and different.

Yes, you're right - the situation may be a bit different now. But I still think that many movements on the minute time scale is caused by single buyers/sellers, and it takes some time for a proper trend to form. With the current trading fees at MtGox, it seems hard to make a profit on a "micro-trading".
hero member
Activity: 826
Merit: 1000
I can't figure out how to set-up this bot. I'm running it with settings that I thought were good for 3 days now and it didn't do anything. Is there a way to do a simulation? Or give me something to start with. I also have a question. Is setting sample to 10 minutes and trade after 3 samples about the same as 30 minutes and 1 sample? I was thinking that so I can see trade get ready and disable trading if I don't agree with the bot.
newbie
Activity: 46
Merit: 0

Be careful, eduk's version is not implementing fixes from tobli's v0217 and v0218 (v2 api etc.). Furthermore, I strongly advise you not to use sampling intervals shorter than 15 minutes: I started with 10m, and lost a lot even with high thresholds. I'm better off with 30m now!

Yes, be careful with very short intervals...
I advice everyone that uses this bot to check out Goomboo thread that describes the strategy that this bot uses: https://bitcointalksearch.org/topic/goomboos-journal-60501.

I quote from his second post in that thread:
"I caution against the lower timeframes because for the most part, they are just noise.  The spread is so large and the market is so thinly traded that if you are trying to make money on a chart of less than an hour, it can be very difficult."
I havent studied this but would not using for example 10/21 on a one hour chart be the equivalent of using 20/42 on a 30 min chart?

i'm afraid that's not true, try yourself @ bitcoincharts.com
hero member
Activity: 514
Merit: 500

Be careful, eduk's version is not implementing fixes from tobli's v0217 and v0218 (v2 api etc.). Furthermore, I strongly advise you not to use sampling intervals shorter than 15 minutes: I started with 10m, and lost a lot even with high thresholds. I'm better off with 30m now!

Yes, be careful with very short intervals...
I advice everyone that uses this bot to check out Goomboo thread that describes the strategy that this bot uses: https://bitcointalksearch.org/topic/goomboos-journal-60501.

I quote from his second post in that thread:
"I caution against the lower timeframes because for the most part, they are just noise.  The spread is so large and the market is so thinly traded that if you are trying to make money on a chart of less than an hour, it can be very difficult."
I havent studied this but would not using for example 10/21 on a one hour chart be the equivalent of using 20/42 on a 30 min chart?
sr. member
Activity: 287
Merit: 250
(each new calculated EMA-value takes the previous samples into account, so I think it needs a history of values longer than the actual "EMA-length" to be accurate)

Almost: EMA means that when calculating a new EMA it will take three factors into account: the current price, the last calculated EMA value and a weight factor*. This does mean that for the first EMA you want to use to be accurate it needs to have build up a history of EMAs to compare the current price with.

*The weight factor is just how important the current price is VS how important the last EMA is. So therefor a higher weight like 21 (a EMA21 means the weight is 21) means the last EMA is more important and it will move slower towards the price (lag behind a trend).

So EMA trade bots calculate two different EMAs and compare them to determine if a shortEMA is moving away from the longEMA (using the threshold) and thus know when the market is in trend.

Yes, be careful with very short intervals...
I advice everyone that uses this bot to check out Goomboo thread that describes the strategy that this bot uses: https://bitcointalksearch.org/topic/goomboos-journal-60501.

I quote from his second post in that thread:
"I caution against the lower timeframes because for the most part, they are just noise.  The spread is so large and the market is so thinly traded that if you are trying to make money on a chart of less than an hour, it can be very difficult."

100% agreed, but I would add that Goomboo said that in January 2012, a time when the market was a lot smaller and different.
newbie
Activity: 42
Merit: 0
Thanks a lot for the extension. Especially for the modified version. May I suggest one small improvement? Storing current price in localstorage after buy order was executed and checkbox in options page  to skip sell if current sell price lower than pervious buy price.
Code:
....
if ((tradingEnabled==1)&&(ApiKey!='')) {
if ((skipSellEnabled==1)&&(currentPrice>lastBuyPrice)) {
console.log("SELL! (EMA("+EmaShortPar+")/EMA("+EmaLongPar+")<-"+MinSellThreshold+"% for "+tickCountSell+" or more ticks)");
...

I get many requests about this. However, a function like that will divert from the strategy of a EMA-bot, and it's not quite as easy to implement I think. You are probably looking for a whole different kind of bot with another strategy.

Personally, I'm not all for a function like this because it's just as important for an EMA-bot to sell when it detects a trend down, as it should buy when it detects a trend up, and according to the EMA-bot's strategy, the decision really has nothing to do with the price you previously paid.  Your suggestion is based on the assumption that all drops are just temporary and short, but I think that's a VERY risky assumption! If the price drops, it may very well stay low for a long time. And no matter what you paid for your BTC when you bought them, you really should sell if you think the price will drop further (it's better to sell "now" and buy again on an even lower price, and be able to trade again as soon as the price starts recovering). Just imagine having used your "rule" when the price dropped from $250 a few weeks ago. Your bot would now be sitting here waiting for the price to reach those levels again, but it can take a very long time. In my opinion, it would be better if the bot had sold (with a small loss), and could start working again as soon as an up-trend was detected (maybe somewhere around $70-$80).

And also, I do agree with Goomboo in is thread describing the strategy of this EMA-bot (https://bitcointalksearch.org/topic/goomboos-journal-60501): A simple, straight-forward strategy gives the best results in the long run.
Sure, you can add all kinds of "intelligence" and "smartness" to a bot, but if the "smartness" is based on your own emotional assumptions (e.g. that the price will always go up soon), you WILL get hit very hard if/when your assumptions turn out to be wrong. In my opinion, the whole point of a bot is that it should take emotions like this away, thus lowering the risk (because we humans are very poor at making logic decisions when we "believe" something, and we tend to take way too high risks without even realizing it). So I do like the simplicity and logic behind this original bot. Sure, it WILL do bad trades sometimes, and sure, it could always have done better trades when looking back at the charts, but the relevant question is: would you or another bot have done better? And will you do better in the long run? The idea behind this bot is that it simply should make more good trades than bad ones, and that it should make a steady profit in the long run, without taking high risks like we humans tend to do. It's tempting to try to "speed up" the bot to make more money quickly, but be warned: very short sample intervals tend to catch mostly noise, and there are really no solid trends to act on.

I am, however, considering adding an "experimental" section to the bot, where additional, home-made rules/strategies like this could be added (and used at your own risk, as it WILL seriously cripple the EMA-bot!!). But the question is: How should these other strategies/rules be used in combination with the EMA-bot strategy? I would also like to add some kind of stop-loss feature to that section, but I haven't quite figured out how it should work when the different strategies collide (as they often will!)...

newbie
Activity: 42
Merit: 0
TobbeLino, thnks again for sharing. Very cool.

I'm playing around with the source (will create a pull request if it becomes useful). Just wondering about MaxTradingIntervalMinutes and MaxSamplesToKeep.

What does MaxTradingIntervalMinutes represent?

Is it fine to change MaxSamplesToKeep to anything? Any reason why it's 144? (12x12)?


MaxTradingIntervalMinutes is simply the largest sample interval that can be selected in the settings (180 min). This constant is used then cleaning the cache (to determine if a cached sample can be useful, or if it's old enough to remove)

I advice you against changing MaxSamplesToKeep. The value 144 is from the original bot, and I'm not quite sure why that exact number was picked. But I have read that the original bot used a lower value from the start, but it was criticised that the EMA-calculations needed more values to be accurate, so it was increased to 144... (each new calculated EMA-value takes the previous samples into account, so I think it needs a history of values longer than the actual "EMA-length" to be accurate)
newbie
Activity: 42
Merit: 0

Be careful, eduk's version is not implementing fixes from tobli's v0217 and v0218 (v2 api etc.). Furthermore, I strongly advise you not to use sampling intervals shorter than 15 minutes: I started with 10m, and lost a lot even with high thresholds. I'm better off with 30m now!

Yes, be careful with very short intervals...
I advice everyone that uses this bot to check out Goomboo thread that describes the strategy that this bot uses: https://bitcointalksearch.org/topic/goomboos-journal-60501.

I quote from his second post in that thread:
"I caution against the lower timeframes because for the most part, they are just noise.  The spread is so large and the market is so thinly traded that if you are trying to make money on a chart of less than an hour, it can be very difficult."
Pages:
Jump to: