Skip to content

mw66/talibd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D wrapper for https://ta-lib.org/

pre-req:

download, and build

https://ta-lib.org/hdr_dw.html

http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz

$ git submodule update --init --recursive

$ cd lib && make

DPP

NOTE: source/talib.d has been manually modified due to: atilaneves/dpp#272

Design:

  • the output and the input data are of the same length, and are end-aligned!
  • the output is front-padded with 0 instead of NaN, i.e the lookback area

Demo:

https://github.com/mw66/talibd/blob/master/source/app.d

just type make to run it:

$ make
...


Run some tests
prices.length=755
test TA_MA
prices[$-1]=334.06 sma10[9]=236.502 sma10[$-1]=343.91 sma20[$-1]=342.521
test TA_RSI
prices[$-1]=334.06 rsi14[14]=80.4548 rsi14[$-1]=45.0602
test TA_MACD
prices[$-1]=334.06 macd[$-1]=1.86243 macdSignal[$-1]=4.30537 macdHist[$-1]=-2.44294