Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread Dennis Lee


I copied and pasted the code for Shiny app, but it doesn't update the FX quotes
every 750 ms. I tried it on Firefox and Chrome.




 From: G See 
To: r-sig-finance  
Sent: Monday, 3 December 2012 8:57 PM
Subject: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

[sorry for the previous HTML e-mail. Gmail seems to think that's what
I meant to do]

Hello all,

I'd like to introduce the TFX package which I recently published to CRAN.

It is a simple R interface to the free TrueFX Web API. You can use it
to get real-time quotes with millisecond resolution and fractional-pip
bid/ask spreads for 26 currency pairs.

There is an RPub overview of the TFX package available here:
http://rpubs.com/gsee/TFX

The shiny package (http://www.rstudio.com/shiny/) has made the TFX
package more relevant (at least to me). You can see a demo of using
TFX with shiny by running the following code which will open a browser
window and display FX quotes that update every 750 milliseconds:

# install.packages('shiny', repos=c('http://rstudio.org/_packages',
# getOption('repos'))
library(shiny)
runGist("4122626")
#--
The code for the above shiny app can be viewed or downloaded from
https://gist.github.com/4122626

I've also had a little bit of success creating real-time streaming
charts using svSockets, following the video
(http://www.youtube.com/watch?v=rvT8XThGA8o) on the data.table
homepage (http://datatable.r-forge.r-project.org/) as a template and
using TFX as the data source.

Finally, TrueFX provides historical tick data for 15 currency pairs
going back to May 2009 (http://truefx.com/?page=downloads). There is a
script in the inst/parser directory of the FinancialInstrument package
(www.tinyurl.com/DownloadTrueFX) that can be used to download all of
that data to disk in a format that FinancialInstrument::getSymbols.FI
can easily read. This script is not intended to be used on Windows.

I have no affiliation with TrueFX.

Hope it's useful,
Garrett

P.S. The RPub (http://rpubs.com/gsee/TFX) is also included as a
vignette in the R-Forge version (installable with
install.packages("TFX", repos="http://r-forge.r-project.org";). As
outlined in the NEWS file, the only updates in the R-Forge version are
aesthetic: there are better error messages, a print.TFXsession method,
and Reconnect and Disconnect no longer print the returned TFXsession
object.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.
[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread G See
Aw. That's a shame.  What version of shiny and websockets are you using?

Maybe try:
   devtools::install_github('shiny', 'rstudio')

It works for me on linux with the following sessionInfo

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=C LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] bitops_1.0-4.1 TFX_0.1.1  shiny_0.1.12

loaded via a namespace (and not attached):
[1] caTools_1.13 digest_0.6.0 RJSONIO_1.0-1tools_2.15.2
[5] websockets_1.1.6 XML_3.95-0.1 xtable_1.7-0


Garrett

On Mon, Dec 3, 2012 at 10:33 AM, Dennis Lee  wrote:
>
>
> I copied and pasted the code for Shiny app, but it doesn't update the FX 
> quotes
> every 750 ms. I tried it on Firefox and Chrome.
>
>
>
> 
>  From: G See 
> To: r-sig-finance 
> Sent: Monday, 3 December 2012 8:57 PM
> Subject: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API
>
> [sorry for the previous HTML e-mail. Gmail seems to think that's what
> I meant to do]
>
> Hello all,
>
> I'd like to introduce the TFX package which I recently published to CRAN.
>
> It is a simple R interface to the free TrueFX Web API. You can use it
> to get real-time quotes with millisecond resolution and fractional-pip
> bid/ask spreads for 26 currency pairs.
>
> There is an RPub overview of the TFX package available here:
> http://rpubs.com/gsee/TFX
>
> The shiny package (http://www.rstudio.com/shiny/) has made the TFX
> package more relevant (at least to me). You can see a demo of using
> TFX with shiny by running the following code which will open a browser
> window and display FX quotes that update every 750 milliseconds:
>
> # install.packages('shiny', repos=c('http://rstudio.org/_packages',
> # getOption('repos'))
> library(shiny)
> runGist("4122626")
> #--
> The code for the above shiny app can be viewed or downloaded from
> https://gist.github.com/4122626
>
> I've also had a little bit of success creating real-time streaming
> charts using svSockets, following the video
> (http://www.youtube.com/watch?v=rvT8XThGA8o) on the data.table
> homepage (http://datatable.r-forge.r-project.org/) as a template and
> using TFX as the data source.
>
> Finally, TrueFX provides historical tick data for 15 currency pairs
> going back to May 2009 (http://truefx.com/?page=downloads). There is a
> script in the inst/parser directory of the FinancialInstrument package
> (www.tinyurl.com/DownloadTrueFX) that can be used to download all of
> that data to disk in a format that FinancialInstrument::getSymbols.FI
> can easily read. This script is not intended to be used on Windows.
>
> I have no affiliation with TrueFX.
>
> Hope it's useful,
> Garrett
>
> P.S. The RPub (http://rpubs.com/gsee/TFX) is also included as a
> vignette in the R-Forge version (installable with
> install.packages("TFX", repos="http://r-forge.r-project.org";). As
> outlined in the NEWS file, the only updates in the R-Forge version are
> aesthetic: there are better error messages, a print.TFXsession method,
> and Reconnect and Disconnect no longer print the returned TFXsession
> object.
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions 
> should go.
> [[alternative HTML version deleted]]
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions 
> should go.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread Dirk Eddelbuettel

On 3 December 2012 at 08:33, Dennis Lee wrote:
| I copied and pasted the code for Shiny app, but it doesn't update the FX 
quotes
| every 750 ms. I tried it on Firefox and Chrome.

"I copied and paste" ? Maybe you did that the wrong way?  

What happens when you install the shiny and TFX packages, and execute

library(shiny)
runGist("4122626")

which has been very reliable for me on different machine 
(home/work/netbook/...) ?

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread Dennis Lee
I am running it on Windows, maybe you didn't understand what I said.

I did get the first quote displayed correctly, so it is not because of the 
library.

My problem is that it doesn't update periodically. I will try to figure it out
when I have time, just too late now (its past midnight here) to solve this.

> sessionInfo() R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit) 

It could be because of my R version (maybe not), but then again I have 

installed the CRAN version of shiny (and not the dev version on Github).




 From: Dirk Eddelbuettel 

Cc: r-sig-finance  
Sent: Tuesday, 4 December 2012 12:56 AM
Subject: Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web 
API


On 3 December 2012 at 08:33, Dennis Lee wrote:
| I copied and pasted the code for Shiny app, but it doesn't update the FX 
quotes
| every 750 ms. I tried it on Firefox and Chrome.

"I copied and paste" ? Maybe you did that the wrong way?  

What happens when you install the shiny and TFX packages, and execute

    library(shiny)
    runGist("4122626")

which has been very reliable for me on different machine 
(home/work/netbook/...) ?

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com  
[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread Jeff Ryan
If the backend is using websockets, that is very new ground in the land of
HTML.  M$ prides itself typically on being off by a decade w.r.t. adoption
of such 'shiny' things.

So... that may indeed be your issue.

Jeff


On Mon, Dec 3, 2012 at 11:05 AM, Dennis Lee  wrote:

> I am running it on Windows, maybe you didn't understand what I said.
>
> I did get the first quote displayed correctly, so it is not because of the
> library.
>
> My problem is that it doesn't update periodically. I will try to figure it
> out
> when I have time, just too late now (its past midnight here) to solve this.
>
> > sessionInfo() R version 2.15.1 (2012-06-22)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> It could be because of my R version (maybe not), but then again I have
>
> installed the CRAN version of shiny (and not the dev version on Github).
>
>
>
> 
>  From: Dirk Eddelbuettel 
>
> Cc: r-sig-finance 
> Sent: Tuesday, 4 December 2012 12:56 AM
> Subject: Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX
> Web API
>
>
> On 3 December 2012 at 08:33, Dennis Lee wrote:
> | I copied and pasted the code for Shiny app, but it doesn't update the FX
> quotes
> | every 750 ms. I tried it on Firefox and Chrome.
>
> "I copied and paste" ? Maybe you did that the wrong way?
>
> What happens when you install the shiny and TFX packages, and execute
>
> library(shiny)
> runGist("4122626")
>
> which has been very reliable for me on different machine
> (home/work/netbook/...) ?
>
> Dirk
>
> --
> Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
> [[alternative HTML version deleted]]
>
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>



-- 
Jeffrey Ryan
jeffrey.r...@lemnica.com

www.lemnica.com

[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread G See
I just tried it on Windows and it works for me with the sessionInfo below.

Are you sure you have at least version 1.1.6 of websockets?

> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252LC_MONETARY=English_United States.1252 LC_NUMERIC=C
  LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] bitops_1.0-5 TFX_0.1.0shiny_0.2.3

loaded via a namespace (and not attached):
[1] caTools_1.13 digest_0.5.2 RJSONIO_1.0-1tools_2.15.1
 websockets_1.1.6 XML_3.9-4.1  xtable_1.7-0

Garrett


On Mon, Dec 3, 2012 at 11:09 AM, Jeff Ryan  wrote:
> If the backend is using websockets, that is very new ground in the land of
> HTML.  M$ prides itself typically on being off by a decade w.r.t. adoption
> of such 'shiny' things.
>
> So... that may indeed be your issue.
>
> Jeff
>
>
> On Mon, Dec 3, 2012 at 11:05 AM, Dennis Lee  wrote:
>
>> I am running it on Windows, maybe you didn't understand what I said.
>>
>> I did get the first quote displayed correctly, so it is not because of the
>> library.
>>
>> My problem is that it doesn't update periodically. I will try to figure it
>> out
>> when I have time, just too late now (its past midnight here) to solve this.
>>
>> > sessionInfo() R version 2.15.1 (2012-06-22)
>> Platform: i386-pc-mingw32/i386 (32-bit)
>>
>> It could be because of my R version (maybe not), but then again I have
>>
>> installed the CRAN version of shiny (and not the dev version on Github).
>>
>>
>>
>> ____________________
>>  From: Dirk Eddelbuettel 
>>
>> Cc: r-sig-finance 
>> Sent: Tuesday, 4 December 2012 12:56 AM
>> Subject: Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX
>> Web API
>>
>>
>> On 3 December 2012 at 08:33, Dennis Lee wrote:
>> | I copied and pasted the code for Shiny app, but it doesn't update the FX
>> quotes
>> | every 750 ms. I tried it on Firefox and Chrome.
>>
>> "I copied and paste" ? Maybe you did that the wrong way?
>>
>> What happens when you install the shiny and TFX packages, and execute
>>
>> library(shiny)
>> runGist("4122626")
>>
>> which has been very reliable for me on different machine
>> (home/work/netbook/...) ?
>>
>> Dirk
>>
>> --
>> Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
>> [[alternative HTML version deleted]]
>>
>>
>> ___
>> R-SIG-Finance@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
>
>
> --
> Jeffrey Ryan
> jeffrey.r...@lemnica.com
>
> www.lemnica.com
>
> [[alternative HTML version deleted]]
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions 
> should go.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread G See
Another possibililty, of course, is that you checked the "Pause
updates" check box at the bottom of the page.  When that is checked,
the quotes don't update.

Garrett

On Mon, Dec 3, 2012 at 11:12 AM, G See  wrote:
> I just tried it on Windows and it works for me with the sessionInfo below.
>
> Are you sure you have at least version 1.1.6 of websockets?
>
>> sessionInfo()
> R version 2.15.1 (2012-06-22)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>   LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base
>
> other attached packages:
> [1] bitops_1.0-5 TFX_0.1.0shiny_0.2.3
>
> loaded via a namespace (and not attached):
> [1] caTools_1.13 digest_0.5.2 RJSONIO_1.0-1tools_2.15.1
>  websockets_1.1.6 XML_3.9-4.1  xtable_1.7-0
>
> Garrett
>
>
> On Mon, Dec 3, 2012 at 11:09 AM, Jeff Ryan  wrote:
>> If the backend is using websockets, that is very new ground in the land of
>> HTML.  M$ prides itself typically on being off by a decade w.r.t. adoption
>> of such 'shiny' things.
>>
>> So... that may indeed be your issue.
>>
>> Jeff
>>
>>
>> On Mon, Dec 3, 2012 at 11:05 AM, Dennis Lee  wrote:
>>
>>> I am running it on Windows, maybe you didn't understand what I said.
>>>
>>> I did get the first quote displayed correctly, so it is not because of the
>>> library.
>>>
>>> My problem is that it doesn't update periodically. I will try to figure it
>>> out
>>> when I have time, just too late now (its past midnight here) to solve this.
>>>
>>> > sessionInfo() R version 2.15.1 (2012-06-22)
>>> Platform: i386-pc-mingw32/i386 (32-bit)
>>>
>>> It could be because of my R version (maybe not), but then again I have
>>>
>>> installed the CRAN version of shiny (and not the dev version on Github).
>>>
>>>
>>>
>>> 
>>>  From: Dirk Eddelbuettel 
>>>
>>> Cc: r-sig-finance 
>>> Sent: Tuesday, 4 December 2012 12:56 AM
>>> Subject: Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX
>>> Web API
>>>
>>>
>>> On 3 December 2012 at 08:33, Dennis Lee wrote:
>>> | I copied and pasted the code for Shiny app, but it doesn't update the FX
>>> quotes
>>> | every 750 ms. I tried it on Firefox and Chrome.
>>>
>>> "I copied and paste" ? Maybe you did that the wrong way?
>>>
>>> What happens when you install the shiny and TFX packages, and execute
>>>
>>> library(shiny)
>>> runGist("4122626")
>>>
>>> which has been very reliable for me on different machine
>>> (home/work/netbook/...) ?
>>>
>>> Dirk
>>>
>>> --
>>> Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
>>> [[alternative HTML version deleted]]
>>>
>>>
>>> ___
>>> R-SIG-Finance@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions
>>> should go.
>>>
>>
>>
>>
>> --
>> Jeffrey Ryan
>> jeffrey.r...@lemnica.com
>>
>> www.lemnica.com
>>
>> [[alternative HTML version deleted]]
>>
>> ___
>> R-SIG-Finance@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions 
>> should go.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread Dennis Lee
I did get this warning when I ran the code:

> runGist("4122626") Loading required package: TFX Warning: package ‘TFX’ 
> was built under R version 2.15.2 

I have checked websockets:


loaded via a namespace (and not attached): [1] bitops_1.0-5 caTools_1.13
 devtools_0.8 [4] digest_0.6.0 evaluate_0.4.2   httr_0.2 [7] 
memoise_0.1  parallel_2.15.1  plyr_1.7.1  
[10] RCurl_1.95-3 RJSONIO_1.0-1stringr_0.6.1   
[13] tools_2.15.1 websockets_1.1.6 whisker_0.1 
[16] xtable_1.7-0 

I have checked pause updates:

Pause updates

So, Windows is not the issue, I have to update R to version 2.15.2 then
seems logical to me.





 From: G See 
To: Jeff Ryan  

ject.org> 
Sent: Tuesday, 4 December 2012 1:12 AM
Subject: Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web 
API

I just tried it on Windows and it works for me with the sessionInfo below.

Are you sure you have at least version 1.1.6 of websockets?

> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C
                      LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] bitops_1.0-5 TFX_0.1.0    shiny_0.2.3

loaded via a namespace (and not attached):
[1] caTools_1.13     digest_0.5.2     RJSONIO_1.0-1    tools_2.15.1
websockets_1.1.6 XML_3.9-4.1      xtable_1.7-0

Garrett


On Mon, Dec 3, 2012 at 11:09 AM, Jeff Ryan  wrote:
> If the backend is using websockets, that is very new ground in the land of
> HTML.  M$ prides itself typically on being off by a decade w.r.t. adoption
> of such 'shiny' things.
>
> So... that may indeed be your issue.
>
> Jeff
>
>

e:
>
>> I am running it on Windows, maybe you didn't understand what I said.
>>
>> I did get the first quote displayed correctly, so it is not because of the
>> library.
>>
>> My problem is that it doesn't update periodically. I will try to figure it
>> out
>> when I have time, just too late now (its past midnight here) to solve this.
>>
>> > sessionInfo() R version 2.15.1 (2012-06-22)
>> Platform: i386-pc-mingw32/i386 (32-bit)
>>
>> It could be because of my R version (maybe not), but then again I have
>>
>> installed the CRAN version of shiny (and not the dev version on Github).
>>
>>
>>
>> ____________________
>>  From: Dirk Eddelbuettel 
>>
>> Cc: r-sig-finance 
>> Sent: Tuesday, 4 December 2012 12:56 AM
>> Subject: Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX
>> Web API
>>
>>
>> On 3 December 2012 at 08:33, Dennis Lee wrote:
>> | I copied and pasted the code for Shiny app, but it doesn't update the FX
>> quotes
>> | every 750 ms. I tried it on Firefox and Chrome.
>>
>> "I copied and paste" ? Maybe you did that the wrong way?
>>
>> What happens when you install the shiny and TFX packages, and execute
>>
>>     library(shiny)
>>     runGist("4122626")
>>
>> which has been very reliable for me on different machine
>> (home/work/netbook/...) ?
>>
>> Dirk
>>
>> --
>> Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
>>         [[alternative HTML version deleted]]
>>
>>
>> ___
>> R-SIG-Finance@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
>
>
> --
> Jeffrey Ryan
> jeffrey.r...@lemnica.com
>
> www.lemnica.com
>
>         [[alternative HTML version deleted]]
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions 
> should go.
[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread G See
On Mon, Dec 3, 2012 at 11:28 AM, Dennis Lee  wrote:
> I did get this warning when I ran the code:
>
>> runGist("4122626") Loading required package: TFX Warning: package ‘TFX’ was 
>> built under R version 2.15.2
>
> I have checked websockets:
>
>
> loaded via a namespace (and not attached): [1] bitops_1.0-5 caTools_1.13  
>devtools_0.8 [4] digest_0.6.0 evaluate_0.4.2   httr_0.2 
> [7] memoise_0.1  parallel_2.15.1  plyr_1.7.1
> [10] RCurl_1.95-3 RJSONIO_1.0-1stringr_0.6.1
> [13] tools_2.15.1 websockets_1.1.6 whisker_0.1
> [16] xtable_1.7-0
>
> I have checked pause updates:
>
> Pause updates

This should be UNchecked!

>
> So, Windows is not the issue, I have to update R to version 2.15.2 then
> seems logical to me.
>

But, I ran it on R 2.15.1 and it worked fine.  See my sessionInfo in
the previous message.

So, I'm not sure what's not working for you.  Maybe some local
security settings?

Garrett

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread Jeff Ryan
websockets are _incredibly_ browser sensitive, as I noted before.  I worked
on/with the websockets package back when Bryan Lewis first wrote it, and to
say getting the pieces aligned is tricky is an understatement.

I don't know the current browser status, but you may need to update those
as well.

HTH
Jeff


On Mon, Dec 3, 2012 at 11:40 AM, G See  wrote:

> On Mon, Dec 3, 2012 at 11:28 AM, Dennis Lee 
> wrote:
> > I did get this warning when I ran the code:
> >
> >> runGist("4122626") Loading required package: TFX Warning: package ‘TFX’
> was built under R version 2.15.2
> >
> > I have checked websockets:
> >
> >
> > loaded via a namespace (and not attached): [1] bitops_1.0-5
> caTools_1.13 devtools_0.8 [4] digest_0.6.0 evaluate_0.4.2
> httr_0.2 [7] memoise_0.1  parallel_2.15.1  plyr_1.7.1
> > [10] RCurl_1.95-3 RJSONIO_1.0-1stringr_0.6.1
> > [13] tools_2.15.1 websockets_1.1.6 whisker_0.1
> > [16] xtable_1.7-0
> >
> > I have checked pause updates:
> >
> > Pause updates
>
> This should be UNchecked!
>
> >
> > So, Windows is not the issue, I have to update R to version 2.15.2 then
> > seems logical to me.
> >
>
> But, I ran it on R 2.15.1 and it worked fine.  See my sessionInfo in
> the previous message.
>
> So, I'm not sure what's not working for you.  Maybe some local
> security settings?
>
> Garrett
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>



-- 
Jeffrey Ryan
jeffrey.r...@lemnica.com

www.lemnica.com

[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2012-12-03 Thread rex

G See  [2012-12-03 04:57]:

I'd like to introduce the TFX package which I recently published to CRAN.

It is a simple R interface to the free TrueFX Web API. You can use it
to get real-time quotes with millisecond resolution and fractional-pip
bid/ask spreads for 26 currency pairs.

There is an RPub overview of the TFX package available here:
http://rpubs.com/gsee/TFX


Wow, this looks _very_ cool! Thank you for all the R work you do.


# install.packages('shiny', repos=c('http://rstudio.org/_packages',
# getOption('repos'))
library(shiny)
runGist("4122626")


Runs with no problems here. Starts a Chrome session on localhost:8100.


#--
The code for the above shiny app can be viewed or downloaded from
https://gist.github.com/4122626


Did that, pasted server.R and ui.R into ~/R/gsee/, then within
an interactive R session, did:


runApp(appDir = '~/R/gsee', port = 8100L)


It runs as before, and after opening up port 8100, the world can see
it. Amazing. Firefox 16.x and Chrome 20.0.1132.57 both work.


sessionInfo()

R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)

[...]

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base 


other attached packages:
[1] bitops_1.0-4.1 shiny_0.2.3TFX_0.1.1 


loaded via a namespace (and not attached):
[1] caTools_1.13 digest_0.5.2 RJSONIO_0.98-1   tcltk_2.15.1
[5] tools_2.15.1 websockets_1.1.6 XML_3.9-4xtable_1.7-0 


I've also had a little bit of success creating real-time streaming
charts using svSockets, following the video
(http://www.youtube.com/watch?v=rvT8XThGA8o) on the data.table
homepage (http://datatable.r-forge.r-project.org/) as a template and
using TFX as the data source.


Love to see this in action.


Hope it's useful,


Looks as if it will be very useful indeed. :)

Thanks again,

-rex
--
All of us necessarily hold many casual opinions that are ludicrously
wrong simply because life is far too short for us to think through even
a small fraction of the topics that we come across.
  --Julian Simon

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2013-11-26 Thread veepsirtt
Hello gsee,

I tryied the examples given in your documentation.
But I am getting errors.
what is the problem?
With regards
veepsirtt.


## Cannot run these because there may not be an internet connection
## Not run:
library(TFX)
QueryTrueFX() #unauthenticated
QueryTrueFX(pretty=FALSE)
QueryTrueFX(parse=FALSE)

## For authenticated session, you must have a username and password (it’s
free).
## Use your username and passward instead of JSTrader and Ou812

id <- ConnectTrueFX(’EUR/USD,GBP/USD’, username=’veepsirtt’,
password=’veeps203’)
QueryTrueFX(id)
QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
password=’veeps203’,format=’csv’), parse=FALSE)
QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
password=’veeps203’,format=’html’), parse=FALSE)
## If you have shiny installed
## install.packages("shiny", repos="http://rstudio.org/_packages";)
library(shiny)

runGist("4122626")

## view the code for this shiny app at
#browseURL("https://gist.github.com/4122626";)
## End(Not run)--



RESULTS***
> source('~/.active-rstudio-document', echo=TRUE)
Error in source("~/.active-rstudio-document", echo = TRUE) : 
  ~/.active-rstudio-document:11:21: unexpected input
10: 
11: id <- ConnectTrueFX(�
   ^
> sessionInfo() 
R version 2.15.3 (2013-03-01)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C  
LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8LC_PAPER=C   
 
LC_NAME=C 
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base 

other attached packages:
 [1] shiny_0.8.0 TFX_0.1.0   ggplot2_0.9.3.1 xtsExtra_0.0-1 
tseries_0.10-32 quantmod_0.4-0 
 [7] TTR_0.21-1  xts_0.9-3   zoo_1.7-9   Defaults_1.1-1 

loaded via a namespace (and not attached):
 [1] bitops_1.0-4.1 caTools_1.13   colorspace_1.2-0  
dichromat_1.2-4digest_0.5.2  
 [6] grid_2.15.3gtable_0.1.1   httpuv_1.2.0   labeling_0.1  
lattice_0.20-13   
[11] MASS_7.3-23munsell_0.4plyr_1.7.1 proto_0.3-9.2 
quadprog_1.5-5
[16] RColorBrewer_1.0-5 Rcpp_0.10.2reshape2_1.2.1 RJSONIO_1.0-1 
scales_0.2.3  
[21] stringr_0.6.1  tools_2.15.3   XML_3.98-1.1   xtable_1.7-0  
> 





--
View this message in context: 
http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681163.html
Sent from the Rmetrics mailing list archive at Nabble.com.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2013-11-26 Thread G See
Try typing that command.  Your single quote is a weird character.  Try this:

id <- ConnectTrueFX('EUR/USD,GBP/USD', username='veepsirtt',
  password='veeps203')

On Tue, Nov 26, 2013 at 3:47 AM, veepsirtt  wrote:
> Hello gsee,
>
> I tryied the examples given in your documentation.
> But I am getting errors.
> what is the problem?
> With regards
> veepsirtt.
> 
>
> ## Cannot run these because there may not be an internet connection
> ## Not run:
> library(TFX)
> QueryTrueFX() #unauthenticated
> QueryTrueFX(pretty=FALSE)
> QueryTrueFX(parse=FALSE)
>
> ## For authenticated session, you must have a username and password (it’s
> free).
> ## Use your username and passward instead of JSTrader and Ou812
>
> id <- ConnectTrueFX(’EUR/USD,GBP/USD’, username=’veepsirtt’,
> password=’veeps203’)
> QueryTrueFX(id)
> QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
> password=’veeps203’,format=’csv’), parse=FALSE)
> QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
> password=’veeps203’,format=’html’), parse=FALSE)
> ## If you have shiny installed
> ## install.packages("shiny", repos="http://rstudio.org/_packages";)
> library(shiny)
>
> runGist("4122626")
>
> ## view the code for this shiny app at
> #browseURL("https://gist.github.com/4122626";)
> ## End(Not run)--
>
>
>
> RESULTS***
>> source('~/.active-rstudio-document', echo=TRUE)
> Error in source("~/.active-rstudio-document", echo = TRUE) :
>   ~/.active-rstudio-document:11:21: unexpected input
> 10:
> 11: id <- ConnectTrueFX(�
>^
>> sessionInfo()
> R version 2.15.3 (2013-03-01)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
> LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8LC_PAPER=C
> LC_NAME=C
>  [9] LC_ADDRESS=C   LC_TELEPHONE=C
> LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base
>
> other attached packages:
>  [1] shiny_0.8.0 TFX_0.1.0   ggplot2_0.9.3.1 xtsExtra_0.0-1
> tseries_0.10-32 quantmod_0.4-0
>  [7] TTR_0.21-1  xts_0.9-3   zoo_1.7-9   Defaults_1.1-1
>
> loaded via a namespace (and not attached):
>  [1] bitops_1.0-4.1 caTools_1.13   colorspace_1.2-0
> dichromat_1.2-4digest_0.5.2
>  [6] grid_2.15.3gtable_0.1.1   httpuv_1.2.0   labeling_0.1
> lattice_0.20-13
> [11] MASS_7.3-23munsell_0.4plyr_1.7.1 proto_0.3-9.2
> quadprog_1.5-5
> [16] RColorBrewer_1.0-5 Rcpp_0.10.2reshape2_1.2.1 RJSONIO_1.0-1
> scales_0.2.3
> [21] stringr_0.6.1  tools_2.15.3   XML_3.98-1.1   xtable_1.7-0
>>
>
>
>
>
>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681163.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions 
> should go.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2013-11-27 Thread veepsirtt
> id <- ConnectTrueFX('EUR/USD,GBP/USD', username='veepsirtt',+ 
> password='veeps203')> > id
attr(,"class")
[1] "TFXsession"  "environment"


>


On Tue, Nov 26, 2013 at 8:33 PM, gsee [via R] <
ml-node+s789695n4681182...@n4.nabble.com> wrote:

> Try typing that command.  Your single quote is a weird character.  Try
> this:
>
> id <- ConnectTrueFX('EUR/USD,GBP/USD', username='veepsirtt',
>   password='veeps203')
>
> On Tue, Nov 26, 2013 at 3:47 AM, veepsirtt <[hidden 
> email]>
> wrote:
>
> > Hello gsee,
> >
> > I tryied the examples given in your documentation.
> > But I am getting errors.
> > what is the problem?
> > With regards
> > veepsirtt.
> > 
> >
> > ## Cannot run these because there may not be an internet connection
> > ## Not run:
> > library(TFX)
> > QueryTrueFX() #unauthenticated
> > QueryTrueFX(pretty=FALSE)
> > QueryTrueFX(parse=FALSE)
> >
> > ## For authenticated session, you must have a username and password
> (it’s
> > free).
> > ## Use your username and passward instead of JSTrader and Ou812
> >
> > id <- ConnectTrueFX(’EUR/USD,GBP/USD’, username=’veepsirtt’,
> > password=’veeps203’)
> > QueryTrueFX(id)
> > QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
> > password=’veeps203’,format=’csv’), parse=FALSE)
> > QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
> > password=’veeps203’,format=’html’), parse=FALSE)
> > ## If you have shiny installed
> > ## install.packages("shiny", repos="http://rstudio.org/_packages";)
> > library(shiny)
> >
> > runGist("4122626")
> >
> > ## view the code for this shiny app at
> > #browseURL("https://gist.github.com/4122626";)
> > ## End(Not run)--
> >
> >
> >
> > RESULTS***
> >> source('~/.active-rstudio-document', echo=TRUE)
> > Error in source("~/.active-rstudio-document", echo = TRUE) :
> >   ~/.active-rstudio-document:11:21: unexpected input
> > 10:
> > 11: id <- ConnectTrueFX(�
> >^
> >> sessionInfo()
> > R version 2.15.3 (2013-03-01)
> > Platform: x86_64-pc-linux-gnu (64-bit)
> >
> > locale:
> >  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
> > LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
> >  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8LC_PAPER=C
> > LC_NAME=C
> >  [9] LC_ADDRESS=C   LC_TELEPHONE=C
> > LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
> >
> > attached base packages:
> > [1] stats graphics  grDevices utils datasets  methods   base
> >
> > other attached packages:
> >  [1] shiny_0.8.0 TFX_0.1.0   ggplot2_0.9.3.1 xtsExtra_0.0-1
> > tseries_0.10-32 quantmod_0.4-0
> >  [7] TTR_0.21-1  xts_0.9-3   zoo_1.7-9   Defaults_1.1-1
> >
> > loaded via a namespace (and not attached):
> >  [1] bitops_1.0-4.1 caTools_1.13   colorspace_1.2-0
> > dichromat_1.2-4digest_0.5.2
> >  [6] grid_2.15.3gtable_0.1.1   httpuv_1.2.0
> labeling_0.1
> > lattice_0.20-13
> > [11] MASS_7.3-23munsell_0.4plyr_1.7.1
> proto_0.3-9.2
> > quadprog_1.5-5
> > [16] RColorBrewer_1.0-5 Rcpp_0.10.2reshape2_1.2.1
> RJSONIO_1.0-1
> > scales_0.2.3
> > [21] stringr_0.6.1  tools_2.15.3   XML_3.98-1.1
> xtable_1.7-0
> >>
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681163.html
> > Sent from the Rmetrics mailing list archive at Nabble.com.
> >
> > ___
> > [hidden email] 
> > mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> should go.
>
> ___
> [hidden email] mailing 
> list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681182.html
>  To unsubscribe from Introducing TFX: An R Interface to the TrueFX Web
> API, click 
> here
> .
> NAML

Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2013-11-27 Thread veepsirtt
Hello Gsee,
Why I am getting this error?.
unexpected input in "QueryTrueFX(ConnectTrueFX(username=’"
---

>  ## Cannot run these because there may not be an internet connection
>  ## Not run:
> library(TFX)
> QueryTrueFX() #unauthenticated
Symbol Bid.Price Ask.Price  High   Low   TimeStamp
1  EUR/USD   1.35773   1.35781   1.35804   1.35634 2013-11-28 04:29:35
2  USD/JPY 102.05800 102.06400 102.29100 101.93300 2013-11-28 04:29:38
3  GBP/USD   1.63036   1.63055   1.63074   1.62763 2013-11-28 04:29:35
4  EUR/GBP   0.83265   0.83282   0.83436   0.83235 2013-11-28 04:29:35
5  USD/CHF   0.90768   0.90784   0.90874   0.90725 2013-11-28 04:29:40
6  EUR/JPY 138.56800 138.58300 138.84900 138.29900 2013-11-28 04:29:35
7  EUR/CHF   1.23241   1.23266   1.23308   1.23195 2013-11-28 04:29:35
8  USD/CAD   1.05844   1.05867   1.05987   1.05746 2013-11-28 04:29:34
9  AUD/USD   0.91259   0.91270   0.91411   0.90742 2013-11-28 04:29:34
10 GBP/JPY 166.38900 166.42000 166.61000 165.95600 2013-11-28 04:29:35
>  QueryTrueFX(pretty=FALSE)
$Symbol
 [1] "EUR/USD" "USD/JPY" "GBP/USD" "EUR/GBP" "USD/CHF" "EUR/JPY" "EUR/CHF"
"USD/CAD" "AUD/USD" "GBP/JPY"

$BidBigNumber
 [1] "1.35" "102." "1.63" "0.83" "0.90" "138." "1.23" "1.05" "0.91" "166."

$BidPip
 [1] "773" "058" "036" "265" "768" "568" "241" "844" "259" "389"

$OfferBigNumber
 [1] "1.35" "102." "1.63" "0.83" "0.90" "138." "1.23" "1.05" "0.91" "166."

$OfferPip
 [1] "781" "064" "055" "282" "784" "583" "266" "867" "270" "420"

$High
 [1] "1.35804" "102.291" "1.63074" "0.83436" "0.90874" "138.849" "1.23308"
"1.05987" "0.91411" "166.610"

$Low
 [1] "1.35634" "101.933" "1.62763" "0.83235" "0.90725" "138.299" "1.23195"
"1.05746" "0.90742" "165.956"

$TimeStamp
 [1] "1385612975232" "1385612978277" "1385612975780" "1385612975128"
"1385612980409" "1385612975181"
 [7] "1385612975905" "1385612974630" "1385612974758" "1385612975675"

>  QueryTrueFX(parse=FALSE)
[1]
"EUR/USDUSD/JPYGBP/USDEUR/GBPUSD/CHFEUR/JPYEUR/CHFUSD/CADAUD/USDGBP/JPY1.35102.1.630.830.90138.1.231.050.91166.7690580362627735672398442593891.35102.1.630.830.90138.1.231.050.91166.7770640552787875812638672704201.35804102.2911.630740.834360.90874138.8491.233081.059870.91411166.6101.35634101.9331.627630.832350.90725138.2991.231951.057460.90742165.9561385612981970138561297827713856129820241385612981995138561298220413856129818141385612981814138561297463013856129747581385612975675"
> 
>  ## For authenticated session, you must have a username and password
> (it’s> free).
>  ## Use your username and passward instead of JSTrader and Ou812
> 
> id <- ConnectTrueFX(’EUR/USD,GBP/USD’,
> username=’veepsirtt’,password=’veeps203’)
Error: unexpected input in "id <- ConnectTrueFX(’"
>  QueryTrueFX(id)
   Symbol Bid.Price Ask.PriceHigh Low   TimeStamp
1 EUR/USD   1.35769   1.35777 1.35804 1.35634 2013-11-28 04:29:52
2 GBP/USD   1.63031   1.63048 1.63074 1.62763 2013-11-28 04:29:52
> id

attr(,"class")
[1] "TFXsession"  "environment"
> QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
> password=’veeps203’,format=’csv’), arse=FALSE)
Error: unexpected input in "QueryTrueFX(ConnectTrueFX(username=’"
> QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
> password=’veeps203’,format=’html’), arse=FALSE)
Error: unexpected input in "QueryTrueFX(ConnectTrueFX(username=’"
> 




