Problem using BBANDS on OSX
lwedel opened this issue · 2 comments
lwedel commented
Hi!
I am using talib in my project, my current setup:
- osx: 12.2.1
- talib 1.1.3 (according to talib.version) and 1.1.4 according to package_lock.json
- npm 8.5.0
- node v14.16.1
In short: I cannot use the BBANDS method - with the basic setup.
Code:
const tmpData = [
42041.13, 42099.98, 41663.77, 41690.84, 41892.95, 41940,
41765.24, 42154.26, 42290.41, 42027.43, 42067.01, 42205.42,
42107.81, 42500.07, 42465.61, 42500, 42565, 42624.97,
42553.66, 42227.85, 42102.29, 42171.93, 42215.33, 42659.99,
42525.14, 42561.04, 43443.33, 43538.01, 43535.1, 43445.1,
43543.2, 43523.7, 43665.7, 43970.4, 44027.5, 44235,
44214.4, 44161.8, 44230.9, 44235, 44190.3, 44110.9,
43928.2, 44114.2, 43989.6, 44129.8, 43975, 44164.8,
44529.6, 44195.1, 43987.2, 44066.1, 43970.9, 43886.9,
44044.9, 44026.3, 44165.5, 44134.5, 44002.8, 44092.8,
44160.6, 44035.8, 43638.9, 43492.2, 43588.5, 43630,
43560.2, 43817.8, 44202.2, 44078.7, 44050.4, 44000,
43860.7, 44050.2, 44001.9, 43994.2, 43574.3, 43600,
43613.8, 43819.9, 43902.4, 43461.4, 43214.7, 43050,
43158.2, 43207.5, 42242.6, 41919.9, 41907.7, 41968.8,
41730, 41265, 41177.1, 40865.6, 40643.4, 40691.7,
40491.7, 40545, 40766.5, 40745.5,]
let result = await talib.execute({
name: "BBANDS",
inReal: tmpData,
});
What I got:
Fatal error in , line 0
Check failed: receiver.IsJSFunction().
FailureMessage Object: 0x3087d5510
1: 0x1001142e2 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/usr/local/bin/node]
2: 0x1010106d2 V8_Fatal(char const*, ...) [/usr/local/bin/node]
3: 0x1005782d8 v8::internal::JSReceiver::GetCreationContext() [/usr/local/bin/node]`
No matter the length of the data, I am still receiving the same results.
Not sure where I should be digging/checking as the information I found about a similar issue is pointing only to an empty array being passed to the Talib method - that is not the case in my example.
Edit:
I will be updating my findings here:
- Same problems on 1.1.2 & 1.1.3 & 1.1.4 (interestingly this version still introduces itself as 1.1.3)
- Other methods works - "CDLTHRUSTING", "CDLXSIDEGAP3METHODS", "CDL3BLACKCROWS", "CDL3STARSINSOUTH", "CDL3WHITESOLDIERS", "CDL3INSIDE"
- The only difference I see is the type of data - in the methods I was using before I got type: 'price', in BBANDS I got type 'real' - investigating.
lwedel commented
FIXED!
Looks like
optInTimePeriod: number,
Is a mandatory parameter!