Skip to content
/ rFdk Public
forked from lotgon/FdkRLib

Maps SoftFX's FDK to R package for quick access

Notifications You must be signed in to change notification settings

ihalankou/rFdk

 
 

Repository files navigation

FdkRLib

Added the SoftFX R wrapper package over FDK (Financial Development Kit)

Prerequisites

If you see this error: "You are probably missing the Visual C++ Redistributable for Visual Studio 2013", then please download it from here: https://www.microsoft.com/en-us/download/details.aspx?id=40784

How to install it?

Look inside install.r file (you can copy/paste the content into your R environment).

For later sessions of R environment will require just to reload the library with this command: library(FdkRLib)

How to test it?

You have sample code inside examples/sample_bars.r with various snippets of code.

A simple code sample code is the following:


ttConnect("", "", "")

#Get configuration information of your account
ttConf.Symbol()
ttConf.Currency()

#Quotes in the last 5 minutes
now <-as.POSIXct(Sys.time(), tz = "GMT")
# 300 seconds from present
prevNow <-as.POSIXct(now-(5*60), tz = "GMT")
head(ttFeed.TickBestHistory("EURUSD", startTime = prevNow, endTime=now))

# Get quotes level 2
# 1000 seconds from present
now <-as.POSIXct(Sys.time(), tz = "GMT")
prevNow <-as.POSIXct(now-1000, tz = "GMT")
qt2= ttFeed.TickLevel2History('EURUSD', prevNow, now)
head(qt2)

Follow this link with expanded example and output:

Configuration: http://rpubs.com/ciplogic/105460

History: http://rpubs.com/ciplogic/105462

Trades: http://rpubs.com/ciplogic/105463

About

Maps SoftFX's FDK to R package for quick access

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 75.4%
  • R 24.5%
  • Batchfile 0.1%