--
View this message in context: 
http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681300.html
Sent from the Rmetrics mailing list archive at Nabble.com.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2013-11-27 Thread G See
Because you've pasted a right single quote unicode symbol instead of
typing an apostrophe.

When I copy/paste from the command you entered, I get

R> charToRaw("’")
[1] e2 80 99

When I type an apostrophe using the keyboard, I get

R> charToRaw("'")
[1] 27

Try typing your command instead of copy/pasting it.

Hope this helps,
Garrett

On Wed, Nov 27, 2013 at 10:37 PM, veepsirtt  wrote:
> Hello Gsee,
> Why I am getting this error?.
> unexpected input in "QueryTrueFX(ConnectTrueFX(username=’"
> ---
>
>>  ## Cannot run these because there may not be an internet connection
>>  ## Not run:
>> library(TFX)
>> QueryTrueFX() #unauthenticated
> Symbol Bid.Price Ask.Price  High   Low   TimeStamp
> 1  EUR/USD   1.35773   1.35781   1.35804   1.35634 2013-11-28 04:29:35
> 2  USD/JPY 102.05800 102.06400 102.29100 101.93300 2013-11-28 04:29:38
> 3  GBP/USD   1.63036   1.63055   1.63074   1.62763 2013-11-28 04:29:35
> 4  EUR/GBP   0.83265   0.83282   0.83436   0.83235 2013-11-28 04:29:35
> 5  USD/CHF   0.90768   0.90784   0.90874   0.90725 2013-11-28 04:29:40
> 6  EUR/JPY 138.56800 138.58300 138.84900 138.29900 2013-11-28 04:29:35
> 7  EUR/CHF   1.23241   1.23266   1.23308   1.23195 2013-11-28 04:29:35
> 8  USD/CAD   1.05844   1.05867   1.05987   1.05746 2013-11-28 04:29:34
> 9  AUD/USD   0.91259   0.91270   0.91411   0.90742 2013-11-28 04:29:34
> 10 GBP/JPY 166.38900 166.42000 166.61000 165.95600 2013-11-28 04:29:35
>>  QueryTrueFX(pretty=FALSE)
> $Symbol
>  [1] "EUR/USD" "USD/JPY" "GBP/USD" "EUR/GBP" "USD/CHF" "EUR/JPY" "EUR/CHF"
> "USD/CAD" "AUD/USD" "GBP/JPY"
>
> $BidBigNumber
>  [1] "1.35" "102." "1.63" "0.83" "0.90" "138." "1.23" "1.05" "0.91" "166."
>
> $BidPip
>  [1] "773" "058" "036" "265" "768" "568" "241" "844" "259" "389"
>
> $OfferBigNumber
>  [1] "1.35" "102." "1.63" "0.83" "0.90" "138." "1.23" "1.05" "0.91" "166."
>
> $OfferPip
>  [1] "781" "064" "055" "282" "784" "583" "266" "867" "270" "420"
>
> $High
>  [1] "1.35804" "102.291" "1.63074" "0.83436" "0.90874" "138.849" "1.23308"
> "1.05987" "0.91411" "166.610"
>
> $Low
>  [1] "1.35634" "101.933" "1.62763" "0.83235" "0.90725" "138.299" "1.23195"
> "1.05746" "0.90742" "165.956"
>
> $TimeStamp
>  [1] "1385612975232" "1385612978277" "1385612975780" "1385612975128"
> "1385612980409" "1385612975181"
>  [7] "1385612975905" "1385612974630" "1385612974758" "1385612975675"
>
>>  QueryTrueFX(parse=FALSE)
> [1]
> "EUR/USDUSD/JPYGBP/USDEUR/GBPUSD/CHFEUR/JPYEUR/CHFUSD/CADAUD/USDGBP/JPY1.35102.1.630.830.90138.1.231.050.91166.7690580362627735672398442593891.35102.1.630.830.90138.1.231.050.91166.7770640552787875812638672704201.35804102.2911.630740.834360.90874138.8491.233081.059870.91411166.6101.35634101.9331.627630.832350.90725138.2991.231951.057460.90742165.9561385612981970138561297827713856129820241385612981995138561298220413856129818141385612981814138561297463013856129747581385612975675"
>>
>>  ## For authenticated session, you must have a username and password
>> (it’s> free).
>>  ## Use your username and passward instead of JSTrader and Ou812
>>
>> id <- ConnectTrueFX(’EUR/USD,GBP/USD’,
>> username=’veepsirtt’,password=’veeps203’)
> Error: unexpected input in "id <- ConnectTrueFX(’"
>>  QueryTrueFX(id)
>Symbol Bid.Price Ask.PriceHigh Low   TimeStamp
> 1 EUR/USD   1.35769   1.35777 1.35804 1.35634 2013-11-28 04:29:52
> 2 GBP/USD   1.63031   1.63048 1.63074 1.62763 2013-11-28 04:29:52
>> id
> 
> attr(,"class")
> [1] "TFXsession"  "environment"
>> QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
>> password=’veeps203’,format=’csv’), arse=FALSE)
> Error: unexpected input in "QueryTrueFX(ConnectTrueFX(username=’"
>> QueryTrueFX(ConnectTrueFX(username=’veepsirtt’,
>> password=’veeps203’,format=’html’), arse=FALSE)
> Error: unexpected input in "QueryTrueFX(ConnectTrueFX(username=’"
>>
>
>
>
>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681300.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions 
> should go.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2013-11-27 Thread veepsirtt
> id < ConnectTrueFX("EUR/USD",username="veepsirtt",password="veeps203")
Error in id < ConnectTrueFX("EUR/USD", username = "veepsirtt", password =
"veeps203") : 
  comparison (3) is possible only for atomic and list types




