Need API help

Dec 02, 2013 at 15:45
2,360 Tampilan
38 Replies
pumpingmonkey
forex_trader_168526
Anggota Sejak Dec 19, 2013   126 pos
Dec 23, 2013 at 20:48
if i had a linux box with a shell account login, i would slap this together for you, no worries..

happy coding.
Anggota Sejak Nov 21, 2011   1718 pos
Dec 23, 2013 at 21:21
Thank you for your help.
pumpingmonkey
forex_trader_168526
Anggota Sejak Dec 19, 2013   126 pos
Dec 29, 2013 at 22:13
i have been thinking about this myfxbook api...

one very nice use for it might be that one could hide his trades at this website, making them invisible, but then using the api to show a custom interface for viewing said trades.

ie, make all trades hidden here, but then show whatever info about said trades via your website.

the api makes it very simple to read your trades at myfxbook.

of course, i could be wrong about this, as i have yet to actually do this.

happy coding.
pumpingmonkey
forex_trader_168526
Anggota Sejak Dec 19, 2013   126 pos
Dec 29, 2013 at 22:17
also, one more issue is that if i should do any xml coding, i will most likely want to write my own xml parsing functions..

i will not want to use the fairly difficult to clearly understand xml functions that may or may not be built into whatever language that i may or may not be using to request said xml documents.

trading will continue in 45 minutes.

yay.
Anggota Sejak Nov 21, 2011   1718 pos
Dec 29, 2013 at 22:19
nothing to hide or not to hide.

Myfxbook Outlook is the global sentiment for any currency pair over all real accounts linked to myfxbook community

pumpingmonkey
forex_trader_168526
Anggota Sejak Dec 19, 2013   126 pos
Dec 30, 2013 at 05:46
when i suggest to 'hide' your account info/stats here at this myfxbook website, i am not suggesting that you do anything sneaky/etc...

i am suggesting that you simply hide everything here(mark the account as private), but then using the xml api you can SELECTIVELY DISPLAY ONLY THAT INFORMATION THAT YOU WANT TO DISPLAY on your personal website.

perhaps there is information shown here that you do not want to show...

or perhaps you simply want to display it all differently than myfxbook displays it.

hint: your myfxbook page could be reproduced at your website and/or a slightly modified version.

definitely do this on a linux box using c language or at least use php.,,.

z/.
Anggota Sejak Nov 21, 2011   1718 pos
Dec 30, 2013 at 11:42
I see what you mean.

i'm not trying to do this.

I try to do an indacator for MT4
pumpingmonkey
forex_trader_168526
Anggota Sejak Dec 19, 2013   126 pos
Dec 30, 2013 at 16:53
oh, i see.

you want the global sentiment displayed as an indicator?

that is actually interesting.

off the top of my head, i might need to write a custom DLL to implement this...

DLL is short for DYNAMIC LINK LIBRARY.

it is a big fancy word that means that we could write some functions using the C language and then metatrader can access or call those functions.

DLL's can read and write to web pages.

xml pages are really just web pages that need to be parsed.

me.
Anggota Sejak Nov 21, 2011   1718 pos
Dec 30, 2013 at 16:57
Yes It's what I need... global sentiment into an MT4 indicator.

Then we do an EA that places orders in opposite way of crowd.
pumpingmonkey
forex_trader_168526
Anggota Sejak Dec 19, 2013   126 pos
Dec 30, 2013 at 19:48
one issue before you go off on that mission....

keep in mind that the market sentiment info from myfxbook is only a very small piece of the global pie.

it is a bit like calculating the overall direction of a small school of fish, lets say that they are headed in a north east direction...

but does that mean that ALL fish from all of the world's oceans are indeed headed north east?

no, it does not.

have you checked the market sentiment at other websites, perhaps at the oanda website?

i do not mean to discourage you, i only want to help you to be better prepared for that which really is going on.

i do wish for you success in this and all of your endeavours.

zero/.

Anggota Sejak Nov 21, 2011   1718 pos
Dec 30, 2013 at 20:50
Myfxbook like any another sources for sentiment is representative of the Fx retailer's behavior.

I have already checked many sources at a given time... ratio is similar.
pumpingmonkey
forex_trader_168526
Anggota Sejak Dec 19, 2013   126 pos
Dec 30, 2013 at 23:20
fine.

whoever does this for you will want to write a custom DLL..

said DLL might contain custom functions, such as:

get_sentiment('EURUSD');
get_avg_shortprice('EURUSD');
get_avg_longprice('EURUSD');

a couple of links, for reference:

https://www.xpworx.com/metatrader-mql-articles/mql4-articles/create-your-own-metatrader-extension-dll.php

https://www.forexfactory.com/showthread.php?t=219576
Anggota Sejak Sep 29, 2009   14 pos
Jan 16, 2014 at 09:22
pumpingmonkey posted:
that didnt work out so well, attempting to insert said code into the above post..

so i will try to attach it to this post.

i think that this will work better.

just follow the instrutions in the above post to edit the userid and password in the file and then load it up in your browser.


Thanks for sharing your code example with community. I don't get the code working due to console error message in chrom and ff
'XMLHttpRequest cannot load - No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. '


Any idea how to avoid it.


Anggota Sejak Nov 21, 2011   1718 pos
Jan 16, 2014 at 11:54
Jasiu70 posted:

Any idea how to avoid it.



Hey,

If you are successfull with it, please let me know.

Anggota Sejak Sep 29, 2009   14 pos
Jan 16, 2014 at 12:01
Unfortunately no idea anymore. It works well for IE10 but doesn't work for FF and chrome. I spent whole day on gg but results are all quite linked with HTTP access control (CORS). I am not sure if experienced coder could suggest a different approach.

Regards Jan
Anggota Sejak Nov 21, 2011   1718 pos
Jan 16, 2014 at 12:18
Jasiu70 posted:
Unfortunately no idea anymore. It works well for IE10 but doesn't work for FF and chrome. I spent whole day on gg but results are all quite linked with HTTP access control (CORS). I am not sure if experienced coder could suggest a different approach.

Regards Jan

From IE10... then you know how to implement it into MT4?
Anggota Sejak Sep 29, 2009   14 pos
Jan 16, 2014 at 14:19
Implementation in MT4 is non of my targets. I try to access myfxbook api via javascript xmlhttprequest and have problems with HTTP access control (CORS).
Anggota Sejak Mar 07, 2010   60 pos
Jan 19, 2014 at 15:29
Jasiu70 posted:
Implementation in MT4 is non of my targets. I try to access myfxbook api via javascript xmlhttprequest and have problems with HTTP access control (CORS).

You can't use javascript cause you'll run into cross-domain issues (that's the errors you're getting), instead you need to use server side script like php/.net/java etc (you just need to invoke simple http url's and read the response - the most basic api possible)
aaa
Anggota Sejak Sep 29, 2009   14 pos
Jan 20, 2014 at 07:51
You are right. I switsched to a combined php/ javascript approach which works well.
Masuk / Daftar to comment
You must be connected to Myfxbook in order to leave a comment
*Penggunaan komersial dan spam tidak akan ditolerir, dan dapat mengakibatkan penonaktifkan akun.
Tip: Memposting gamba /url youtube akan secara otomatis menyematkannya di postingan Anda!
Tip: Ketik tanda @ untuk melengkapi secara otomatis nama pengguna yang ikut serta dalam diskusi ini.