Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Streaming Live Quotes to OpenOffice Calc in Linux
 Post subject: Streaming Live Quotes to OpenOffice Calc in Linux Post rating: 0   New post Posted: Sat 13 Apr, 2013, 10:47 

User rating: 0
Joined: Wed 15 Jun, 2011, 00:55
Posts: 21
Location: AustraliaAustralia
Hi,

I'm trying to find a way to stream prices to an OpenOffice Calc Spreadsheet in Linux Mint. DDE is not an option in Linux. Is it possible to do this by writing to DB / SQL / CSV?

I would love to hear from anyone who has successfully achieved this. Or of course maybe there's an even better / simpler way!

Thanks in advance,

fifty_fifty


 
 Post subject: Re: Streaming Live Quotes to OpenOffice Calc in Linux Post rating: 0   New post Posted: Sat 13 Apr, 2013, 13:11 
User avatar

User rating: 94
Joined: Mon 06 Feb, 2012, 12:22
Posts: 357
Location: Portugal, Castelo Branco
fifty_fifty:

On linux the best choices are exporting to a db or to csv files. The last one, seems to me the easy way as you pretend to use the data on OpenOffice Calc.
Calc can open csv files. If you choose this way, i made one article about exporting JForex data to text or csv files you can read here -> https://www.dukascopy.com/fxcomm/fx-arti ... ad&id=1198 or you can find also some information about on Wiki.

Trade well

JL


 
 Post subject: Re: Streaming Live Quotes to OpenOffice Calc in Linux Post rating: 0   New post Posted: Tue 23 Apr, 2013, 11:27 

User rating: 0
Joined: Wed 15 Jun, 2011, 00:55
Posts: 21
Location: AustraliaAustralia
Hi JL,

Thanks for your reply! I had a read through your article, and it was very useful, but not quite what I am looking for. I need to write live bid/ask(ticks) into a spreadsheet. I have tried doing this using the method(from the Wiki) to write ticks to a csv file which is then linked to the spreadsheet (.ods file)

Then I get the last value from the column(which is the most recent tick). Works well except that the csv file becomes huge! So I scheduled an automatic deletion of the csv file every 5 minutes using crontab, but...the file is not then able to recreated automatically which means that the strategy has to be stopped and restarted.

There has to be an easier way!! Windows has DDE from MT4 or Jforex using prettytools.

Surely some linux genius's have the answer!! :)

Thanks,

fifty_fifty


 
 Post subject: Re: Streaming Live Quotes to OpenOffice Calc in Linux Post rating: 0   New post Posted: Thu 25 Apr, 2013, 11:20 

User rating: 0
Joined: Wed 15 Jun, 2011, 00:55
Posts: 21
Location: AustraliaAustralia
Perhaps using a TCP socket connection?

Anyone have any experience with this?

Thanks


 
 Post subject: Re: Streaming Live Quotes to OpenOffice Calc in Linux Post rating: 0   New post Posted: Fri 26 Apr, 2013, 21:11 
User avatar

User rating: 94
Joined: Mon 06 Feb, 2012, 12:22
Posts: 357
Location: Portugal, Castelo Branco
Hi fifty_fifty:

Yes, storing all tick data you can get *huge* files, but you don't need to delete them (if you don't have small hdd space). You can create files you want each one storing periods of 5 minutes, each one with a different name. You only need to calculate each 5 minutes interval and create a new file for each period with a different name, for example EURUSD_20130426_10_10.csv containing EURUSD tick information at 26 April 2013 started storing values from 10:10 until 10.14:59. You only need to code the period calculation separator and the name of the file.

I don't know if you need all tick data, but using my example you can filter only the fields you need and that way you can reduce the file lenght.

To me, the best way for this is to send the tick information data to a database, java DB, mysql, postgresql, hsqldb, dbo4j, etc, but that way you need to make a db connection and queries from openoffice.

Trade well

JL


 
 Post subject: Re: Streaming Live Quotes to OpenOffice Calc in Linux Post rating: 0   New post Posted: Mon 29 Apr, 2013, 21:41 
User avatar

User rating: 70
Joined: Sat 22 Sep, 2012, 17:43
Posts: 118
Location: Brazil, Fortaleza, Ceará
Depending on what it is you are trying to achieve note that OpenOffice has a Java API you can use to talk to it directly:

https://wiki.openoffice.org/wiki/Documen ... pers_Guide
https://wiki.openoffice.org/wiki/Documen ... _Documents (menu to the right)

LibreOffice is an OpenOffice fork - I've not researched enough to understand if the fork extends deeply into major API differences:

https://api.libreoffice.org/
https://api.libreoffice.org/examples/examples.html
https://api.libreoffice.org/examples/java/Spreadsheet/ (spreadsheet examples)

Obviously this approach is a lot more involved but at the same time it places OO under your control via Java either directly from within your jforex codebase or from an external application that communicates with both your jforex codebase and OO.

There doesn't appear to be linux compatible add-ons for openoffice addressing this issue unfortuantely.

====================================================================================================

Another approach would be to make use of OO Basic, Java, Python, Javascript, etc from within the Spreadsheet you are working with
as a Macro to open up a socket connection to your "data server" to receive the stream.

https://wiki.openoffice.org/wiki/Documen ... ing_Macros
https://wiki.openoffice.org/wiki/Documen ... readsheets (Basic Manipulation)
https://forum.openoffice.org/en/forum/vi ... 44&t=59806

Good luck :)


 
 Post subject: Re: Streaming Live Quotes to OpenOffice Calc in Linux Post rating: 0   New post Posted: Tue 30 Apr, 2013, 00:07 

User rating: 0
Joined: Wed 15 Jun, 2011, 00:55
Posts: 21
Location: AustraliaAustralia
Thanks CriticalSection for your in-depth response! Very much appreciated.

Will give me plenty of reading to do. :)

Cheers,
fifty_fifty


 

Jump to:  

  © 1998-2026 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com