GithubHelp home page GithubHelp logo

oransel / node-talib Goto Github PK

View Code? Open in Web Editor NEW
891.0 891.0 149.0 6.7 MB

A technical analysis library for node.js

License: GNU Lesser General Public License v3.0

Python 0.02% JavaScript 0.05% C 96.95% Makefile 2.06% C++ 0.72% Java 0.17% CMake 0.02%

node-talib's People

Contributors

aerius42 avatar aomega avatar bafs avatar diabl0570 avatar iamtheiam avatar ifedaka avatar krystophv avatar lnovy avatar lollones avatar mkmarek avatar mscdex avatar oransel avatar pennyfx avatar sir4ju1 avatar superhero avatar vmirage avatar z-hao-wang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-talib's Issues

Some Pattern Recognition indicators doesn't works

Hello

For some indicators the library doesn't return expected results, for CDLHAMMER or CDLHANGINGMAN the library detect no pattern. I tested those indicators on Java, same market data and works as expected. Any idea? Thanks.

Turn a regular talib.execute function into one which returns a thunk

In order to control program flow easily, I made a sample function to turn the talib.execute function returning a thunk. Could you add it into your project?

var talibExecute = thunkify((parameter, callback) => {
    talib.execute(parameter, function (result) {
        callback(null, result.result);
    })
});

TALIB not found

NodeJS version 6.10.3

Using the include below fails
var talib = require('../build/Release/talib');
Error: Cannot find module './build/Release/talib'

Updating to the normal require resolves this issue.
var talib = require('talib');

the callback don't follow node.js API standard signature (error parameter)

Hello,

Here is current node-talib execute function signature:

talib.execute({ params }, (result) => console.log(result));

Is it intentional to not follow node.js standard callback signature? It should be like this:

talib.execute({ params }, (error, result) => console.log(result));

Seems the error will be thrown in the result value.

Thank you for your feedback!

ADD/DIV indicators doesn't works proper

Hi

I have noticed some indicators form Math Operators group doesn't work proper, for example ADD or DIV. If you run a simple test like bellow you will get only NaN

talib.execute({
    name: 'ADD',
    inReal0: [1,1,1,1],
    inReal1: [2,2,2,2],
    startIdx:0,
    endIdx: 3
}, function(result) {
    console.log(result); //[NaN, NaN, NaN, NaN]
});

Any idea ? Thanks!

Update Readme for Windows

Please added/update install notes for windows users.

Prerequisites for windows

You will need to install the following build tools for .NET 4.6. If you have already done this before on your computer (or you have Visual Studio 2015 installed), please skip to step 2.

  1. If you're running an Windows version older than Windows 10, download and run the .NET Framework 4.6.2 link installer. On Windows 10 and higher, the .NET Framework 4.6 is already included.
  2. Install Windows Build Tools.
  3. Download and run the .NET Framework 4.6 Targeting Pack installer. When the download page prompts you which file to download, select NDP46-TargetingPack-KB3045566.exe.

Example Causes Seg Fault

I've been trying to get this library to work consistently and have been running into an error periodically. If I run the example/adx.js several times about 10% of the time I get a Seg Fault that crashes node. (can't try/catch it)
I'm running node v0.10.4 and the latest ta-lib from git.
I don't really know anything about nodejs native modules, so I was wondering if you could help me solve this? (At least so it doesn't crash node when it happens...)

It works sometimes (usually many times in a row) and then it gives me this (usually many times in a row):
$ gdb --args node examples/adx
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/node...done.
(gdb) run
Starting program: /usr/bin/node examples/adx
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7fea700 (LWP 11143)]

TALib Version: 0.2.5
[New Thread 0x7ffff69ba700 (LWP 11144)]
[New Thread 0x7ffff61b9700 (LWP 11145)]
[New Thread 0x7ffff59b8700 (LWP 11146)]
[New Thread 0x7ffff51b7700 (LWP 11147)]

Program received signal SIGSEGV, Segmentation fault.
0x00000000006f1ae9 in uv_ref (handle=0x7fffffffa068) at ../deps/uv/src/uv-common.c:420
420 uv__handle_ref(handle);
(gdb) bt
#0 0x00000000006f1ae9 in uv_ref (handle=0x7fffffffa068) at ../deps/uv/src/uv-common.c:420
#1 0x00007ffff69eb973 in Talib::Execute (args=...) at ../src/talib.cpp:692
#2 0x000000000072b531 in v8::internal::Builtin_HandleApiCall(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>, v8::internal::Isolate*) ()
#3 0x00002ef44150618e in ?? ()
#4 0x00002ef4415060e1 in ?? ()
#5 0x00007fffffffa5c0 in ?? ()
#6 0x00007fffffffa640 in ?? ()
#7 0x00002ef4415885fb in ?? ()
#8 0x00001da216182551 in ?? ()
#9 0x0000210cb4fc4411 in ?? ()
#10 0x0000210cb4fc4321 in ?? ()
#11 0x0000210cb4f85129 in ?? ()
#12 0x00007fffffffa790 in ?? ()
#13 0x00002ef441588341 in ?? ()
#14 0x0000000000000001 in ?? ()
#15 0x0000210cb4f7ebf9 in ?? ()
#16 0x00007fffffffa640 in ?? ()
#17 0x0000210cb4fb3111 in ?? ()
#18 0x0000210cb4fa9ae1 in ?? ()
#19 0x0000210cb4f7ebf9 in ?? ()
#20 0x00007fffffffa680 in ?? ()
#21 0x00002ef441587deb in ?? ()
#22 0x0000210cb4fab721 in ?? ()
#23 0x00001da216104101 in ?? ()
#24 0x00001da216104121 in ?? ()
#25 0x0000210cb4fa9ae1 in ?? ()
#26 0x0000210cb4fab4d1 in ?? ()
#27 0x0000210cb4fa9b49 in ?? ()
#28 0x00007fffffffa6c8 in ?? ()
#29 0x00002ef4415284fe in ?? ()
#30 0x00001da216104101 in ?? ()
#31 0x00001da216157349 in ?? ()
#32 0x0000000100000000 in ?? ()
#33 0x0000000100000000 in ?? ()
#34 0x00002ef441528341 in ?? ()
#35 0x0000000600000000 in ?? ()
#36 0x00001da216141491 in ?? ()
#37 0x00007fffffffa708 in ?? ()
#38 0x00002ef441585b2a in ?? ()
#39 0x0000210cb4fab5e1 in ?? ()
#40 0x00001da216104101 in ?? ()
#41 0x0000210cb4fab4d1 in ?? ()
#42 0x0000210cb4fab5e1 in ?? ()
#43 0x0000210cb4fab551 in ?? ()
#44 0x0000210cb4fab519 in ?? ()
#45 0x00007fffffffa738 in ?? ()
#46 0x00002ef44150a96e in ?? ()
#47 0x0000210cb4fab5c9 in ?? ()
#48 0x0000000100000000 in ?? ()
#49 0x0000210cb4fab551 in ?? ()
#50 0x0000000800000000 in ?? ()
#51 0x00007fffffffa778 in ?? ()
#52 0x00002ef4415245e1 in ?? ()
#53 0x00001da216104101 in ?? ()
#54 0x0000210cb4fab5c9 in ?? ()
#55 0x0000210cb4fab551 in ?? ()
#56 0x00002ef441524521 in ?? ()
#57 0x0000000600000000 in ?? ()
#58 0x0000000000000000 in ?? ()

Installation error on Ubuntu 16.04 LTS

Hi

I am facing the below error messages when installing talib on Ubuntu 16.04 LTS. I have done the step to ensure g++, make and build essentials are available. I have manually created the directory that the script complains about '/home/adeel/Downloads/node_modules/talib/build'. However, after the script exits again in error, I find this directory has been deleted in the process. Please help me out.

Thanks

Regards,

Adeel

temp/csr/ta_ULTOSC.o ../../../../../temp/csr/ta_VAR.o ../../../../../temp/csr/ta_WCLPRICE.o ../../../../../temp/csr/ta_WILLR.o ../../../../../temp/csr/ta_WMA.o
make[1]: Leaving directory '/home/adeel/Downloads/node_modules/talib/src/lib/make/csr/linux/g++/ta_libc'

gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/adeel/Downloads/node_modules/talib/build'
gyp ERR! System Linux 4.4.0-112-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure"
gyp ERR! cwd /home/adeel/Downloads/node_modules/talib
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/adeel/Downloads/package.json'
npm WARN Downloads No description
npm WARN Downloads No repository field.
npm WARN Downloads No README data
npm WARN Downloads No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node ./src/lib/build.js && node-gyp configure && node-gyp build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/adeel/.npm/_logs/2018-02-18T12_05_20_473Z-debug.log

Indicator Result issues

Hi Mustafa,

first, thank you very much for contributing the code for free!

After implementing node-talib to my code and comparing the results to freestockcharts, I've investigated that MinusDI and PlusDI seems to be mixed up. RSI as well - adding "100 - RSI" gives a result similar to what i can see at the other app. ADX, Stoch, MACD, they are all fine.
I'm not sure if I'm doing something wrong, as far what i've understood, the value [0] in the array is the one that needs to be updated on a new tick and the hole array needs to be unshifted.

Thank you for your feedback!

How to use different input types

You have an example for ADX, which uses inPriceOHLC, but how does inReal work? I tried passing "real":[ ], but that results in this error.

{ error: 'First argument must contain \'%s\' field' }

Failed installation on Windows 10

Hey there,

I'm trying to install TALib on a windows 10 machine. Therefore I installed windows-build-tools.

npm install -g windows-build-tools

If I then continue and run npm install talib from my project folder it shows the following error:


> [email protected] install C:\Users\xxx\Documents\xxx\node_modules\talib
> node ./src/lib/build.js && node-gyp configure && node-gyp build

building talib functions...
fs.js:928
  return binding.readdir(pathModule.toNamespacedPath(path), options.encoding);
                 ^

Error: ENOENT: no such file or directory, scandir 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework'
    at Object.fs.readdirSync (fs.js:928:18)
    at Object.<anonymous> (C:\Users\xxx\Documents\xxx\node_modules\talib\src\lib\build.js:22:30)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
    at Function.Module.runMain (module.js:703:10)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:660:3
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\xxx\Documents\xxx\package.json'
npm WARN Bot No description
npm WARN Bot No repository field.
npm WARN Bot No README data
npm WARN Bot No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./src/lib/build.js && node-gyp configure && node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: xxx

How can I solve this issue?

callback parameter order error in Centos7

const talib = require('talib')
const opt = {"name":"LINEARREG_SLOPE","startIdx":0,"endIdx":200,"inReal":[6.66,6.43,6.3,6.48,6.48,6.62,6.87,6.88,6.85,6.77,6.89,6.94,6.95,7.19,7.23,7.08,7.07,6.9,6.94,6.78,6.8,6.77,6.92,6.94,6.8,6.83,7.05,7.26,7.23,7.23,7.36,6.96,7.08,7.15,7.2,7.16,7.09,6.94,6.99,6.87,6.91,6.91,7.14,7.14,6.87,6.92,6.91,6.83,6.79,6.97,7.06,7.01,7.03,7,6.94,6.96,7,6.97,6.94,6.83,6.83,6.65,6.66,6.78,6.67,6.68,6.65,6.72,6.73,6.76,6.78,6.78,6.67,6.67,6.69,6.73,6.73,6.68,6.7,6.79,6.72,6.65,6.68,6.63,6.67,6.63,6.69,6.88,6.78,6.56,6.49,6.45,6.49,6.56,6.53,6.46,6.52,6.47,6.45,6.56,6.55,6.63,6.62,6.67,6.69,6.7,6.71,7.14,7.08,6.95,6.94,6.92,6.98,6.42,6.51,6.53,6.46,6.53,6.64,6.61,6.63,6.73,6.7,6.82,6.86,6.91,6.9,6.91,6.93,6.93,6.77,7.02,7.01,7.18,7.13,7.62,7.4,7.42,7.24,7.32,7.3,7.24,7.16,7.21,7.21,7.19,7.04,6.97,7.02,7,6.95,7.05,6.94,6.95,7.01,7.07,7.02,7.03,7.05,7.12,6.83,6.66,6.72,7.39,7.29,8.02,8.59,9.45,8.51,8.51,8.28,8.34,8.11,8.18,7.64,7.64,7.34,7.5,7.78,8.1,8.35,8.47,8.15,8.6,8.85,8.35,8.55,7.77,7.97,8.02,7.94,8.49,8.68,8.57,8.82,8.37,7.89,8.68,8.8,8.82,9.22],"optInTimePeriod":21}
talib.execute(opt, (...args) => console.log(args))

In mac os, the args is:

[ { begIndex: 20, nbElement: 181, result: { outReal: [Object] } } ]

In centos7, the args is:
[null, { begIndex: 20, nbElement: 181, result: { outReal: [Object] } } ]

Error installing on Ubuntu

Hi!
A tried to install and build on Ubuntu. I got the same error.
I followed the recommendation described here too: #10
This is the error on $npm install talib:
npm WARN package.json [email protected] No license field.

[email protected] install /home/lucas/Documents/node-talib
node ./src/lib/build.js && node-gyp configure && node-gyp build

building talib functions...
make: Entering directory /home/lucas/Documents/node-talib/build' CXX(target) Release/obj.target/talib/src/talib.o ../src/talib.cpp:42:11: error: ‘v8::MaybeLocal’ has not been declared using v8::MaybeLocal; ^ ../src/talib.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Explain(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/talib.cpp:367:62: error: no matching function for call to ‘Nan::ReturnValue<v8::Value>::Set(v8::Handle<v8::Value>)’ info.GetReturnValue().Set(TA_EXPLAIN_FUNCTION(*func_name)); ^ ../src/talib.cpp:367:62: note: candidates are: In file included from ../node_modules/nan/nan_callbacks.h:83:0, from ../node_modules/nan/nan.h:150, from ../src/talib.cpp:29: ../node_modules/nan/nan_callbacks_12_inl.h:27:37: note: template<class S> void Nan::ReturnValue<T>::Set(const v8::Local<S>&) [with S = S; T = v8::Value] template <typename S> inline void Set(const v8::Local<S> &handle) { ^ ../node_modules/nan/nan_callbacks_12_inl.h:27:37: note: template argument deduction/substitution failed: ../src/talib.cpp:367:62: note: ‘v8::Handle<v8::Value>’ is not derived from ‘const v8::Local<T>’ info.GetReturnValue().Set(TA_EXPLAIN_FUNCTION(*func_name)); ^ In file included from ../node_modules/nan/nan_callbacks.h:83:0, from ../node_modules/nan/nan.h:150, from ../src/talib.cpp:29: ../node_modules/nan/nan_callbacks_12_inl.h:32:37: note: template<class S> void Nan::ReturnValue<T>::Set(const Nan::Global<S>&) [with S = S; T = v8::Value] template <typename S> inline void Set(const Global<S> &handle) { ^ ../node_modules/nan/nan_callbacks_12_inl.h:32:37: note: template argument deduction/substitution failed: ../src/talib.cpp:367:62: note: ‘v8::Handle<v8::Value>’ is not derived from ‘const Nan::Global<T>’ info.GetReturnValue().Set(TA_EXPLAIN_FUNCTION(*func_name)); ^ In file included from ../node_modules/nan/nan_callbacks.h:83:0, from ../node_modules/nan/nan.h:150, from ../src/talib.cpp:29: ../node_modules/nan/nan_callbacks_12_inl.h:46:15: note: void Nan::ReturnValue<T>::Set(bool) [with T = v8::Value] inline void Set(bool value) { ^ ../node_modules/nan/nan_callbacks_12_inl.h:46:15: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>’ to ‘bool’ ../node_modules/nan/nan_callbacks_12_inl.h:51:15: note: void Nan::ReturnValue<T>::Set(double) [with T = v8::Value] inline void Set(double i) { ^ ../node_modules/nan/nan_callbacks_12_inl.h:51:15: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>’ to ‘double’ ../node_modules/nan/nan_callbacks_12_inl.h:56:15: note: void Nan::ReturnValue<T>::Set(int32_t) [with T = v8::Value; int32_t = int] inline void Set(int32_t i) { ^ ../node_modules/nan/nan_callbacks_12_inl.h:56:15: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>’ to ‘int32_t {aka int}’ ../node_modules/nan/nan_callbacks_12_inl.h:61:15: note: void Nan::ReturnValue<T>::Set(uint32_t) [with T = v8::Value; uint32_t = unsigned int] inline void Set(uint32_t i) { ^ ../node_modules/nan/nan_callbacks_12_inl.h:61:15: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>’ to ‘uint32_t {aka unsigned int}’ ../node_modules/nan/nan_callbacks_12_inl.h:89:15: note: template<class S> void Nan::ReturnValue<T>::Set(S*) [with S = S; T = v8::Value] inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); } ^ ../node_modules/nan/nan_callbacks_12_inl.h:89:15: note: template argument deduction/substitution failed: ../src/talib.cpp:367:62: note: mismatched types ‘S*’ and ‘v8::Handle<v8::Value>’ info.GetReturnValue().Set(TA_EXPLAIN_FUNCTION(*func_name)); ^ ../src/talib.cpp: In function ‘void Init(v8::Handle<v8::Object>, v8::Handle<v8::Object>)’: ../src/talib.cpp:1065:78: error: call of overloaded ‘SetAccessor(v8::Handle<v8::Object>&, v8::Local<v8::String>, Nan::NAN_GETTER_RETURN_TYPE (&)(v8::Local<v8::String>, Nan::NAN_GETTER_ARGS_TYPE))’ is ambiguous SetAccessor(exports, New<String>("functions").ToLocalChecked(), Functions); ^ ../src/talib.cpp:1065:78: note: candidates are: In file included from ../src/talib.cpp:29:0: ../node_modules/nan/nan.h:1922:13: note: bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute) inline bool SetAccessor( ^ ../node_modules/nan/nan.h:1878:13: note: void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig) inline void SetAccessor( ^ ../src/talib.cpp:1066:90: error: call of overloaded ‘SetAccessor(v8::Handle<v8::Object>&, v8::Local<v8::String>, Nan::NAN_GETTER_RETURN_TYPE (&)(v8::Local<v8::String>, Nan::NAN_GETTER_ARGS_TYPE))’ is ambiguous SetAccessor(exports, New<String>("functionUnstIds").ToLocalChecked(), FunctionUnstIds); ^ ../src/talib.cpp:1066:90: note: candidates are: In file included from ../src/talib.cpp:29:0: ../node_modules/nan/nan.h:1922:13: note: bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute) inline bool SetAccessor( ^ ../node_modules/nan/nan.h:1878:13: note: void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig) inline void SetAccessor( ^ make: *** [Release/obj.target/talib/src/talib.o] Error 1 make: Leaving directory/home/lucas/Documents/node-talib/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.19.0-25-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /home/lucas/Documents/node-talib
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok

npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node ./src/lib/build.js && node-gyp configure && node-gyp build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./src/lib/build.js && node-gyp configure && node-gyp build'.
npm ERR! This is most likely a problem with the talib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./src/lib/build.js && node-gyp configure && node-gyp build
npm ERR! You can get their info via:
npm ERR! npm owner ls talib
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/lucas/Documents/node-talib/npm-debug.log

Could you help me ?

Thanks
Lucas

build error OS X 10.8

I'm getting a build error when I attempt to install this on my mac.

building talib functions...
CXX(target) Release/obj.target/talib/src/talib.o
../src/talib.cpp:694:9: error: no matching function for call to 'uv_queue_work'
uv_queue_work(uv_default_loop(), req, ExecuteWork, ExecuteWorkDone);
^~~~~~~~~~~~~
/Users/damiensbell/.node-gyp/0.8.16/deps/uv/include/uv.h:1322:15: note: candidate
function not viable: no known conversion from 'void (uv_work_t , int)' to
'uv_after_work_cb' (aka 'void (
)(uv_work_t )') for 4th argument
UV_EXTERN int uv_queue_work(uv_loop_t
loop, uv_work_t* req,
^

It's followed by lots of others errors, but it looks like this is probably the cause.
Any ideas what this might be?

Installation problem in OS.X 10.9

Hi

I am getting the following error while installing talib:

building talib functions...
child_process: customFds option is deprecated, use stdio instead.
child_process: customFds option is deprecated, use stdio instead.
CXX(target) Release/obj.target/talib/src/talib.o
../src/talib.cpp:42:15: error: expected class name
class Talib : ObjectWrap {
^
../src/talib.cpp:92:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle New(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/skandalamsrinivasa/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/talib.cpp:331:81: error: no type named 'AccessorInfo' in namespace 'v8'
static Handle GetFunctions(v8::Localv8::String property, const v8::AccessorInfo& info) {
~~~~^
../src/talib.cpp:378:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle Explain(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/skandalamsrinivasa/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/talib.cpp:394:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle Execute(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/talib/src/talib.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /Users/skandalamsrinivasa/Documents/lab/node_modules/talib
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "talib"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] preinstall: cd ./src/lib && node build.js && cd ../../ && node-gyp configure && node-gyp build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script 'cd ./src/lib && node build.js && cd ../../ && node-gyp configure && node-gyp build'.
npm ERR! This is most likely a problem with the talib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd ./src/lib && node build.js && cd ../../ && node-gyp configure && node-gyp build
npm ERR! You can get their info via:
npm ERR! npm owner ls talib
npm ERR! There is likely additional logging output above.

[email protected] preuninstall /Users/skandalamsrinivasa/Documents/lab/node_modules/talib
rm -rf build/* && cd ./src/lib && node clean.js && cd ../../

cleaning talib...

npm ERR! Please include the following file with any support request:
npm ERR! /Users/skandalamsrinivasa/Documents/lab/npm-debug.log

I have tried uninstalling and installing npm but ended in vain. I have command line tools, xcode completely installed. Please point me in the right direction. Thank you!

Srikanth K S.

Passing Datasource

Is possible pass a datasource with a candle stick structure?. That is the structure will be ike that:

dasource: [{open: __, hight: __, low: __, close: __, volume: __},  ..., {...}]

require('talib') parse error

After installing with
npm install talib
and requiring (with
talib: require('talib')
in a browserify project, i'm getting:

Error: Parsing file /Users/leo/devel/pscharts/node_modules/talib/build/Release/talib.node: Unexpected character '�' (1:0)
at Deps.parseDeps (/usr/local/lib/node_modules/browserify/node_modules/module-deps/index.js:437:28)
at fromSource (/usr/local/lib/node_modules/browserify/node_modules/module-deps/index.js:375:48)
at /usr/local/lib/node_modules/browserify/node_modules/module-deps/index.js:370:17
at ConcatStream. (/usr/local/lib/node_modules/browserify/node_modules/concat-stream/index.js:36:43)
at emitNone (events.js:72:20)
at ConcatStream.emit (events.js:166:7)
at finishMaybe (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:460:14)
at endWritable (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:469:3)
at ConcatStream.Writable.end (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:436:5)
at DuplexWrapper.onend (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js:537:10)

Runtime Error In Alpine Linux with Node 0.12.14

I'm compiling my Node app into an Alpine Linux Node Docker image (0.12.14). The Docker image builds successfully with the following Docker configuration:

FROM mhart/alpine-node:0.12.14

# Copy the application over here...

RUN cd /opt/myapp \
    && apk add --update --no-cache \
        python \
        make \
        g++ \
    && npm install --production \
    && npm run postinstall \
    && apk del \
        python \
        make \
        g++

# Unrelated configuration below...

The build output of linux libs and talib 0.6.0 is as follows:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
(1/25) Installing binutils-libs (2.25.1-r0)
(2/25) Installing binutils (2.25.1-r0)
(3/25) Installing gmp (6.1.0-r0)
(4/25) Installing isl (0.14.1-r0)
(5/25) Installing libgomp (5.3.0-r0)
(6/25) Installing libatomic (5.3.0-r0)
(7/25) Installing pkgconf (0.9.12-r0)
(8/25) Installing pkgconfig (0.25-r1)
(9/25) Installing mpfr3 (3.1.2-r0)
(10/25) Installing mpc1 (1.0.3-r0)
(11/25) Installing gcc (5.3.0-r0)
(12/25) Installing musl-dev (1.1.12-r5)
(13/25) Installing libc-dev (0.7-r0)
(14/25) Installing g++ (5.3.0-r0)
(15/25) Installing make (4.1-r0)
(16/25) Installing libbz2 (1.0.6-r4)
(17/25) Installing expat (2.1.1-r0)
(18/25) Installing libffi (3.2.1-r2)
(19/25) Installing gdbm (1.11-r1)
(20/25) Installing ncurses-terminfo-base (6.0-r6)
(21/25) Installing ncurses-terminfo (6.0-r6)
(22/25) Installing ncurses-libs (6.0-r6)
(23/25) Installing readline (6.3.008-r4)
(24/25) Installing sqlite-libs (3.9.2-r0)
(25/25) Installing python (2.7.11-r3)
Executing busybox-1.24.1-r7.trigger

> [email protected] install /opt/myapp/node_modules/talib
> node ./src/lib/build.js && node-gyp configure && node-gyp build

building talib functions...
make: Entering directory '/opt/myapp/node_modules/talib/build'
  CXX(target) Release/obj.target/talib/src/talib.o
  SOLINK_MODULE(target) Release/obj.target/talib.node
  COPY Release/talib.node
make: Leaving directory '/opt/myapp/node_modules/talib/build'

When I run the image inside a container, I get the following error:

Error: Error relocating /opt/myapp/node_modules/talib/build/Release/talib.node: TA_AVGDEV_Lookback: symbol not found
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/opt/myapp/src/calc/calculator.js:5:13)

The same app built inside of the docker node image runs fine. Any ideas on why this could be occurring?

run example cdlhammer.js produces undefined

Hello there,
I have just installed the TA lib from npm with:
TALib Version: 1.0.2
I then run the cdlhammer.js on the input example json and I get undefined.
However if I do:
console.log(err)
I can see a time series which looks like the result e.g. a list with 0s and some 100s .
I am wondering if somehow the call back has swapped results with error?

Could not install talib in openshift env

Could not install node-talib in the openshift environment.

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)

It fails with this error.

Node version : 4.1.1

remote: ../node_modules/nan/nan.h:41:3: error: #error This version of node/NAN/v8 requires a C++11 compiler

Below is the complete error log

remote: building talib functions...
remote: gyp info it worked if it ends with ok
remote: gyp info using [email protected]
remote: gyp info using [email protected] | linux | x64
remote: gyp http GET https://nodejs.org/download/release/v4.1.1/node-v4.1.1-headers.tar.gz
remote: gyp http 200 https://nodejs.org/download/release/v4.1.1/node-v4.1.1-headers.tar.gz
remote: gyp http GET https://nodejs.org/download/release/v4.1.1/SHASUMS256.txt
remote: gyp http 200 https://nodejs.org/download/release/v4.1.1/SHASUMS256.txt
remote: gyp info spawn python2
remote: gyp info spawn args [ '/var/lib/openshift/567474682d5271fb7800002c/app-root/data/node-v4.1.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
remote: gyp info spawn args   'binding.gyp',
remote: gyp info spawn args   '-f',
remote: gyp info spawn args   'make',
remote: gyp info spawn args   '-I',
remote: gyp info spawn args   '/var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/talib/build/config.gypi',
remote: gyp info spawn args   '-I',
remote: gyp info spawn args   '/var/lib/openshift/567474682d5271fb7800002c/app-root/data/node-v4.1.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
remote: gyp info spawn args   '-I',
remote: gyp info spawn args   '/var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/common.gypi',
remote: gyp info spawn args   '-Dlibrary=shared_library',
remote: gyp info spawn args   '-Dvisibility=default',
remote: gyp info spawn args   '-Dnode_root_dir=/var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1',
remote: gyp info spawn args   '-Dnode_gyp_dir=/var/lib/openshift/567474682d5271fb7800002c/app-root/data/node-v4.1.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp',
remote: gyp info spawn args   '-Dnode_lib_file=node.lib',
remote: gyp info spawn args   '-Dmodule_root_dir=/var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/talib',
remote: gyp info spawn args   '--depth=.',
remote: gyp info spawn args   '--no-parallel',
remote: gyp info spawn args   '--generator-output',
remote: gyp info spawn args   'build',
remote: gyp info spawn args   '-Goutput_dir=.' ]
remote: gyp info ok 
remote: gyp info it worked if it ends with ok
remote: gyp info using [email protected]
remote: gyp info using [email protected] | linux | x64
remote: gyp info spawn make
remote: gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
remote: make: Entering directory `/var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/talib/build'
remote:   CXX(target) Release/obj.target/talib/src/talib.o
remote: In file included from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan.h:41:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
remote: In file included from /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/node.h:42,
remote:                  from ../src/talib.cpp:28:
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:336: error: expected unqualified-id before 'using'
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In constructor 'v8::MaybeLocal<T>::MaybeLocal()':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:353: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In member function 'bool v8::MaybeLocal<T>::IsEmpty() const':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:360: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In member function 'bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:364: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In member function 'bool v8::WeakCallbackInfo<T>::IsFirstPass() const':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:430: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: At global scope:
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:469: error: expected unqualified-id before 'using'
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In constructor 'v8::Global<T>::Global()':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:790: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In constructor 'v8::Global<T>::Global(v8::Global<T>&&)':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:815: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In member function 'v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:827: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: At global scope:
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:852: error: expected unqualified-id before 'using'
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:1089: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:1095: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In member function 'v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:3205: error: 'nullptr' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In member function 'v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:7151: error: 'nullptr' was not declared in this scope
remote: In file included from ../node_modules/nan/nan.h:194,
remote:                  from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan_maybe_43_inl.h: At global scope:
remote: ../node_modules/nan/nan_maybe_43_inl.h:13: error: expected unqualified-id before 'using'
remote: ../node_modules/nan/nan_maybe_43_inl.h:16: error: expected unqualified-id before 'using'
remote: ../node_modules/nan/nan_maybe_43_inl.h:19: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:24: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:31: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:36: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:41: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:46: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:51: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:60: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:65: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:70: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:77: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:84: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:92: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:99: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:109: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:115: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:119: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:126: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:131: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:136: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:140: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:146: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:151: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:157: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:163: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:169: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:175: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:181: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:187: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:195: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:202: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:206: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:210: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:214: error: expected initializer before '<' token
remote: ../node_modules/nan/nan_maybe_43_inl.h:218: error: expected initializer before '<' token
remote: In file included from ../node_modules/nan/nan.h:199,
remote:                  from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan_converters.h:14: error: ISO C++ forbids declaration of 'MaybeLocal' with no type
remote: ../node_modules/nan/nan_converters.h:14: error: expected ';' before '<' token
remote: ../node_modules/nan/nan_converters.h:16: error: ISO C++ forbids declaration of 'Maybe' with no type
remote: ../node_modules/nan/nan_converters.h:16: error: expected ';' before '<' token
remote: ../node_modules/nan/nan_converters.h:26: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:27: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:28: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:29: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:30: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:31: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:32: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:42: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:43: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:44: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:45: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_converters.h:46: error: 'return_t' does not name a type
remote: In file included from ../node_modules/nan/nan_converters.h:59,
remote:                  from ../node_modules/nan/nan.h:199,
remote:                  from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan_converters_43_inl.h:18: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Boolean>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:19: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Number>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:20: error: 'return_t' in class 'Nan::imp::ToFactory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:21: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Object>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:22: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Integer>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:23: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Uint32>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:24: error: 'return_t' in class 'Nan::imp::ToFactory<v8::Int32>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:34: error: 'return_t' in class 'Nan::imp::ToFactory<bool>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:35: error: 'return_t' in class 'Nan::imp::ToFactory<double>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:36: error: 'return_t' in class 'Nan::imp::ToFactory<long int>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:37: error: 'return_t' in class 'Nan::imp::ToFactory<unsigned int>' does not name a type
remote: ../node_modules/nan/nan_converters_43_inl.h:38: error: 'return_t' in class 'Nan::imp::ToFactory<int>' does not name a type
remote: In file included from ../node_modules/nan/nan.h:200,
remote:                  from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan_new.h: In function 'v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Integer]':
remote: ../node_modules/nan/nan_new.h:21: error: no matching function for call to 'To(v8::Local<v8::Integer>&)'
remote: ../node_modules/nan/nan_new.h: In function 'v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Int32]':
remote: ../node_modules/nan/nan_new.h:28: error: no matching function for call to 'To(v8::Local<v8::Integer>&)'
remote: ../node_modules/nan/nan_new.h: In function 'v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Uint32]':
remote: ../node_modules/nan/nan_new.h:35: error: no matching function for call to 'To(v8::Local<v8::Integer>&)'
remote: ../node_modules/nan/nan_new.h: At global scope:
remote: ../node_modules/nan/nan_new.h:43: error: ISO C++ forbids declaration of 'MaybeLocal' with no type
remote: ../node_modules/nan/nan_new.h:43: error: expected ';' before '<' token
remote: ../node_modules/nan/nan_new.h:75: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:141: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:147: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:148: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:160: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:161: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:162: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:163: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:165: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:166: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:182: error: 'return_t' does not name a type
remote: ../node_modules/nan/nan_new.h:183: error: 'return_t' does not name a type
remote: In file included from ../node_modules/nan/nan_new.h:189,
remote:                  from ../node_modules/nan/nan.h:200,
remote:                  from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan_implementation_12_inl.h:56: error: 'return_t' in class 'Nan::imp::Factory<v8::Date>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h: In static member function 'static v8::Local<v8::Function> Nan::imp::Factory<v8::Function>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)':
remote: ../node_modules/nan/nan_implementation_12_inl.h:90: error: 'NewInstance' was not declared in this scope
remote: ../node_modules/nan/nan_implementation_12_inl.h: In static member function 'static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>, v8::Local<v8::Signature>)':
remote: ../node_modules/nan/nan_implementation_12_inl.h:118: error: 'NewInstance' was not declared in this scope
remote: ../node_modules/nan/nan_implementation_12_inl.h: At global scope:
remote: ../node_modules/nan/nan_implementation_12_inl.h:197: error: 'return_t' in class 'Nan::imp::Factory<v8::RegExp>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:216: error: 'return_t' in class 'Nan::imp::Factory<v8::Script>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:222: error: 'return_t' in class 'Nan::imp::Factory<v8::Script>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:254: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:262: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:268: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:275: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:281: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:286: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:347: error: 'return_t' in class 'Nan::imp::Factory<v8::UnboundScript>' does not name a type
remote: ../node_modules/nan/nan_implementation_12_inl.h:354: error: 'return_t' in class 'Nan::imp::Factory<v8::UnboundScript>' does not name a type
remote: In file included from ../node_modules/nan/nan.h:200,
remote:                  from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan_new.h:293: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_new.h:299: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_new.h:305: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_new.h:311: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_new.h:317: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_new.h:323: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_new.h:329: error: 'return_t' in class 'Nan::imp::Factory<v8::String>' does not name a type
remote: ../node_modules/nan/nan_new.h:335: error: 'return_t' in class 'Nan::imp::Factory<v8::RegExp>' does not name a type
remote: In file included from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan.h: In function 'v8::Local<v8::Value> Nan::Error(const char*)':
remote: ../node_modules/nan/nan.h:651: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'void Nan::ThrowError(const char*)':
remote: ../node_modules/nan/nan.h:651: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'v8::Local<v8::Value> Nan::RangeError(const char*)':
remote: ../node_modules/nan/nan.h:652: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'void Nan::ThrowRangeError(const char*)':
remote: ../node_modules/nan/nan.h:652: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'v8::Local<v8::Value> Nan::ReferenceError(const char*)':
remote: ../node_modules/nan/nan.h:653: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'void Nan::ThrowReferenceError(const char*)':
remote: ../node_modules/nan/nan.h:653: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'v8::Local<v8::Value> Nan::SyntaxError(const char*)':
remote: ../node_modules/nan/nan.h:654: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'void Nan::ThrowSyntaxError(const char*)':
remote: ../node_modules/nan/nan.h:654: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'v8::Local<v8::Value> Nan::TypeError(const char*)':
remote: ../node_modules/nan/nan.h:655: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'void Nan::ThrowTypeError(const char*)':
remote: ../node_modules/nan/nan.h:655: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: At global scope:
remote: ../node_modules/nan/nan.h:663: error: expected initializer before '<' token
remote: ../node_modules/nan/nan.h:685: error: expected initializer before '<' token
remote: ../node_modules/nan/nan.h:701: error: expected initializer before '<' token
remote: ../node_modules/nan/nan.h:714: error: expected initializer before '<' token
remote: ../node_modules/nan/nan.h:731: error: expected initializer before '<' token
remote: ../node_modules/nan/nan.h:737: error: expected initializer before '<' token
remote: ../node_modules/nan/nan.h:745: error: expected initializer before '<' token
remote: ../node_modules/nan/nan.h:752: error: expected initializer before '<' token
remote: ../node_modules/nan/nan.h:758: error: expected initializer before '<' token
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h: In member function 'void Nan::Callback::SetFunction(const v8::Local<v8::Function>&)':
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:3021: error: argument dependent lookup finds 'class v8::Set'
remote: ../node_modules/nan/nan.h:1394: error:   in call to 'Set'
remote: ../node_modules/nan/nan.h: In member function 'void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)':
remote: ../node_modules/nan/nan.h:1516: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In member function 'v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const':
remote: ../node_modules/nan/nan.h:1534: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In member function 'virtual void Nan::AsyncWorker::HandleErrorCallback()':
remote: ../node_modules/nan/nan.h:1568: error: no matching function for call to 'New(const char*)'
remote: ../node_modules/nan/nan.h: In function 'void Nan::SetMethod(const T&, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))':
remote: ../node_modules/nan/nan.h:1857: error: there are no arguments to 'GetFunction' that depend on a template parameter, so a declaration of 'GetFunction' must be available
remote: ../node_modules/nan/nan.h:1857: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
remote: ../node_modules/nan/nan.h:1858: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))':
remote: ../node_modules/nan/nan.h:1870: error: 'GetFunction' was not declared in this scope
remote: ../node_modules/nan/nan.h:1871: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In function 'void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)':
remote: ../node_modules/nan/nan.h:1896: error: 'NewInstance' was not declared in this scope
remote: ../node_modules/nan/nan.h: In function 'bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)':
remote: ../node_modules/nan/nan.h:1939: error: 'NewInstance' was not declared in this scope
remote: ../node_modules/nan/nan.h: In function 'void Nan::SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)':
remote: ../node_modules/nan/nan.h:1987: error: 'NewInstance' was not declared in this scope
remote: ../node_modules/nan/nan.h: In function 'void Nan::SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)':
remote: ../node_modules/nan/nan.h:2057: error: 'NewInstance' was not declared in this scope
remote: ../node_modules/nan/nan.h: In function 'void Nan::SetCallHandler(v8::Local<v8::FunctionTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)':
remote: ../node_modules/nan/nan.h:2112: error: 'NewInstance' was not declared in this scope
remote: ../node_modules/nan/nan.h: In function 'void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)':
remote: ../node_modules/nan/nan.h:2134: error: 'NewInstance' was not declared in this scope
remote: In file included from ../src/talib.cpp:29:
remote: ../node_modules/nan/nan.h: In function 'void Nan::Export(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))':
remote: ../node_modules/nan/nan.h:2161: error: no matching function for call to 'New(const char*&)'
remote: ../node_modules/nan/nan.h:2162: error: 'GetFunction' was not declared in this scope
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:3021: error: argument dependent lookup finds 'class v8::Set'
remote: ../node_modules/nan/nan.h:2162: error:   in call to 'Set'
remote: ../node_modules/nan/nan.h: In constructor 'Nan::Tap::Tap(v8::Local<v8::Value>)':
remote: ../node_modules/nan/nan.h:2169: error: no matching function for call to 'To(v8::Local<v8::Value>&)'
remote: ../node_modules/nan/nan.h: In member function 'void Nan::Tap::ok(bool, const char*)':
remote: ../node_modules/nan/nan.h:2182: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: In member function 'void Nan::Tap::pass(const char*)':
remote: ../node_modules/nan/nan.h:2188: error: 'class v8::Local<v8::Boolean>' has no member named 'ToLocalChecked'
remote: ../node_modules/nan/nan.h: At global scope:
remote: ../node_modules/nan/nan.h:2212: error: ISO C++ forbids declaration of 'MaybeLocal' with no type
remote: ../node_modules/nan/nan.h:2212: error: expected ';' before '<' token
remote: ../node_modules/nan/nan.h:2215: error: expected ';' before '}' token
remote: ../node_modules/nan/nan.h:2217: error: 'MaybeLocal' was not declared in this scope
remote: ../node_modules/nan/nan.h:2217: error: template argument 1 is invalid
remote: ../node_modules/nan/nan.h:2217: error: expected unqualified-id before '>' token
remote: ../node_modules/nan/nan.h:2226: error: expected constructor, destructor, or type conversion before '<' token
remote: ../src/talib.cpp:39: error: 'v8::Handle' has not been declared
remote: ../src/talib.cpp:47: error: 'Nan::GetFunction' has not been declared
remote: ../src/talib.cpp:50: error: 'Nan::Set' has not been declared
remote: ../src/talib.cpp:51: error: 'Nan::Get' has not been declared
remote: ../src/talib.cpp:58: error: 'Nan::HasOwnProperty' has not been declared
remote: ../src/talib.cpp: In function 'void REPORT_TA_ERROR(Nan::Callback*, TA_RetCode)':
remote: ../src/talib.cpp:83: error: no matching function for call to 'New(const char [6])'
remote: ../src/talib.cpp:83: error: no matching function for call to 'New(const char*&)'
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:3021: error: argument dependent lookup finds 'class v8::Set'
remote: ../src/talib.cpp:83: error:   in call to 'Set'
remote: ../src/talib.cpp: In function 'void REPORT_INTERNAL_ERROR(Nan::Callback*, const char*)':
remote: ../src/talib.cpp:93: error: no matching function for call to 'New(const char [6])'
remote: ../src/talib.cpp:93: error: no matching function for call to 'New(const char*&)'
remote: /var/lib/openshift/567474682d5271fb7800002c/.node-gyp/4.1.1/include/node/v8.h:3021: error: argument dependent lookup finds 'class v8::Set'
remote: ../src/talib.cpp:93: error:   in call to 'Set'
remote: ../src/talib.cpp: In function 'double* V8_TO_DOUBLE_ARRAY(v8::Local<v8::Array>)':
remote: ../src/talib.cpp:108: error: 'Get' was not declared in this scope
remote: ../src/talib.cpp: At global scope:
remote: ../src/talib.cpp:116: error: expected initializer before '<' token
remote: ../src/talib.cpp:76: warning: 'void REPORT_TA_ERROR(Nan::Callback*, TA_RetCode)' defined but not used
remote: ../src/talib.cpp:88: warning: 'void REPORT_INTERNAL_ERROR(Nan::Callback*, const char*)' defined but not used
remote: ../src/talib.cpp:98: warning: 'double* V8_TO_DOUBLE_ARRAY(v8::Local<v8::Array>)' defined but not used
remote: make: *** [Release/obj.target/talib/src/talib.o] Error 1
remote: make: Leaving directory `/var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/talib/build'
remote: gyp ERR! build error 
remote: gyp ERR! stack Error: `make` failed with exit code: 2
remote: gyp ERR! stack     at ChildProcess.onExit (/var/lib/openshift/567474682d5271fb7800002c/app-root/data/node-v4.1.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
remote: gyp ERR! stack     at emitTwo (events.js:87:13)
remote: gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
remote: gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
remote: gyp ERR! System Linux 2.6.32-573.12.1.el6.x86_64
remote: gyp ERR! command "/var/lib/openshift/567474682d5271fb7800002c/app-root/data/node-v4.1.1-linux-x64/bin/node" "/var/lib/openshift/567474682d5271fb7800002c/app-root/data/node-v4.1.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
remote: gyp ERR! cwd /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/talib
remote: gyp ERR! node -v v4.1.1
remote: gyp ERR! node-gyp -v v3.0.3
remote: gyp ERR! not ok 
remote: npm info preinstall [email protected]
remote: npm info preinstall [email protected]
remote: npm info preinstall [email protected]
remote: npm info preinstall [email protected]
remote: npm info build /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/isarray
remote: npm info build /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/string_decoder
remote: npm info build /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/inherits
remote: npm info linkStuff [email protected]
remote: npm info linkStuff [email protected]
remote: npm info build /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is
remote: npm info linkStuff [email protected]
remote: npm info install [email protected]
remote: npm info install [email protected]
remote: npm info postinstall [email protected]
remote: npm info postinstall [email protected]
remote: npm info linkStuff [email protected]
remote: npm info install [email protected]
remote: npm info postinstall [email protected]
remote: npm info install [email protected]
remote: npm info postinstall [email protected]
remote: npm info build /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream
remote: npm info linkStuff [email protected]
remote: npm info install [email protected]
remote: npm info postinstall [email protected]
remote: npm info build /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/express/node_modules/connect/node_modules/multiparty
remote: npm info linkStuff [email protected]
remote: npm info install [email protected]
remote: npm info postinstall [email protected]
remote: npm info build /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/express/node_modules/connect
remote: npm info linkStuff [email protected]
remote: npm info install [email protected]
remote: npm info postinstall [email protected]
remote: npm info build /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/node_modules/express
remote: npm info linkStuff [email protected]
remote: npm info install [email protected]
remote: npm info postinstall [email protected]
remote: npm info [email protected] Failed to exec install script
remote: npm ERR! Linux 2.6.32-573.12.1.el6.x86_64
remote: npm ERR! argv "/var/lib/openshift/567474682d5271fb7800002c/app-root/data/node-v4.1.1-linux-x64/bin/node" "/var/lib/openshift/567474682d5271fb7800002c/app-root/data/node-v4.1.1-linux-x64/bin/npm" "install" "-d"
remote: npm ERR! node v4.1.1
remote: npm ERR! npm  v2.14.4
remote: npm ERR! code ELIFECYCLE
remote: 
remote: npm ERR! [email protected] install: `node ./src/lib/build.js && node-gyp configure && node-gyp build`
remote: npm ERR! Exit status 1
remote: npm ERR! 
remote: npm ERR! Failed at the [email protected] install script 'node ./src/lib/build.js && node-gyp configure && node-gyp build'.
remote: npm ERR! This is most likely a problem with the talib package,
remote: npm ERR! not with npm itself.
remote: npm ERR! Tell the author that this fails on your system:
remote: npm ERR!     node ./src/lib/build.js && node-gyp configure && node-gyp build
remote: npm ERR! You can get their info via:
remote: npm ERR!     npm owner ls talib
remote: npm ERR! There is likely additional logging output above.
remote: npm info preuninstall [email protected]
remote: npm info uninstall [email protected]
remote: npm info postuninstall [email protected]
remote: 
remote: npm ERR! Please include the following file with any support request:
remote: npm ERR!     /var/lib/openshift/567474682d5271fb7800002c/app-root/runtime/repo/npm-debug.log
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: CLIENT_ERROR: Failed to execute action hook 'build' for 567474682d5271fb7800002c application screener2
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option.

When trying to install using the latest version of node (0.12) it fails

building talib functions...
child_process: customFds option is deprecated, use stdio instead.
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

child_process: customFds option is deprecated, use stdio instead.
CXX(target) Release/obj.target/talib/src/talib.o
../src/talib.cpp:42:15: error: expected class name
class Talib : ObjectWrap {
^
../src/talib.cpp:92:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle New(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/jlebonitte1/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/talib.cpp:331:81: error: no type named 'AccessorInfo' in namespace 'v8'
static Handle GetFunctions(v8::Localv8::String property, const v8::AccessorInfo& info) {
~~~~^
../src/talib.cpp:378:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle Explain(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/jlebonitte1/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/talib.cpp:394:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle Execute(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/jlebonitte1/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/talib.cpp:846:29: error: unknown type name 'uv_work_t'
static void ExecuteWork(uv_work_t req) {
^
../src/talib.cpp:856:33: error: unknown type name 'uv_work_t'
static void ExecuteWorkDone(uv_work_t *req, int status) {
^
../src/talib.cpp:71:21: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/jlebonitte1/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../src/talib.cpp:72:81: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'Handlev8::Value
(const v8::internal::Arguments &)'
Local local_function_template = FunctionTemplate::New(New);
^~~
/Users/jlebonitte1/.node-gyp/0.12.0/deps/v8/include/v8.h:3456:16: note: passing argument to parameter 'isolate' here
Isolate
isolate,
^
../src/talib.cpp:73:70: error: 'New' is a private member of 'v8::PersistentBasev8::FunctionTemplate'
persistent_function_template = Persistent::New(local_function_template);
^
/Users/jlebonitte1/.node-gyp/0.12.0/deps/v8/include/v8.h:572:23: note: declared private here
V8_INLINE static T* New(Isolate* isolate, T* that);
^
../src/talib.cpp:73:40: error: too few arguments to function call, expected 2, have 1; did you mean '::Talib::New'?
persistent_function_template = Persistent::New(local_function_template);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::Talib::New
../src/talib.cpp:92:26: note: '::Talib::New' declared here
static Handle New(const Arguments& args) {
^
../src/talib.cpp:74:37: error: member reference type 'Persistentv8::FunctionTemplate' is not a pointer; maybe you meant to use
'.'?
persistent_function_template->InstanceTemplate()->SetInternalFieldCount(1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
.
../src/talib.cpp:74:39: error: no member named 'InstanceTemplate' in 'v8::Persistent<v8::FunctionTemplate,
v8::NonCopyablePersistentTraitsv8::FunctionTemplate >'
persistent_function_template->InstanceTemplate()->SetInternalFieldCount(1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../src/talib.cpp:75:37: error: member reference type 'Persistentv8::FunctionTemplate' is not a pointer; maybe you meant to use
'.'?
persistent_function_template->SetClassName(String::NewSymbol("TALib"));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
.
../src/talib.cpp:75:39: error: no member named 'SetClassName' in 'v8::Persistent<v8::FunctionTemplate,
v8::NonCopyablePersistentTraitsv8::FunctionTemplate >'
persistent_function_template->SetClassName(String::NewSymbol("TALib"));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../src/talib.cpp:75:60: error: no member named 'NewSymbol' in 'v8::String'
persistent_function_template->SetClassName(String::NewSymbol("TALib"));
~~~~~~~~^
../src/talib.cpp:78:21: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
target->Set(String::New("version"), String::New("0.4.2"));
^~~~~~~~~~~
New
../src/talib.cpp:92:26: note: 'New' declared here
static Handle New(const Arguments& args) {
^
../src/talib.cpp:78:33: error: reference to type 'const v8::internal::Arguments' could not bind to an lvalue of type
'const char [8]'
target->Set(String::New("version"), String::New("0.4.2"));
^~~~~~~~~
../src/talib.cpp:92:47: note: passing argument to parameter 'args' here
static Handle New(const Arguments& args) {
^
../src/talib.cpp:81:29: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
target->SetAccessor(String::New("functions"), GetFunctions, NULL);
^~~~~~~~~~~
New
../src/talib.cpp:92:26: note: 'New' declared here
static Handle New(const Arguments& args) {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/talib/src/talib.o] Error 1

Windows Support

Hello
When windows support will be released ?
I got this error
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin,linux","arch":"any"} (current: {"os":"win32","arch":"x

Thanks for you help

BBANDS and MACD examples

Could someone please post some working examples of MACD and/or BBANDS.
I am getting an unexpected:

TALib Version: 0.2.9
BBANDS Function Results:
{ error: 'First argument must contain '%s' field' }

when i run

var talib = require("../build/Release/talib");
var fs = require("fs");

// Display module version
console.log();
console.log("TALib Version: " + talib.version);

// Load market data
var marketContents = fs.readFileSync('examples/marketdata.json','utf8');
var marketData = JSON.parse(marketContents);

// execute ADX indicator function with time period 9
talib.execute({
name: "BBANDS",
startIdx: 0,
endIdx: marketData.close.length - 1,
inReal: marketData.close,
optInTimePeriod: 180
}, function (result) {

// Show the result array
console.log("BBANDS Function Results:");
console.log(result);

});

Installation error even after installing Windows Build Tools

building talib functions...
fs.js:904
  return binding.readdir(pathModule._makeLong(path), options.encoding);
                 ^

Error: ENOENT: no such file or directory, scandir 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework'
    at Object.fs.readdirSync (fs.js:904:18)
    at Object.<anonymous> (C:\Users\jeongmincha\Dropbox\trading\gekko\node_modules\talib\src\lib\build.js:22:30)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./src/lib/build.js && node-gyp configure && node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jeongmincha\AppData\Roaming\npm-cache\_logs\2018-02-08T12_16_22_635Z-debug.log

Here's my error message.
What should I do to resolve this issue?
I already installed Windows Build Tools by using admin cmd and typing npm install --global --production windows-build-tools.

How to install node-talib on FreeBSD?

How to install or port node-talib on FreeBSD?

[root@dsadas:~/gekko/trade# npm install --save-exact talib 
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin,linux,win32","arch":"any"} (current: {"os":"freebsd","arch":"x64"})
npm ERR! notsup Valid OS:    darwin,linux,win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   freebsd
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-03-22T18_40_31_053Z-debug.log

I changed linux to FreeBSD in packages.json file and run npm install:

npm WARN lifecycle [email protected]~install: cannot run in wd %s %s (wd=%s) [email protected] node ./src/lib/build.js && node-gyp configure && node-gyp build /root/gekko/trade/node-talib
npm WARN [email protected] No license field.

up to date in 0.104s

Input format

Hi,

What do you think about changing the input format to:

[
[
417074400000,
35.88,
36.13,
35.25,
36,
20000
],
[
417160800000,
34.88,
35.88,
34,
34,
31000
]
]

Just an array of arrays with timestamp, open, high, low, close, volume. This is the format used by Highstock so you could persist data in RethinkDB or MongoDB and analyze it with TALib and/or stream it unmodified to be displayed in the browser. Plus I think it's a little bit clearer.

If I submit a pull request for this, would you consider accepting it?

Unable to install on ubuntu 14.04 LTS

Hi All

I am not able to install node-talib on ubuntu the error that is returned is below;
hopefully someone can point me in the correct direction to resolve this issue.

Thanks in advance.

building talib functions...
make: Entering directory /opt/chobits040/node_modules/talib/build' CXX(target) Release/obj.target/talib/src/talib.o make: g++: Command not found make: *** [Release/obj.target/talib/src/talib.o] Error 127 make: Leaving directory/opt/chobits040/node_modules/talib/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_ modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074 :12)
gyp ERR! System Linux 3.16.0-46-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/b in/node-gyp.js" "build"
gyp ERR! cwd /opt/chobits040/node_modules/talib
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Linux 3.16.0-46-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "talib"
npm ERR! node v0.12.7
npm ERR! npm v2.13.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node ./src/lib/build.js && node-gyp configure && node-gyp build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./src/lib/build.js && no de-gyp configure && node-gyp build'.
npm ERR! This is most likely a problem with the talib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./src/lib/build.js && node-gyp configure && node-gyp build
npm ERR! You can get their info via:
npm ERR! npm owner ls talib
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /opt/chobits040/npm-debug.log

Does not work in node v6.4.0

npm install

> [email protected] install /Users/[..]/binary/node_modules/talib
> node ./src/lib/build.js && node-gyp configure && node-gyp build

building talib functions...
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/talib/src/talib.o
  SOLINK_MODULE(target) Release/talib.node
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_abstract.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_global.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_retcode.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_utility.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_a.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_b.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_c.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_d.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_e.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_f.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_g.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_h.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_i.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_j.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_k.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_l.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_m.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_n.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_o.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_p.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_q.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_r.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_s.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_t.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_u.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_v.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_w.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_x.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_y.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(table_z.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_def_ui.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_group_idx.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_frame.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ACCBANDS.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ACOS.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_AD.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ADD.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ADOSC.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ADX.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ADXR.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_APO.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_AROON.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_AROONOSC.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ASIN.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ATAN.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_ATR.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_AVGPRICE.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_BBANDS.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_BETA.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_BOP.o)) was built for newer OSX version (10.11) than being linked (10.7)
ld: warning: object file (../src/lib/lib/libta_libc_csr.a(ta_CCI.o)) was built for newer OSX version (10.11) than being linked (10.7)
[..]

npm WARN [email protected] No repository field.
➜  binary node ./index.js
[1]    4991 segmentation fault  node ./index.js
➜  binary node -v
v6.4.0

0.4.1 still reports as 0.4.0 when calling talib.version

Updated to 0.4.1 today and still getting 0.4.0 as talib.version.

I did an uninstall and clean install, same thing.

Probably just a small edit for version number rather than an actual bug, but though you might want to check.

SMA calculation seems incorrent

The output of SMA(10) is 135.5, and it is wrong.
But I used the same json data to find SMA10 by python talib module , the output is 135.91 and it is correct.

Here is my test script

var talib = require('talib');
var util = require('util');
console.log("TALib Version: " + talib.version);
// var request = require('request');


var marketData = {
"c": [
    130.7,
    131.0,
    127.3,
    129.3,
    135.5,
    139.7,
    139.6,
    142.0,
    142.1,
    141.9
]
};
talib.execute({
    name: "SMA",
    startIdx: 0,
    endIdx: marketData.c.length-1,
    inReal:marketData.c,
    optInTimePeriod: 10
}, function (result) {
    var outreal = result.result.outReal;
    console.log("SMA(10) Function Results:");
    console.dir(outreal.pop());

});

output is

TALib Version: 1.0.0
SMA(10) Function Results:
135.5

calculate indicators by minutes

Suppose now is 18:11, I have ten market data for 18:01, 18:02 ... 18:10.
I can use talib to calculate RSI of these data.

Now time goes to 18:12, I got the new data of 18:11.
Can I use the calculated data previously as the input to calculate RSI for 18:12, or I can only use data of 18:01 - 18:11 as the input?

Is there a way to stream data to these functions?

I want to run these over a large set of data, getting an updated value of each indicator at each data point. I don't want to hold all the data in memory as the dataset is large. Is there a way to stream data points to the functions and have it update incrementally?

Thanks!

npm install node-talib fail (OSX)

I am using node v4.1.1 and node-gyp v3.0.1, but it failed. Please advise me. Thanks

10 errors generated.
make: *** [Release/obj.target/talib/src/talib.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/4.1.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /Volumes/TOSHIBA EXT/Google Drive/nodejs_proj/node-stock-spider-v2/node_modules/talib
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/Cellar/node/4.1.1/bin/node" "/usr/local/bin/npm" "install" "talib"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node ./src/lib/build.js && node-gyp configure && node-gyp build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./src/lib/build.js && node-gyp configure && node-gyp build'.
npm ERR! This is most likely a problem with the talib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./src/lib/build.js && node-gyp configure && node-gyp build
npm ERR! You can get their info via:
npm ERR! npm owner ls talib
npm ERR! There is likely additional logging output above.

Can't get it to work - am I doing something wrong?

Hi,

This is on v0.2.9 of node-talib on 64bit Ubuntu 13.04. Node v0.10.5

The library seemed to build correctly from npm.

> [email protected] preinstall /home/jr/workspace/tasar/node_modules/talib
> cd ./src/lib && node build.js && cd ../../ && node-gyp configure && node-gyp build

building talib functions...
make: Entering directory `/home/jr/workspace/tasar/node_modules/talib/build'
  CXX(target) Release/obj.target/talib/src/talib.o
  SOLINK_MODULE(target) Release/obj.target/talib.node
  SOLINK_MODULE(target) Release/obj.target/talib.node: Finished
  COPY Release/talib.node
make: Leaving directory `/home/jr/workspace/tasar/node_modules/talib/build'

The following test seemingly produces garbage in the result array:-

var talib = require('talib');
talib.execute({
                name: "SMA",
                startIdx: 0,
                endIdx: 4,
                inReal: [1.0, 1.0, 1.0, 1.0, 1.0],
                optInTimePeriod: 2
            }, function (result) {
                console.log(JSON.stringify(result));

            })

Results vary. For example, this is 3 runs:

{"begIndex":1,"nbElement":4,"result":{"outReal":[9.121659968796e-311,2.1334585e-    317,2.133458e-317,3.4766123620452e-310,0]}}
jr@jr-13-04:~/workspace/tasar$ node test.js
{"begIndex":1,"nbElement":4,"result":{"outReal":[null,null,null,null,0]}}
jr@jr-13-04:~/workspace/tasar$ node test.js
{"begIndex":1,"nbElement":4,"result":{"outReal":[1.5086519287736e-311,2.1334585e-    317,2.133458e-317,3.47666280419233e-310,0]}}

Kind regards,

  • Alfred

crossover function not found

windows 10, node v8.9.4, npm v5.6.0

I'm trying to use the crossover function from zenbot but it isn't found. I've been able to use many of the the other talib functions with no problems after figuring out how to build talib with 2017 c++ msbuild tools and npm install windows-build-tools.

      talib.execute(
        {
          name: 'CROSSOVER',
          startIdx: 0,
          endIdx: series1.length - 1,
          inReal0: series1,
          inReal1: series2
        },

{"error":"TA_FUNC_NOT_FOUND"}

Any idea how I can use this one or what is going on?

No error thrown on talib.execute if options object is invalid

Steps to reproduce:
Try setting the startIdx to a negative value (e.g. -100) and running talib.execute. It's strange that there is no error thrown and the callback doesn't get fired at all. Maybe an error callback might be good if success callback isn't called (it's not documented, maybe there is one?).

An easy solution is to of course do a validity check on data before even calling the talib.execute function, which is what I'm now doing. But it took a while to figure out what was wrong with the code.

My startIdx used:
startIdx: marketData.close.length - limit - 1
where limit was a preset limit to crop the marketData. The problem happened in one case where there wasn't enough market data to meet the limit so startIdx went to negative number.

Easy fix (used now):
startIdx: Math.max(0, marketData.close.length - limit - 1),

Memory leak

Hi

Seems when the library is used intensively it generate memory leak. Test case:

setInterval(function () {
    talib.execute({
        name: "ADX",
        startIdx: 0,
        endIdx: marketData.close.length - 1,
        high: marketData.high,
        low: marketData.low,
        close: marketData.close,
        optInTimePeriod: 9
    }, function (result) {

    });
}, 40);

Tested on node v0.12.2 and talib 0.5.0

Any idea ? Thanks!

trouble installing in Debian docker image

I've been having a ton of trouble installing node-talib into my docker image for distribution of a Meteor app I'm working on. It's failing to build. I think it has something to do with docker running as root and not a user. I've been able to get it to install globally using the --unsafe-perm option, but can't link to it. Help appriciated.

> [email protected] install /bundle/bundle/programs/server/npm/node_modules/talib
> node ./src/lib/build.js && node-gyp configure && node-gyp build

building talib functions...
make: Entering directory '/bundle/bundle/programs/server/npm/node_modules/talib/build'
  CXX(target) Release/obj.target/talib/src/talib.o
  SOLINK_MODULE(target) Release/obj.target/talib.node
../src/lib/lib/libta_libc_csr.a: error adding symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
talib.target.mk:119: recipe for target 'Release/obj.target/talib.node' failed
make: *** [Release/obj.target/talib.node] Error 1
make: Leaving directory '/bundle/bundle/programs/server/npm/node_modules/talib/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-31-generic
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /bundle/bundle/programs/server/npm/node_modules/talib
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 

npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/opt/nodejs/bin/node" "/opt/nodejs/bin/npm" "rebuild" "--no-bin-links" "--update-binary"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node ./src/lib/build.js && node-gyp configure && node-gyp build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node ./src/lib/build.js && node-gyp configure && node-gyp build'.
npm ERR! This is most likely a problem with the talib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./src/lib/build.js && node-gyp configure && node-gyp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs talib
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls talib
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /bundle/bundle/programs/server/npm/npm-debug.log

npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/opt/nodejs/bin/node" "/usr/bin/npm" "install" "--unsafe-perm"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node npm-rebuild.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node npm-rebuild.js'.
npm ERR! This is most likely a problem with the meteor-dev-bundle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node npm-rebuild.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meteor-dev-bundle
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls meteor-dev-bundle
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /bundle/bundle/programs/server/npm-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.