Bitcoin Forum
December 09, 2016, 11:46:52 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   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 67307 times)
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
March 08, 2012, 09:11:41 AM
 #101


Then extract all the source files to a separate folder,

How did you do this?

Wait -- spoke too soon.  I actually do need some clarity on this if you would please:  Please explain how you extract the source files?  I only see "pack extension" and "load unpacked extension"...   Huh
As I said, it is a zip archive - unpack it with any un-zipper. Not with Chrome.

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481284012
Hero Member
*
Offline Offline

Posts: 1481284012

View Profile Personal Message (Offline)

Ignore
1481284012
Reply with quote  #2

1481284012
Report to moderator
1481284012
Hero Member
*
Offline Offline

Posts: 1481284012

View Profile Personal Message (Offline)

Ignore
1481284012
Reply with quote  #2

1481284012
Report to moderator
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
March 08, 2012, 09:19:22 AM
 #102

I'm wondering about why the historical EMAfast and EMAslow values are changing after a reload of the tool.
It's probably because of the number of candles which the extension has in the memory - and then calculates the EMAs upon.
At startup it fetches 48 candles (hours) - so the Exponential Average is calculated starting from 48 hours back.
Later, when you let it running and new hours are fetched - the EMA is calculated starting from more than 48 hours back...
But if you reload the extension, it again re-fetches only the last 48 hours.
Thus the difference - though, it shouldn't be really significant. At least as long as you don's use EMA parameter above 30 or so.

I could fetch more hours at startup to make the EMA values more precise, but then it would start longer...
48 seemed like a good compromise - but it's very easy to change it, if you think that longer startups would be better Tongue

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
BTC-engineer
Sr. Member
****
Online Online

Activity: 338



View Profile
March 08, 2012, 09:54:07 AM
 #103

I'm wondering about why the historical EMAfast and EMAslow values are changing after a reload of the tool.
It's probably because of the number of candles which the extension has in the memory - and then calculates the EMAs upon.
At startup it fetches 48 candles (hours) - so the Exponential Average is calculated starting from 48 hours back.
Later, when you let it running and new hours are fetched - the EMA is calculated starting from more than 48 hours back...
But if you reload the extension, it again re-fetches only the last 48 hours.
Thus the difference - though, it shouldn't be really significant. At least as long as you don's use EMA parameter above 30 or so.

I could fetch more hours at startup to make the EMA values more precise, but then it would start longer...
48 seemed like a good compromise - but it's very easy to change it, if you think that longer startups would be better Tongue

Thanks for your prompt reply. That sounds logically to me.
I could found it in your code.
I would suggest to change it to a bigger value then 48, if you even plan to do a update in the future.
The startup time was never a problem for me. Personally I could wait over 10 times longer until the tool showing data and start trading, especially if this helps to make the numbers more correct.

Another question came into my mind, which is maybe a little bit related to this issue.
I thought about possible worst case scenarios  which could result in loosing your trading value quite fast, because of unmeant tool behavior. I still worry about what could happen by running two chrome instances (on different computers). If this two instances have the same option setup, but are working with different numbers, based on the startup time, I worry about situations where the two instances are trading "against each other".  E.g. Instance1 would already sell BTC, Instance2 is still below the threshold, Marked price changing and Instance 1 is buying again shortly after this Instance 2 touch touch the threshold and is selling, or so. Especially if you run with a very low threshold setup. Do I just fantasize or wouldn't this also be a argument to make the calculation result, which is the trigger criteria, more independent from the tool startup time? Would love to read your opinion.

 
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
March 08, 2012, 10:01:42 AM
 #104

I still worry about what could happen by running two chrome instances (on different computers). If this two instances have the same option setup, but are working with different numbers, based on the startup time, I worry about situations where the two instances are trading "against each other".
I don't think its quite possible. Unless you set the treshold to zero and had a very, very, very bad luck...

You have the source code - feel free to change the "48" in line 11 of background.html to whatever you want.
You can also go to the extension's "LocalStorage" (Inspect active views: background.html -> Resources / Local Storage) and manually add "MaxHoursBack" value there - that should work as well.
I was planing to make it configurable via the options, but then though that this was supposed to be a simple extension...

EDIT:
But if you want to always have exactly the same numbers, increasing the startup time would not really help here.
In such case you should rather set the MaxHoursToKeep (line 4 of background.html) to 48, instead. And would also need to change the refreshEMA function to always force the reset.

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
BTC-engineer
Sr. Member
****
Online Online

Activity: 338



View Profile
March 08, 2012, 10:13:34 AM
 #105

I still worry about what could happen by running two chrome instances (on different computers). If this two instances have the same option setup, but are working with different numbers, based on the startup time, I worry about situations where the two instances are trading "against each other".
I don't think its possible. Unless you set the treshold to zero and had a very, very, very bad luck...

