Page 2 of 13

Re: Live chart data export to CSV

PostPosted: Mon Jul 25, 2011 3:04 pm
by chimpy
Is there a general guide on the site of how to install the code you posted?

Also what is the default file location where the CSV files are updated to?

Thanks

Re: Live chart data export to CSV

PostPosted: Tue Jul 26, 2011 9:18 am
by allpin
Please use this zipped executable in case you do not want to compile code by yourself.
LiveChartDataExportToCSVexe.zip

Re: Live chart data export to CSV

PostPosted: Fri Jul 29, 2011 12:27 pm
by allpin
ForexConnect API could be dowloaded from here: http://www.fxcodebase.com/wiki/index.php/June_2011_Release_(0.3.x)

Re: Live chart data export to CSV

PostPosted: Sun Jul 31, 2011 1:28 am
by chimpy
allpin I have attached my 3rd question as a text file.

Re: Live chart data export to CSV

PostPosted: Mon Aug 01, 2011 4:46 am
by chimpy
allpin,

I managed to get the CSV files to appear in the "C:\Program Files\Candleworks\ForexConnectAPI\bin" folder by running the application in administrator mode. However the files are still locked by the process so I cannot view them even using just notepad.
Not sure if this problem is related to the 'user control' feature in Vista/windows 7 but, it may be a good idea to move the CSV file target folder out of the programfiles folder as this folder is always probematic for data files I have experienced in the past.

Was there meant to be a Tick timeframe functionality? I tried to produce a tick CSV file by entering the letter "T" in the timeframe field of the configuration file but, it did not like it? I dont need a tick chart myself, just wondering if it is meant to work?

I also tried to produce CSV data files for the "SPX500" and "JPN225". I got a "Error: instrument JPN225 is invalid" message?

Some 3rd party charting packages have a problem with the price data keep changing the decimal places it uses, for example
one time the open is "1.82" and then on the next line it is "1.82037" then its "1.827" etc. For compatibility can the data be formated using all 5 decimal places as so, 1.82 becomes 1.82000 and 1.827 becomes 1.82700 . I can then set the charting package to analyse to the first four or five decinal places

Thanks again

chimpy

Re: Live chart data export to CSV

PostPosted: Mon Aug 01, 2011 5:31 pm
by allpin
This application cannot be used on ticks.

The format of the output file is DateTime, Bid Open, Bid High, Bid Low, Bid Close, Ask Open, Ask High, Ask Low, Ask Close, Volume.

About getting offers "SPX500" and "JPN225". Do you have US-based account? If the answer is "yes" you are unable to trade them. If the answer is "no", are you able to see them using trading station? Are you subscribed to them?

I have updated project and zipped executable.
Changes made:
- Output files can be opened while application is running as read-only.
- DateTime can be written in 2 fields ("Date" and "Time"). You have to provide <SeparateDateAndTime>Y</SeparateDateAndTime> in configuration file (default is one field for DateTime)
- Prices can be written formatted with fixed number of decimal places (using Digits value from Offers table). You have to provide <FormatDecimalPlaces>Y</FormatDecimalPlaces> in configuration file (default is 'N' - do not format prices)
- You can choose output directory for the .csv files. You have to provide something like <OutputDir>c:\fxcmdata</OutputDir> in configuration file (default is current directory)

Re: Live chart data export to CSV

PostPosted: Tue Aug 02, 2011 3:48 am
by chimpy
allpin,

Thanks for the update.
When the app does the initial download, the time format is 00:00 but then then the periodical updates come as 00:00:00 format. Both are workable but can it be one or the other please.

>>- Prices can be written formatted with fixed numbed of decimal places (using Digits from Offers >>table).
So its exactly the same data but with 0's put on the end to always make it up to 5 decimal places?



I am not in the US but the demo account does not have JPN225 available anyhow, that was the problem..

What does the tradingweekoffset do? I assume the trading day offset is related to the timezone. So a setting of 0 in the trading day offset would mean GMT?

Thanks
Chimpy

Re: Live chart data export to CSV

PostPosted: Tue Aug 02, 2011 12:26 pm
by chimpy
Hi, can you please tell me what do these two tags do?
<TradingDayOffset>-7</TradingDayOffset>
<TradingWeekOffset>-1</TradingWeekOffset>

Also, the data is set to EST but in the marketscope the time appears to be GMT+1
for consistancy can the CSV have the same time and date a whats in market scope or some way or setting the time.

thanks

Re: Live chart data export to CSV

PostPosted: Tue Aug 02, 2011 12:58 pm
by allpin
Hello Chimpy,
I have updated zipped project file and zipped executable on the thread.
Changes made:
Historic date and prices should have the same format as upcoming prices.

Trading day offset is an offset of the trading day against the date's midnight, expressed in hours. For example, FXCM US starts the trading day at 17:00 of the previous date. So, the offset of the trading day is -7 hours.
Trading week offset is an offset of the week day against the Sunday's midnight, expressed in days. For example, FXCM US starts the trading week at Friday 17:00 (Saturday's trading day start). So, the offset of the trading day is -1 day.

“Digits” value from “Offers” table is the number of digits after the decimal point to which the price of the instrument is rounded in calculations (5 for EUR/USD and GBP/USD, and 3 for USD/JPY). Application uses this value to get the number of decimal places. It would depend on the instrument used, and it does not always equal 5.

Re: Live chart data export to CSV

PostPosted: Wed Aug 03, 2011 2:08 am
by chimpy
Allpin,

An additional problem I found last night was that the M1 timeframe does not work. It reports an error of file in use even though there is not file at that stage.

Thanks again

Chimpy