femtotrader / TALib.jl

A Julia wrapper for TA-Lib
Other
50 stars 11 forks source link

ToDo #3

Closed femtotrader closed 8 years ago

femtotrader commented 8 years ago

plot OHLCV data (ford_2012.csv) and MA of close price accept directly DataFrame as input

femtotrader commented 8 years ago

capture d ecran 2016-05-09 a 15 23 23

Bug! MA should be lagging (it's predicting ;-) )

femtotrader commented 8 years ago

Fixed using https://github.com/femtotrader/TALib.jl/commit/5af418c753626e63b400981c22703b4feb3abcf7

ptr_outBegIdx = Ref{Cint}(0)
....
ret_code = ta_func(startIdx, endIdx, inReal, timeperiod, matype, ptr_outBegIdx, ptr_outNbElement, outReal)    
....
circshift(outReal, ptr_outBegIdx[])