You have the source code - feel free to change the "48" in line 11 of background.html to whatever you want.
You can also go to the extension's "LocalStorage" (Inspect active views: background.html -> Resources / Local Storage) and manually add "MaxHoursBack" value there - that should work.
I was planing to make it configurable via the options, but then though that this was supposed to be a simple extension...

Sure, changing this value is no problem. Thanks for your hints regarding the LocalStorage.

Indeed I'm using a threshold value nearly zero. I think I understand the threshold function, and I like the option to play with it.
However, wasn't it the recommended strategy in Goomboo's original thread to directly trade when the cross has happened, and wouldn't a (higher) threshold value delay the trading execution?
I prefer the faster trading reaction if the cross has happend, even if this results in more false-trading signals. But again, I really like the option and will look how it works out.
 
BTC-engineer
Sr. Member
****
Online Online

Activity: 338



View Profile
March 08, 2012, 11:54:55 AM
 #106

I still worry about what could happen by running two chrome instances (on different computers). If this two instances have the same option setup, but are working with different numbers, based on the startup time, I worry about situations where the two instances are trading "against each other".
I don't think its quite possible. Unless you set the treshold to zero and had a very, very, very bad luck...

You have the source code - feel free to change the "48" in line 11 of background.html to whatever you want.
You can also go to the extension's "LocalStorage" (Inspect active views: background.html -> Resources / Local Storage) and manually add "MaxHoursBack" value there - that should work as well.
I was planing to make it configurable via the options, but then though that this was supposed to be a simple extension...

EDIT:
But if you want to always have exactly the same numbers, increasing the startup time would not really help here.
In such case you should rather set the MaxHoursToKeep (line 4 of background.html) to 48, instead. And would also need to change the refreshEMA function to always force the reset.

Now it's getting a little bit confusing for me.

First I've successfully changed the MaxHoursBack value in Local Storage to 192. The results looked VERY different than before. The change from green to red has happened now 8 hours later.
Then I saw your additional EDIT regarding the MaxHoursToKeep value, which is 120 by default. I thought this could be the reason for the strange results, because I used MaxHoursToKeep<<MaxHoursBack.
In the next step I set both to 120, but with the same strange results. After this I modified the refreshEMA function, so it always first sets emaLong = [] and emaShort = []. The strange results are still there.

I'm using the graphical output of bitcoincharts.com with the same EMA settings to verify the correct point in time for a trade. It differs quite a lot at the moment...

EDIT: Finally, I changed MaxHoursToKeep and MaxHoursBack to 48, just to learn how this looks, and the results are even more different than the expected output. Any idea?
sukiho
Full Member
***
Offline Offline

Activity: 180


View Profile
March 08, 2012, 11:56:20 AM
 #107

I still worry about what could happen by running two chrome instances (on different computers). If this two instances have the same option setup, but are working with different numbers, based on the startup time, I worry about situations where the two instances are trading "against each other".
I don't think its possible. Unless you set the treshold to zero and had a very, very, very bad luck...

You have the source code - feel free to change the "48" in line 11 of background.html to whatever you want.
You can also go to the extension's "LocalStorage" (Inspect active views: background.html -> Resources / Local Storage) and manually add "MaxHoursBack" value there - that should work.
I was planing to make it configurable via the options, but then though that this was supposed to be a simple extension...

Sure, changing this value is no problem. Thanks for your hints regarding the LocalStorage.

Indeed I'm using a threshold value nearly zero. I think I understand the threshold function, and I like the option to play with it.
However, wasn't it the recommended strategy in Goomboo's original thread to directly trade when the cross has happened, and wouldn't a (higher) threshold value delay the trading execution?
I prefer the faster trading reaction if the cross has happend, even if this results in more false-trading signals. But again, I really like the option and will look how it works out.
 
and if i understand correctly there is a two hour wait after crossover even if you do set the threshold to zero, be nice if that were adjustable as well
matthewh3
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
March 08, 2012, 02:28:10 PM
 #108

Would trying a 9 / 14 crossover or a 5 / 8 crossover from a 10 / 21 crossover result in more buy/sells.  If so what would the 0.25% buy/sell value change to if it does even change?

You seriously need to read ALL of https://bitcointalk.org/index.php?topic=60501.0

That's a BIG read but I'm looking into it and playing with changing exponential moving averages on charts too.  I don't know if this sounds stupid but I get the feeling the bot would do better if it updated the ticks to every 15 minutes instead of every hour  Huh

Crypt_Current
Hero Member
*****
Offline Offline

Activity: 686


Shame on everything; regret nothing.


View Profile
March 08, 2012, 02:59:40 PM
 #109


Then extract all the source files to a separate folder,

How did you do this?

