Need API help

Dec 02, 2013 at 15:45
2,343 การดู
38 Replies
pumpingmonkey
forex_trader_168526
เป็นสมาชิกตั้งแต่ Dec 19, 2013   126 โพสต์
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.
เป็นสมาชิกตั้งแต่ Nov 21, 2011   1718 โพสต์
Dec 23, 2013 at 21:21
Thank you for your help.
pumpingmonkey
forex_trader_168526
เป็นสมาชิกตั้งแต่ Dec 19, 2013   126 โพสต์
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
เป็นสมาชิกตั้งแต่ Dec 19, 2013   126 โพสต์
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.
เป็นสมาชิกตั้งแต่ Nov 21, 2011   1718 โพสต์
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
เป็นสมาชิกตั้งแต่ Dec 19, 2013   126 โพสต์
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/.
เป็นสมาชิกตั้งแต่ Nov 21, 2011   1718 โพสต์
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
เป็นสมาชิกตั้งแต่ Dec 19, 2013   126 โพสต์
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.
เป็นสมาชิกตั้งแต่ Nov 21, 2011   1718 โพสต์
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
เป็นสมาชิกตั้งแต่ Dec 19, 2013   126 โพสต์
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/.

เป็นสมาชิกตั้งแต่ Nov 21, 2011   1718 โพสต์
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
เป็นสมาชิกตั้งแต่ Dec 19, 2013   126 โพสต์
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
เป็นสมาชิกตั้งแต่ Sep 29, 2009   14 โพสต์
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.


เป็นสมาชิกตั้งแต่ Nov 21, 2011   1718 โพสต์
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.

เป็นสมาชิกตั้งแต่ Sep 29, 2009   14 โพสต์
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
เป็นสมาชิกตั้งแต่ Nov 21, 2011   1718 โพสต์
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?
เป็นสมาชิกตั้งแต่ Sep 29, 2009   14 โพสต์
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).
เป็นสมาชิกตั้งแต่ Mar 07, 2010   60 โพสต์
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
เป็นสมาชิกตั้งแต่ Sep 29, 2009   14 โพสต์
Jan 20, 2014 at 07:51
You are right. I switsched to a combined php/ javascript approach which works well.
You must be connected to Myfxbook in order to leave a comment
*การใช้งานเชิงพาณิชย์และสแปมจะไม่ได้รับการยอมรับ และอาจส่งผลให้บัญชีถูกยกเลิก
เคล็ดลับ: การโพสต์รูปภาพ/youtube url จะฝังลงในโพสต์ของคุณโดยอัตโนมัติ!
เคล็ดลับ: พิมพ์เครื่องหมาย @ เพื่อป้อนชื่อผู้ใช้ที่เข้าร่วมการสนทนานี้โดยอัตโนมัติ