--
View this message in context: 
http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681302.html
Sent from the Rmetrics mailing list archive at Nabble.com.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2013-11-27 Thread G See
you entered a less than sign instead of an assignment operator.

instead of
  id < ConnectTrueFX(...
it should be
  id <- ConnectTrueFX(...


On Wed, Nov 27, 2013 at 11:10 PM, veepsirtt  wrote:
>> id < ConnectTrueFX("EUR/USD",username="veepsirtt",password="veeps203")
> Error in id < ConnectTrueFX("EUR/USD", username = "veepsirtt", password =
> "veeps203") :
>   comparison (3) is possible only for atomic and list types
>
>
>
>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681302.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> ___
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions 
> should go.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

2013-11-27 Thread veepsirtt
 QueryTrueFX(id)
   Symbol Bid.Price Ask.PriceHigh Low   TimeStamp
1 EUR/USD1.3583   1.35839 1.35883 1.35634 2013-11-28 05:48:43

I got the results
Thank you very much
veepsirtt


On Thu, Nov 28, 2013 at 10:46 AM, gsee [via R] <
ml-node+s789695n4681303...@n4.nabble.com> wrote:

> you entered a less than sign instead of an assignment operator.
>
> instead of
>   id < ConnectTrueFX(...
> it should be
>   id <- ConnectTrueFX(...
>
>
> On Wed, Nov 27, 2013 at 11:10 PM, veepsirtt <[hidden 
> email]>
> wrote:
>
> >> id < ConnectTrueFX("EUR/USD",username="veepsirtt",password="veeps203")
> > Error in id < ConnectTrueFX("EUR/USD", username = "veepsirtt", password
> =
> > "veeps203") :
> >   comparison (3) is possible only for atomic and list types
> >
> >
> >
> >
> > --
> > View this message in context:
> http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681302.html
>
> > Sent from the Rmetrics mailing list archive at Nabble.com.
> >
> > ___
> > [hidden email] 
> > mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> should go.
>
> ___
> [hidden email] mailing 
> list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681303.html
>  To unsubscribe from Introducing TFX: An R Interface to the TrueFX Web
> API, click 
> here
> .
> NAML
>




--
View this message in context: 
http://r.789695.n4.nabble.com/Introducing-TFX-An-R-Interface-to-the-TrueFX-Web-API-tp4651827p4681304.html
Sent from the Rmetrics mailing list archive at Nabble.com.
[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.