hi, currently i were try to get history price from "2012-05-01 00:00:00" to "2012-05-22 23:59:59". But after i run the sample code C:\Program Files (x86)\Candleworks\ForexConnectAPI\samples\java\SimpleSamples\GetHistPrices, what i get at below...
Code:
Connecting to MICR564176001 *** http://www.fxcorporate.com/Hosts.jsp DEMO
Status: CONNECTING
Status: CONNECTED
Market data snapshot for EUR/USD, timeframe t1, from Tue May 01 00:00:00 SGT 2012, to Tue May 22 23:59:59 SGT 2012, maximum Bars 300
Date=5/22/12 11:58 PM,BidOpen=1.273,BidHigh=1.273,BidLow=1.273,BidClose=1.273,AskOpen=1.274,AskHigh=1.274,AskLow=1.274,AskClose=1.274
......
Date=5/22/12 11:59 PM,BidOpen=1.273,BidHigh=1.273,BidLow=1.273,BidClose=1.273,AskOpen=1.274,AskHigh=1.274,AskLow=1.274,AskClose=1.274
Done!
Status: DISCONNECTING
Status: DISCONNECTED
hi, thanks for ur sample. But what i get still same and from datetime is "05/02/11 03:00:00" to datetime is "05/02/11 03:01:00". anyway, i also upload my log file for refrence. hope that can help.
thanks
Originally Posted by Natalya
This is an issue in the sample for version 1.0.3. Please see the corrected version in the attachment.
Could you please also try the modified sample from the attachment and post the received log (please change the login and password in build.xml before using)
Hi there,
I am also running into issues with the "gethistprices" sample. I am using the classes that Natalya updated and posted earlier in this thread. In Natalya's gethistprices zip file, I'm having issues with the Main class.
Here's the issue I'm running into (I javadoced in my code and I'm just copying and pasting that javadoc):
PHP Code:
/**
* Java error at the mSession = 02GTransport.createSession() line:
* Exception in thread "main" java.lang.UnsatisfiedLinkError: no gstool2 in java.library.path
* at java.lang.ClassLoader.loadLibrary(Unknown Source)
* at java.lang.Runtime.loadLibrary0(Unknown Source)
* at java.lang.System.loadLibrary(Unknown Source)
* at com.fxcore2.O2GTransport.<clinit>(Unknown Source)
* at com.fxcore2.tests.Main.main(Main.java:130)
*
* (Main.java.130) or line 130 was originally the
* mSession = 02GTransport.createSession() line before I inputed this javadoc.
*
*/
This error brings up another concern: when I added my external JAR files, the library seemed to import ok but it didn't seem to configure properly. When I attempt to go into the fxcore2 library in Eclipse and view the code of the classes, the classes aren't available for viewing. A page comes up in Eclipse that says "Class File Editor" and "Source not found". There's a button that says "Attach Source.." and when I try to attach it, there is no .java or .class file for the particular class. I have already tried reinstalling the Java API and no luck with that.
Regarding my previous post, I sought out additional help and learned the fxcore2 classes are licensed and therefore hidden due to copyright (or similar) reasons.
What's strange (to me) is the mSession = O2GTransport.createSession();, the line in my code that's giving me an error in the "gethistprices" sample main class, works just fine in the "login" sample main class. In other words, the same code for the mSession field works when I login, but it doesn't work when trying to pull historical data.
I continue to get the error displayed in the javadoc in the previous post.
Any ideas or possible solutions would be greatly appreciated. Thanks.
Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.