torreyleonard / algotrader

Simple algorithmic stock and option trading for Node.js.
https://www.npmjs.com/package/algotrader
Apache License 2.0
636 stars 120 forks source link

TypeError: Scheduler.onMarketOpen is not a function #31

Open skagraw2 opened 4 years ago

skagraw2 commented 4 years ago

Hi, I am getting following error while using given example in the package. Please help how to fix it.

using node v12.13.0.

c:\test\node examples\highest-open-interest.js C:\test\node_modules\algotrader2\examples\highest-open-interest.js:28 Scheduler.onMarketOpen(5 * 60000, open).catch(error => console.error(error)); // Run every day on market open ^

TypeError: Scheduler.onMarketOpen is not a function at Object. (C:\test\node_modules\algotrader2\examples\highest-open-interest.js:28:11) at Module._compile (internal/modules/cjs/loader.js:956:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10) at Module.load (internal/modules/cjs/loader.js:812:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) at internal/main/run_main_module.js:17:11