Bitcoin Forum
June 17, 2019, 12:10:19 AM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 »  All
  Print  
Author Topic: Live Bitcoin Charts in MetaTrader 4 for any market @ bitcoincharts.com  (Read 31964 times)
kvm
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
March 29, 2013, 02:37:23 PM
Last edit: July 02, 2015, 03:15:13 PM by kvm
 #1

Setting up MetaTrader 4

1. Download and install MetaTrader 4 Client Terminal (use default installation directory) from:
http://files.metaquotes.net/metaquotes.software.corp/mt4/mt4setup.exe

2. You must connect to at least a demo account. To create one, go to menu and select File -> Open an Account.

3. Go to menu and select Tools -> Options -> Charts tab. In the fields "Max bars in history" and "Max bars in chart", enter the largest number allowed: 9999999999999. After you click OK, the system will change this number to 2147483647 - the maximum bars the system can handle.


Using the Import Script Status: OK

This is an offline script that imports manually downloaded history file. It doesn't automatically download any data, therefore it doesn't call any external DLL functions! The .csv files at http://api.bitcoincharts.com/v1/csv/ are updated every few hours!

1. Download and install KVM Bitcoin Tick Importer, following the instructions given on the page.


Using the Autoupdating Expert Status: work in progress...

This is an Expert Advisor (EA) that automatically imports historical tick data from http://bitcoincharts.com into client terminal. Periodically, it updates the data and refreshes the chart windows.

1. Download and put eKVM-BTC-Chart_v1.2 expert in this directory, by default:
C:\Program Files\MetaTrader 4\experts - if you use Windows 7 32-bit system.
- or -
C:\Program Files (x86)\MetaTrader 4\experts - if you use Windows 7 64-bit system.

2. After that restart the MetaTrader 4 terminal. Make sure that the terminal is connected and in service.

3. Open a new Chart Window for any forex pair you want (for example, EURUSD) and keep it running all the time!

4. Go to Expert Advisors in Navigator window and double click on "eKVM-BTC-Chart". Under Common tab in settings dialog, make sure to check "Allow DLL imports" and "Allow imports of external experts", and uncheck "Confirm DLL function calls". Then click OK.

5. After the EA has processed some data, go to File -> Open Offline, choose one of the timeframes - "mtgoxUSD,M1", "mtgoxUSD,M5" etc. and click Open. Now you can add your indicators or template to customize the chart as you want.


http://i.imgur.com/Sz9ipfW.png
1560730219
Hero Member
*
Offline Offline

Posts: 1560730219

View Profile Personal Message (Offline)

Ignore
1560730219
Reply with quote  #2

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

Posts: 1560730219

View Profile Personal Message (Offline)

Ignore
1560730219
Reply with quote  #2

1560730219
Report to moderator
1560730219
Hero Member
*
Offline Offline

Posts: 1560730219

View Profile Personal Message (Offline)

Ignore
1560730219
Reply with quote  #2

1560730219
Report to moderator
Maria2.0
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
March 29, 2013, 04:06:43 PM
 #2

Finally! Thank You!!

Maria 2.0
prof7bit
Hero Member
*****
Offline Offline

Activity: 756
Merit: 500



View Profile WWW
April 01, 2013, 10:23:28 AM
 #3

DESCRIPTION
 however the ticks are delayed in time by approximately 15 minutes as described in the API documentation

How about going one step further and using MtGox websocket or socket.io API for live streaming data and also make a simple trading API (that is similar to MT4 API) so that any EA (after only small modifications) can trade on MtGox?

████████              ████████
 ▀███████     █      ███████▀      ▄▄▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄      ▄▄▄▄                               ▄▄         ▄▄▄        ▄▄▄▄▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
   ▀██████   ███    ██████▀    ▄▄█████████████▀   █████      ████              ▄██▄             ███▄       ███    ▄▄█████████████▀    █████████████▀
     ▀███▌ ▄██ ██▄ █████▀     ██████▀▀▀▀▀▀▀▀▀     █████      ████            ▄██████▄           █████▄     ███   ██████▀▀▀▀▀▀▀▀▀      ████▀▀▀▀▀▀▀▀ 
       █▀▄███   █ ████▀      █████▀               ███████████████          ▄██████████▄         ███████▄   ███  █████▀     ▄▄▄▄▄▄▄▄   ████▄▄▄▄▄▄▄▄▄▄▄
       ▄████     ███▀▄       █████                ███████████████        ▄█████▀ ▀██████▄       ███ ▀████▄ ███  █████    ▄█████████   █████████████▀
     ▄█████ ▐█  ██▌▄███▄      █████▄              █████      ████      ▄█████▀     ▀██████▄     ███   ▀███████   █████▄        ████   ████
   ▄██████ ▐██ ██  ██████▄     ███████████████▀   █████      ████    ▄█████▀  ▄█████████████▄   ███     ▀█████    █████████████████   █████████████▀
 ▄██████     ███    ███████▄    ▀▀██████████▀     █████      ████  ▄█████▀  ▄█████████████████▄ ███       ▀███     ▀▀██████████████   ███████████▀
