Hey Tradovate, a few trading signals I work with depend on some complicated math and linear algebra, stuff well-suited existing libraries out there. Rather than reinvent the wheel and write the code in an indicator, it would be great if I could leverage the existing NPM packages via the require('package');
.
As far as I can tell from the docs, the only 3rd party package available to us is lodash
, but this is quite limiting if I wanted to get creative with mathjs
or @tensorflow/tfjs
or jstat
, all of which can be pulled from NPM.
I could manually “replicate” the library by copying the code into a functional indicator in my own Tradovate account (module.exports = { 'npmLibrary' }
, and const npmLibrary = require('./npmLibraryFile')
, but this isn’t very efficient (and in some cases may not be possible as it seems like there might be a file size limit to indicators).
Is it possible to make these or generic NPM packages available to the indicator lifecycle? I understand that if using require
they’d probably need to be loaded directly into the Tradovate app for everyone as part of your configuration / packages.json
, but some of the packages are available via CDN etc, so could potentially be pulled RESTfully as a pre-loaded script accessible to my indicator.
Appreciate any info, thank you!