Wait -- spoke too soon.  I actually do need some clarity on this if you would please:  Please explain how you extract the source files?  I only see "pack extension" and "load unpacked extension"...   Huh
As I said, it is a zip archive - unpack it with any un-zipper. Not with Chrome.

I just don't see where you obtain the .zip archive -- I am likely just overlooking something very simple...

10% off at CampBX for LIFE:  https://campbx.com/main.php?r=C9a5izBQ5vq  ----  Authorized BitVoucher MEGA reseller (& BTC donations appreciated):  https://bitvoucher.co/affl/1HkvK8o8WWDpCTSQGnek7DH9gT1LWeV5s3/
LTC:  LRL6vb6XBRrEEifB73DiEiYZ9vbRy99H41  NMC:  NGb2spdTGpWj8THCPyCainaXenwDhAW1ZT
BTC-engineer
Sr. Member
****
Online Online

Activity: 338



View Profile
March 08, 2012, 03:04:49 PM
 #110


Then extract all the source files to a separate folder,

How did you do this?

Wait -- spoke too soon.  I actually do need some clarity on this if you would please:  Please explain how you extract the source files?  I only see "pack extension" and "load unpacked extension"...   Huh
As I said, it is a zip archive - unpack it with any un-zipper. Not with Chrome.

I just don't see where you obtain the .zip archive -- I am likely just overlooking something very simple...

https://bitcointalk.org/index.php?topic=67591.msg786714#msg786714
Crypt_Current
Hero Member
*****
Offline Offline

Activity: 686


Shame on everything; regret nothing.


View Profile
March 08, 2012, 03:14:15 PM
 #111


Then extract all the source files to a separate folder,

How did you do this?

Wait -- spoke too soon.  I actually do need some clarity on this if you would please:  Please explain how you extract the source files?  I only see "pack extension" and "load unpacked extension"...   Huh
As I said, it is a zip archive - unpack it with any un-zipper. Not with Chrome.

I just don't see where you obtain the .zip archive -- I am likely just overlooking something very simple...

https://bitcointalk.org/index.php?topic=67591.msg786714#msg786714

OH cool, thanks...  Cheesy
I had just found this, too:
"The first step is downloading the extension’s CRX file. Instead of clicking it’s link, which will lead to that extension being installed on your browser, right-click the link and choose “Save link as…”."
from http://orenyomtov.com/how-to-view-a-google-chrome-extensions-full-source-code.html

LOL, a durrr!!!  ::: facepalm :::

10% off at CampBX for LIFE:  https://campbx.com/main.php?r=C9a5izBQ5vq  ----  Authorized BitVoucher MEGA reseller (& BTC donations appreciated):  https://bitvoucher.co/affl/1HkvK8o8WWDpCTSQGnek7DH9gT1LWeV5s3/
LTC:  LRL6vb6XBRrEEifB73DiEiYZ9vbRy99H41  NMC:  NGb2spdTGpWj8THCPyCainaXenwDhAW1ZT
Crypt_Current
Hero Member
*****
Offline Offline

Activity: 686


Shame on everything; regret nothing.


View Profile
March 08, 2012, 03:37:59 PM
 #112


Then extract all the source files to a separate folder,

How did you do this?

Wait -- spoke too soon.  I actually do need some clarity on this if you would please:  Please explain how you extract the source files?  I only see "pack extension" and "load unpacked extension"...   Huh
As I said, it is a zip archive - unpack it with any un-zipper. Not with Chrome.

I just don't see where you obtain the .zip archive -- I am likely just overlooking something very simple...

https://bitcointalk.org/index.php?topic=67591.msg786714#msg786714

OH cool, thanks...  Cheesy
I had just found this, too:
"The first step is downloading the extension’s CRX file. Instead of clicking it’s link, which will lead to that extension being installed on your browser, right-click the link and choose “Save link as…”."
from http://orenyomtov.com/how-to-view-a-google-chrome-extensions-full-source-code.html

LOL, a durrr!!!  ::: facepalm :::

I just want to preface this post by saying, I feel like a world-class idiot spamming up this thread with my n00bness...
Anyway... the above method doesn't work Huh  Maybe it's fixed in the newest version of Chrome so that right clicking and choosing "save link as..." doesn't give the .crx file anymore???  Anyway, I'll just follow the link above and get the source that way but... If anyone wants to take the time to really dumb this process of retrieving Chrome Extension source code down for me, I'd pay 0.5 BTC...

10% off at CampBX for LIFE:  https://campbx.com/main.php?r=C9a5izBQ5vq  ----  Authorized BitVoucher MEGA reseller (& BTC donations appreciated):  https://bitvoucher.co/affl/1HkvK8o8WWDpCTSQGnek7DH9gT1LWeV5s3/
LTC:  LRL6vb6XBRrEEifB73DiEiYZ9vbRy99H41  NMC:  NGb2spdTGpWj8THCPyCainaXenwDhAW1ZT
matthewh3
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
March 08, 2012, 04:13:31 PM
 #113