███████       █      ████████


▬▬▬▬▬▬▬▬▬▬▬▬▬▬
██████
██
██
██
██
██
██
██
██
██
██
██
██████
██████
██
██
██
██
██
██
██
██
██
██
██
██████

..BUY TOKEN!..
██████
██
██
██
██
██
██
██
██
██
██
██
██████
        ▄▄████████▄▄
     ▄████████████████▄
   ▄████████████████████▄
  ███████████████▀▀  █████
 ████████████▀▀      ██████
▐████████▀▀   ▄▄     ██████▌
▐████▀▀    ▄█▀▀     ███████▌
▐████████ █▀        ███████▌
 ████████ ▄███▄   ███████
  ████████████████▄▄██████
   ▀████████████████████▀
     ▀████████████████▀
        ▀▀████████▀▀
██████
██
██
██
██
██
██
██
██
██
██
██
██████
Maria2.0
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
April 01, 2013, 10:27:13 AM
 #4

DESCRIPTION
 however the ticks are delayed in time by approximately 15 minutes as described in the API documentation

How about going one step further and using MtGox websocket or socket.io API for live streaming data and also make a simple trading API (that is similar to MT4 API) so that any EA (after only small modifications) can trade on MtGox?

This. Do it!!

Maria 2.0
kvm
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 01, 2013, 01:34:27 PM
 #5

DESCRIPTION
 however the ticks are delayed in time by approximately 15 minutes as described in the API documentation

How about going one step further and using MtGox websocket or socket.io API for live streaming data and also make a simple trading API (that is similar to MT4 API) so that any EA (after only small modifications) can trade on MtGox?

This will be a very useful feature, indeed. But I disagree that it will require only "one step" Smiley

My first goal is to make the chart really LIVE. So, watch out for new releases soon!

However if you have any questions or feedback about the current release, feel free to PM me or comment!
ptshamrock
Sr. Member
****
Offline Offline

Activity: 478
Merit: 500



View Profile
April 21, 2013, 01:59:43 AM
 #6

Gives me an "waiting for excution to Start" in the Chart Window.

MT4 works great in wine btw Smiley  back to the roots Smiley

"Money needs to be depoliticized, and the time has come for the separation of money and state to be accomplished."
bit-fxtrader
Full Member
***
Offline Offline

Activity: 166
Merit: 100


View Profile
April 21, 2013, 05:48:45 PM
 #7

DESCRIPTION

can't get this to work, it just says waiting to start...is it cause bitcoincharts is down?

This Expert Advisor (EA) for MetaTrader 4 (MT4) imports mtgoxUSD historic tick data using Bitcoincharts API.
It supports auto refresh after regular intervals, however the ticks are delayed in time by approximately 15 minutes as described in the API documentation

INSTALLATION

1. First of all download and put the EA in this directory, by default:

C:\Program Files (x86)\MetaTrader 4\experts , If you use Windows 7 64 bit or
C:\Program Files\MetaTrader 4\experts , If you use Windows 7 32 bit edition.

Keep in mind that MT4 directory might be your broker name!

2. After that restart the MT4 terminal!

3. Open a new window for any pair you want, for example EURUSD and keep it open all the time.

4. Go to Expert Advisors in Navigator Window, look for "eKVM-BTC-Chart", double click on it, under Common, make sure that "Allow DLL imports" and "Allow imports of external experts" are checked, then click OK.

5. After the EA has processed some data, go to File -> Open Offline, look for "mtgoxUSD,M1" and click on Open, a new chart window will open named "mtgoxUSD,M1 (offline)". Now you can add your indicators or template or customize the chart as you want.

