it's a dirty patch for pynecore to run it from python instead of running it with pyne cli
to use it, put custom_script_runner.py in your project and import/use like in examples(pynecore should be installed properly, it's a patch on top of pynecore)
This is another version of custom_script_runner that you use if you want to pre-load pyne-indicator and then just run it.
You use it like this:
from custom_script_runner_preload_script import fork_runner, import_script
script_module = import_script(indic_path)
fork_runner(script_module, ohlcv_iter, inputs)This is the third version for running multiple indicators on same ohlcv_iter.
Examples naming: <input_option>_<output_option>.py
- ohlcv_stdout.py -- simplest example, shows when you want to read data from ohlcv file but control the output
- csv_stdout.py -- example that shows how to use it with custom input and custom output. Shows how to create iterator to pass custom input data
- multi_indic_ohlcv_stdout.py -- chart_runner usage example
- with
chart_runnerusingplot()in scripts will not work because i removedlib._plot_data.update(res), and instead return directly inexecute_script_bar()(just for simplicity, technically would exist there just fine) - last_bar_index most likely doesn't work properly (in fork_runner it's inited with 0 when it should be inited with input data size)
custom_script_runner.pyis a copy of pynecores src/pynecore/core/script_runner with addedfork_runnerfunc