Sorry if this sounds n00bish but how far back doest the period of the EMA take for its value in the bot  Huh

matthewh3
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
March 08, 2012, 04:14:49 PM
 #114

Sorry if this sounds n00bish but how far back doest the period of the EMA take for its value in the bot  Huh

10 and 21 days  if you use EMA 10 EMA 21  Huh

matthewh3
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
March 08, 2012, 04:22:38 PM
 #115

Sorry if this sounds n00bish but how far back doest the period of the EMA take for its value in the bot  Huh

10 and 21 days  if you use EMA 10 EMA 21  Huh

Yes it is I think again sorry for spamming and general N00bnes concerning this thread but really interested in the bot and learning about trading using it with 1BTC

matthewh3
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
March 08, 2012, 04:31:28 PM
 #116

Right I loaded 1BTC on the bot 24hrs ago it finally sold the 1BTC after two dark red boxes and now I have $4.83 but if it sold last night it could of got $5.015  I don't understand the bot maybe I'll have to read Goomboo's Journal  Huh
Well, all I can say is that you should have sold it last night, instead of using the bot Smiley

Well the bot sold the 1BTC at BTC lowest value in the last 25Hrs  Huh

Looking at charts and understanding the bot better I can totally see why it sold then.  Thanks for the bot  Smiley  I will totally be donating most of any profits generated to Goomboo and piotr_n for helping me learn about trading and bots.  Thanks.

BTC-engineer
Sr. Member
****
Online Online

Activity: 338



View Profile
March 08, 2012, 05:18:39 PM
 #117


Then extract all the source files to a separate folder,

How did you do this?

Wait -- spoke too soon.  I actually do need some clarity on this if you would please:  Please explain how you extract the source files?  I only see "pack extension" and "load unpacked extension"...   Huh
As I said, it is a zip archive - unpack it with any un-zipper. Not with Chrome.

I just don't see where you obtain the .zip archive -- I am likely just overlooking something very simple...

https://bitcointalk.org/index.php?topic=67591.msg786714#msg786714

OH cool, thanks...  Cheesy
I had just found this, too:
"The first step is downloading the extension’s CRX file. Instead of clicking it’s link, which will lead to that extension being installed on your browser, right-click the link and choose “Save link as…”."
from http://orenyomtov.com/how-to-view-a-google-chrome-extensions-full-source-code.html

LOL, a durrr!!!  ::: facepalm :::

I just want to preface this post by saying, I feel like a world-class idiot spamming up this thread with my n00bness...
Anyway... the above method doesn't work Huh  Maybe it's fixed in the newest version of Chrome so that right clicking and choosing "save link as..." doesn't give the .crx file anymore???  Anyway, I'll just follow the link above and get the source that way but... If anyone wants to take the time to really dumb this process of retrieving Chrome Extension source code down for me, I'd pay 0.5 BTC...

Isn't this link working for you?
http://speedy.sh/z2eTZ/mtbot.zip

However, I also didn't use it. I will try to describe you a way to get the source.
Did you already sucessfuly install the bot as a chrome-extention?  If not please do it.
If you installed it already you have already done nearly everything, because the source is already on your computer. You just have to know where.
The location on your computer varies and depends on your setup (OS etc.). I'm using Linux (ubuntu) and the extensions are in your home directory below this path.
~/.config/google-chrome/Default/Extensions/

If you don't know where your google-chrome directory is located on your computer, simply use the file-search function of your OS to look for one of the included filenames like sha512.js
In the found directory is everything you need. You can modify. To run the modified Version you just have to reload the extension.

BTC-engineer
Sr. Member
****
Online Online

Activity: 338



View Profile
March 08, 2012, 05:27:15 PM
 #118

Hi does the newest H1.length-MaxHoursToKeep modification in the refreshEMA function fix the trouble with the 'floating' historical results?

Thanks for the update!
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
March 08, 2012, 06:01:29 PM
 #119

Hi does the newest H1.length-MaxHoursToKeep modification in the refreshEMA function fix the trouble with the 'floating' historical results?
Thanks for the update!
No. It was just a fix for a potential issue with expiring old records, if the PC was offline for 2 hours or more..

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
matthewh3
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
March 09, 2012, 10:26:40 AM
 #120

Let me see if I understand the bot now.  At the moment I have USD when two ticks of either +0.25% or -0.25% then the USD will be sold for BTC? Or is it just two +0.25% ticks to buy BTC and two -0.25% ticks to sell BTC?  Am I in the right postion to be holding USD now or should I be holding BTC or doesn't it matter.  Sorry if that sounds n00bish  Huh

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!