6. The last but not least, go to Tools -> Options -> tab Charts, then change "Max bars in history" and "Max bars in chart" to the maximum number possible, for example: 9999999999999 and OK! We do this step to let MT4 use all the data in the history!

VERSIONS

Last version: eKVM-BTC-Chart_v1.0

2013-03-28  1.0  Initial release.

dwolfman
Full Member
***
Offline Offline

Activity: 224
Merit: 100



View Profile WWW
April 22, 2013, 01:15:15 AM
 #8

Is it possible to use this without creating an account in MT4?

Wanna send coins my way? 1BY2rZduB9j8Exa4158QXPFJoJ2NWU1NGf or just scan the QR code in my avatar.  :-)
bit-fxtrader
Full Member
***
Offline Offline

Activity: 166
Merit: 100


View Profile
April 22, 2013, 04:10:05 AM
 #9

Same problem, gives me an "waiting for execution to Start" in the Chart Window and there is no offline chart.

Anyone had any luck with this? Also has anyone checked if the script is safe to use?
kvm
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 22, 2013, 09:35:15 AM
 #10

Same problem, gives me an "waiting for execution to Start" in the Chart Window and there is no offline chart.

Anyone had any luck with this? Also has anyone checked if the script is safe to use?

Yes, I understand your concerns. Running such a script with "Allow DLL imports" option is a little bit dangerous!
I guarantee that the EA uses only these inetrnet related functions to connect and download data from bitcoincharts.com:

#import "wininet.dll"
int InternetOpenA(...);
int InternetOpenUrlA(...);
int InternetReadFile(...);   
int InternetCloseHandle(...);

However, although it is safe, at the moment the script is pretty useless, because of the recent Bitcoincharts API changes.
I've tested their new example and the request returns no data! Until there's a way to get the whole history I can't do much!
I will continue to search a solution, and post it here if I found one, but any help will be appreciated...
bit-fxtrader
Full Member
***
Offline Offline

Activity: 166
Merit: 100


View Profile
April 22, 2013, 11:19:44 AM
 #11

Same problem, gives me an "waiting for execution to Start" in the Chart Window and there is no offline chart.

Anyone had any luck with this? Also has anyone checked if the script is safe to use?

Yes, I understand your concerns. Running such a script with "Allow DLL imports" option is a little bit dangerous!
I guarantee that the EA uses only these inetrnet related functions to connect and download data from bitcoincharts.com:

#import "wininet.dll"
int InternetOpenA(...);
int InternetOpenUrlA(...);
int InternetReadFile(...);   
int InternetCloseHandle(...);

However, although it is safe, at the moment the script is pretty useless, because of the recent Bitcoincharts API changes.
I've tested their new example and the request returns no data! Until there's a way to get the whole history I can't do much!
I will continue to search a solution, and post it here if I found one, but any help will be appreciated...


ah thats too bad...any other options to get bitcoin data in mt4?
kvm
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 22, 2013, 02:00:09 PM
 #12

I just received an answer to my question from Bitcoincharts.com:

> You can fetch historic data from http://api.bitcoincharts.com/v1/csv/
> (updated once per day).

So the only thing I can do is to write another script that reads the file and imports the data in MT4!
This is a very dirty work-around! But this is the only solution I can think of at the moment!
therealodog
Newbie
*
Offline Offline

Activity: 34
Merit: 0


View Profile
April 22, 2013, 02:28:22 PM
 #13

hey man, please do this. Much respect for your work!
Loozik
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


Born to chew bubble gum and kick ass


View Profile
April 22, 2013, 06:45:10 PM
 #14

This is the first row of BTCUSD tick data from mt.gox from your link:

1279408157,0.049510000000,20.000000000000

What is ''1279408157''? - a date and hour? please decipher this for me. The other two seem to be price and volume

Thanks
kvm
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 23, 2013, 05:54:30 AM
 #15

This is the first row of BTCUSD tick data from mt.gox from your link:

1279408157,0.049510000000,20.000000000000

What is ''1279408157''? - a date and hour? please decipher this for me. The other two seem to be price and volume

Lines in CSV files have the following fixed format:

unixtime,price,amount

where the unixtime is the number of seconds that have elapsed since January 1, 1970.

1279408157 = Sat, 17 Jul 2010 23:09:17 GMT
prof7bit
Hero Member
*****
Offline Offline

Activity: 756
Merit: 500



View Profile WWW
April 23, 2013, 12:39:30 PM
 #16

where the unixtime is the number of seconds that have elapsed since January 1, 1970.
1279408157 = Sat, 17 Jul 2010 23:09:17 GMT

just cast the int into a date in mql4 and use it as date for all date and time related mql4 functions and it will just work, mt4 is using unix timestamps too as its native datetime format, no need for complicated calculatons and conversions, its all built into mt4 already.

████████              ████████
 ▀███████     █      ███████▀      ▄▄▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄      ▄▄▄▄                               ▄▄         ▄▄▄        ▄▄▄▄▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
   ▀██████   ███    ██████▀    ▄▄█████████████▀   █████      ████              ▄██▄             ███▄       ███    ▄▄█████████████▀    █████████████▀
     ▀███▌ ▄██ ██▄ █████▀     ██████▀▀▀▀▀▀▀▀▀     █████      ████            ▄██████▄           █████▄     ███   ██████▀▀▀▀▀▀▀▀▀      ████▀▀▀▀▀▀▀▀ 
       █▀▄███   █ ████▀      █████▀               ███████████████          ▄██████████▄         ███████▄   ███  █████▀     ▄▄▄▄▄▄▄▄   ████▄▄▄▄▄▄▄▄▄▄▄
       ▄████     ███▀▄       █████                ███████████████        ▄█████▀ ▀██████▄       ███ ▀████▄ ███  █████    ▄█████████   █████████████▀
     ▄█████ ▐█  ██▌▄███▄      █████▄              █████      ████      ▄█████▀     ▀██████▄     ███   ▀███████   █████▄        ████   ████
   ▄██████ ▐██ ██  ██████▄     ███████████████▀   █████      ████    ▄█████▀  ▄█████████████▄   ███     ▀█████    █████████████████   █████████████▀
 ▄██████     ███    ███████▄    ▀▀██████████▀     █████      ████  ▄█████▀  ▄█████████████████▄ ███       ▀███     ▀▀██████████████   ███████████▀
███████       █      ████████


▬▬▬▬▬▬▬▬▬▬▬▬▬▬
██████
██
██
██
██
██
██
██
██
██
██
██
██████
██████
██
██
██
██
██
██
██
██
██
██
██
██████

..BUY TOKEN!..
██████
██
██
██
██
██
██
██
██
██
██
██
██████
        ▄▄████████▄▄
     ▄████████████████▄
   ▄████████████████████▄
  ███████████████▀▀  █████
 ████████████▀▀      ██████
▐████████▀▀   ▄▄     ██████▌
▐████▀▀    ▄█▀▀     ███████▌
▐████████ █▀        ███████▌
 ████████ ▄███▄   ███████
  ████████████████▄▄██████
   ▀████████████████████▀
     ▀████████████████▀
        ▀▀████████▀▀
██████
██
██
██
██
██
██
██
██
██
██
██
██████
kvm
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 23, 2013, 01:38:21 PM
 #17

where the unixtime is the number of seconds that have elapsed since January 1, 1970.
1279408157 = Sat, 17 Jul 2010 23:09:17 GMT

just cast the int into a date in mql4 and use it as date for all date and time related mql4 functions and it will just work, mt4 is using unix timestamps too as its native datetime format, no need for complicated calculatons and conversions, its all built into mt4 already.

Yes. I'm, using it that way Smiley I just tried to explain the tick format.
therealodog
Newbie
*
Offline Offline

Activity: 34
Merit: 0


View Profile
April 23, 2013, 04:00:55 PM
 #18

so is this working?
kvm
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 24, 2013, 07:25:29 AM
 #19

so is this working?

Sill not working  Cry
rezurect
Sr. Member
****
Offline Offline

Activity: 686
Merit: 250


View Profile
April 24, 2013, 02:39:19 PM
 #20

Failed to work for me. Cant figure out whats wrong.
I Kept EUR/USD open,got the EA, set allow imports. But  in the next step,[File -> Open Offline, look for "mtgoxUSD,M1"], For me there is no "mtgoxUSD,M1" listed among the options.

The EA is greyed out, is that how its supposed to be?

Pages: [1] 2 3 4 5 6 »  All
  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!