opencode-pyneruntime 6.6.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opencode_pyneruntime-6.6.4/LICENSE +201 -0
- opencode_pyneruntime-6.6.4/MANIFEST.in +3 -0
- opencode_pyneruntime-6.6.4/NOTICE +21 -0
- opencode_pyneruntime-6.6.4/PKG-INFO +281 -0
- opencode_pyneruntime-6.6.4/README.md +236 -0
- opencode_pyneruntime-6.6.4/build/opencode_pyneruntime.egg-info/SOURCES.txt +259 -0
- opencode_pyneruntime-6.6.4/pyproject.toml +91 -0
- opencode_pyneruntime-6.6.4/setup.cfg +4 -0
- opencode_pyneruntime-6.6.4/src/pynecore/__init__.py +6 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/__init__.py +2 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/app.py +238 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/commands/__init__.py +343 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/commands/benchmark.py +186 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/commands/compile.py +198 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/commands/data.py +857 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/commands/debug.py +63 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/commands/optimize.py +956 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/commands/plugin.py +242 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/commands/run.py +2006 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/pluggable.py +132 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/utils/__init__.py +0 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/utils/api_error_handler.py +168 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/utils/broker_picker.py +330 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/utils/error_hook.py +28 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/utils/keyreader.py +178 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/utils/provider_picker.py +19 -0
- opencode_pyneruntime-6.6.4/src/pynecore/cli/utils/symbol_browser.py +1149 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/__init__.py +0 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/aggregator.py +257 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/bar_magnifier.py +168 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/__init__.py +64 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/defaults.py +113 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/disappearance.py +927 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/emulator.py +345 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/exceptions.py +346 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/idempotency.py +401 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/intent_builder.py +334 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/journal.py +1785 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/models.py +1600 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/native_failsafe_manager.py +1436 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/one_way_emulator.py +1128 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/position.py +787 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/run_identity.py +126 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/software_entry_stop_engine.py +351 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/software_partial_bracket_engine.py +1379 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/spot_inventory.py +1327 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/storage.py +2655 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/store_helpers.py +2161 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/sync_engine.py +16070 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/broker/validation.py +382 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/class_property.py +7 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/config.py +392 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/csv_file.py +547 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/currency.py +262 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/data_converter.py +1002 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/datetime.py +296 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/download_info.py +71 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/download_runner.py +274 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/htf_aggregator.py +181 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/import_hook.py +358 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/instance_state.py +494 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/live_ltf_collector.py +442 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/live_ltf_window.py +189 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/live_runner.py +1347 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/module_property.py +26 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/ohlcv_file.py +1888 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/overload.py +371 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/pine_cast.py +113 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/pine_export.py +95 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/pine_method.py +244 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/pine_range.py +86 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/pine_udt.py +69 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/plugin/__init__.py +394 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/plugin/broker.py +781 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/plugin/cli.py +96 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/plugin/live_provider.py +208 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/plugin/provider.py +331 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/provider_string.py +148 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/random.py +40 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/resampler.py +686 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/safe_convert.py +64 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/script.py +1011 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/script_runner.py +3202 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/security.py +1749 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/security_process.py +1253 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/security_shm.py +456 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/series.py +417 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/strategy_stats.py +669 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/symbol_map.py +134 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/syminfo.py +505 -0
- opencode_pyneruntime-6.6.4/src/pynecore/core/viz.py +591 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/__init__.py +1771 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/_fixnan.py +32 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/_math_stateful.py +202 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/_timeframe_change.py +101 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/adjustment.py +6 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/alert.py +39 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/alert.pyi +14 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/array.py +1051 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/barmerge.py +60 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/barstate.py +30 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/box.py +415 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/chart.py +128 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/color.py +152 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/color.pyi +50 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/currency.py +62 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/dayofweek.py +36 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/dayofweek.pyi +18 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/display.py +8 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/dividends.py +9 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/earnings.py +11 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/extend.py +6 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/font.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/footprint.py +79 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/format.py +11 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/hline.py +67 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/hline.pyi +24 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/label.py +409 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/line.py +433 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/linefill.py +93 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/location.py +11 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/log.py +362 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/map.py +150 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/math.py +385 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/matrix.py +708 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/order.py +8 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/pivotpointtype.py +8 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/plot.py +95 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/plot.pyi +33 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/polyline.py +91 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/position.py +15 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/request.py +281 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/runtime.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/scale.py +9 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/session.py +267 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/session.pyi +12 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/shape.py +18 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/size.py +12 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/splits.py +4 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/__init__.py +4778 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/closedtrades.py +347 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/closedtrades.pyi +53 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/commission.py +9 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/direction.py +9 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/oca.py +13 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/opentrades.py +281 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/opentrades.pyi +49 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/strategy/risk.py +109 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/string.py +649 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/syminfo.py +84 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/ta.py +2230 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/table.py +290 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/text.py +17 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/ticker.py +207 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/timeframe.py +293 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/volume_row.py +67 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/xloc.py +4 -0
- opencode_pyneruntime-6.6.4/src/pynecore/lib/yloc.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/providers/__init__.py +0 -0
- opencode_pyneruntime-6.6.4/src/pynecore/providers/ccxt.py +664 -0
- opencode_pyneruntime-6.6.4/src/pynecore/providers/replay.py +187 -0
- opencode_pyneruntime-6.6.4/src/pynecore/pynesys/__init__.py +0 -0
- opencode_pyneruntime-6.6.4/src/pynecore/pynesys/api.py +498 -0
- opencode_pyneruntime-6.6.4/src/pynecore/pynesys/compiler.py +112 -0
- opencode_pyneruntime-6.6.4/src/pynecore/standalone.py +99 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/__init__.py +1 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/__init__.py +41 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/__main__.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/cli.py +87 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/generate.py +47 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/model.py +84 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/reference.py +645 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/runner.py +372 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/scheduler.py +50 -0
- opencode_pyneruntime-6.6.4/src/pynecore/testing/broker_lab/subprocess.py +73 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/__init__.py +0 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/builtin_shadow.py +136 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/closure_arguments_transformer.py +428 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/display_rewrite.py +140 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/dynamic_default.py +147 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/function_isolation.py +757 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/import_lifter.py +61 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/import_normalizer.py +328 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/inline_series_hoist.py +178 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/input_transformer.py +175 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/lib_series.py +201 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/locations.py +70 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/module_properties.json +3387 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/module_property.py +221 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/ne_guard.py +70 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/persistent.py +320 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/persistent_series.py +76 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/safe_convert_transformer.py +97 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/safe_division_transformer.py +95 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/script_requirements.py +308 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/security.py +752 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/security_instantiation.py +274 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/series.py +275 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/slot_layout.py +381 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/type_checking_stripper.py +25 -0
- opencode_pyneruntime-6.6.4/src/pynecore/transformers/unused_series_detector.py +267 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/__init__.py +21 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/alert.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/barmerge.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/base.py +39 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/box.py +37 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/chart.py +17 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/color.py +107 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/currency.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/datetime.py +6 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/display.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/dividends.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/earnings.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/extend.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/font.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/footprint.py +41 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/format.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/hline.py +24 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/ib_persistent.py +8 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/ib_persistent.pyi +10 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/label.py +35 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/line.py +32 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/linefill.py +13 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/location.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/matrix.py +999 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/na.py +237 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/na.pyi +83 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/ohlcv.py +12 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/order.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/persistent.py +8 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/persistent.pyi +13 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/pine_types.py +11 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/pine_types.pyi +15 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/pivotpointtype.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/plot.py +12 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/plot_meta.py +60 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/polyline.py +40 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/position.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/scale.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/script_type.py +15 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/series.py +23 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/series.pyi +19 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/session.py +35 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/shape.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/size.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/source.py +33 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/splits.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/strategy.py +45 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/table.py +87 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/text.py +13 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/type_checker.py +7 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/type_checker.pyi +48 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/volume_row.py +36 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/weekdays.py +11 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/xloc.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/types/yloc.py +5 -0
- opencode_pyneruntime-6.6.4/src/pynecore/utils/__init__.py +0 -0
- opencode_pyneruntime-6.6.4/src/pynecore/utils/file_utils.py +50 -0
- opencode_pyneruntime-6.6.4/src/pynecore/utils/rich/__init__.py +0 -0
- opencode_pyneruntime-6.6.4/src/pynecore/utils/rich/date_column.py +25 -0
- opencode_pyneruntime-6.6.4/src/pynecore/utils/sequence_view.py +92 -0
- opencode_pyneruntime-6.6.4/src/pynecore/utils/stdlib_checker.py +17 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 PyneSys LLC.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
PyneCore
|
|
2
|
+
Copyright 2024-2026 PYNESYS LLC (https://pynesys.io)
|
|
3
|
+
|
|
4
|
+
This product includes software developed by PYNESYS LLC.
|
|
5
|
+
|
|
6
|
+
==========================================================================
|
|
7
|
+
Attribution Requirement (Apache License, Section 4d)
|
|
8
|
+
==========================================================================
|
|
9
|
+
|
|
10
|
+
If you use PyneCore in your product or service, you must include the
|
|
11
|
+
following attribution notice in a user-visible location (such as an
|
|
12
|
+
"About" page, application footer, documentation, or startup output):
|
|
13
|
+
|
|
14
|
+
"Powered by PyneSys (https://pynesys.io)"
|
|
15
|
+
|
|
16
|
+
This notice must be reasonably prominent and accessible to end users
|
|
17
|
+
of any product or service that incorporates or is derived from PyneCore.
|
|
18
|
+
|
|
19
|
+
Redistributions of this software, in source or binary form, must retain
|
|
20
|
+
this NOTICE file (or its contents) as required by Section 4(d) of the
|
|
21
|
+
Apache License, Version 2.0.
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: opencode-pyneruntime
|
|
3
|
+
Version: 6.6.4
|
|
4
|
+
Summary: PyneCore runtime (rubycell fork of PyneSys/pynecore) — Pine Script-like runtime and API
|
|
5
|
+
Author-email: PYNESYS LLC <hello@pynesys.com>
|
|
6
|
+
Maintainer: rubycell
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://pynecore.org
|
|
9
|
+
Project-URL: Repository, https://github.com/pynesys/pynecore
|
|
10
|
+
Project-URL: Documentation, https://pynecore.org/docs
|
|
11
|
+
Project-URL: Issues, https://github.com/pynesys/pynecore/issues
|
|
12
|
+
Project-URL: X, https://x.com/pynesys
|
|
13
|
+
Project-URL: Discord, https://discord.com/invite/jegnhtq6gy
|
|
14
|
+
Project-URL: Discussions, https://github.com/PyneSys/pynecore/discussions
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
License-File: NOTICE
|
|
21
|
+
Provides-Extra: cli
|
|
22
|
+
Requires-Dist: typer>=0.16; extra == "cli"
|
|
23
|
+
Requires-Dist: rich; extra == "cli"
|
|
24
|
+
Requires-Dist: tzdata; extra == "cli"
|
|
25
|
+
Provides-Extra: all
|
|
26
|
+
Requires-Dist: typer>=0.16; extra == "all"
|
|
27
|
+
Requires-Dist: rich; extra == "all"
|
|
28
|
+
Requires-Dist: httpx; extra == "all"
|
|
29
|
+
Requires-Dist: ccxt; extra == "all"
|
|
30
|
+
Requires-Dist: pycryptodome; extra == "all"
|
|
31
|
+
Requires-Dist: tzdata; extra == "all"
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-spec; extra == "dev"
|
|
35
|
+
Provides-Extra: providers
|
|
36
|
+
Requires-Dist: httpx; extra == "providers"
|
|
37
|
+
Requires-Dist: ccxt; extra == "providers"
|
|
38
|
+
Requires-Dist: pycryptodome; extra == "providers"
|
|
39
|
+
Provides-Extra: ccxt
|
|
40
|
+
Requires-Dist: ccxt; extra == "ccxt"
|
|
41
|
+
Provides-Extra: capitalcom
|
|
42
|
+
Requires-Dist: httpx; extra == "capitalcom"
|
|
43
|
+
Requires-Dist: pycryptodome; extra == "capitalcom"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
<div align="center">
|
|
47
|
+
|
|
48
|
+
<img src="https://raw.githubusercontent.com/PyneSys/pynecore/refs/heads/main/docs/logo.svg" alt="PyneCore Logo">
|
|
49
|
+
<h1>PyneCoreâ„¢</h1>
|
|
50
|
+
<strong>Pine Script in Python - Without Limitations</strong>
|
|
51
|
+
|
|
52
|
+
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/Python-3.11%2B-blue" alt="Python"></a>
|
|
53
|
+
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License"></a>
|
|
54
|
+
|
|
55
|
+
**🚀 Have Pine Script code? [Get automatic Python translation →](#pine-script-migration-made-easy)**
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
## What is PyneCore?
|
|
60
|
+
|
|
61
|
+
PyneCore brings TradingView's Pine Script capabilities to Python through a revolutionary approach - it transforms regular Python code to behave like Pine Script through AST transformations, while maintaining the full power of the Python ecosystem.
|
|
62
|
+
|
|
63
|
+
Instead of creating another object-oriented wrapper or a new language, PyneCore modifies your Python code at import time, giving you the intuitive bar-by-bar execution model of Pine Script without leaving Python's rich environment.
|
|
64
|
+
|
|
65
|
+
## Key Features
|
|
66
|
+
|
|
67
|
+
- **Native Pine Script Semantics in Python**: Write familiar Python code that runs with Pine Script's bar-by-bar execution model
|
|
68
|
+
- **AST Transformation Magic**: Your code is transformed at import time to implement Pine Script behavior
|
|
69
|
+
- **High Performance**: Zero mandatory external dependencies with highly optimized implementation
|
|
70
|
+
- **Series & Persistent Variables**: Full support for Pine Script's time series and state persistence
|
|
71
|
+
- **Function Isolation**: Each function call gets its own isolated persistent state
|
|
72
|
+
- **NA Handling**: Graceful handling of missing data with Pine Script's NA system
|
|
73
|
+
- **Technical Analysis Library**: Comprehensive set of Pine Script-compatible indicators and functions
|
|
74
|
+
- **Strategy Backtesting**: Pine Script compatible framework for developing and testing trading strategies
|
|
75
|
+
|
|
76
|
+
## Quick Example
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
"""
|
|
80
|
+
@pyne
|
|
81
|
+
"""
|
|
82
|
+
from pynecore import Series
|
|
83
|
+
from pynecore.lib import script, close, ta, plot, color, input
|
|
84
|
+
|
|
85
|
+
@script.indicator(title="Bollinger Bands")
|
|
86
|
+
def main(
|
|
87
|
+
length=input.int("Length", 20, minval=1),
|
|
88
|
+
mult=input.float("Multiplier", 2.0, minval=0.1, step=0.1),
|
|
89
|
+
src=input.source("Source", close)
|
|
90
|
+
):
|
|
91
|
+
# Calculate Bollinger Bands
|
|
92
|
+
basis = ta.sma(src, length)
|
|
93
|
+
dev = mult * ta.stdev(src, length)
|
|
94
|
+
|
|
95
|
+
upper = basis + dev
|
|
96
|
+
lower = basis - dev
|
|
97
|
+
|
|
98
|
+
# Output to chart
|
|
99
|
+
plot(basis, "Basis", color=color.orange)
|
|
100
|
+
plot(upper, "Upper", color=color.blue)
|
|
101
|
+
plot(lower, "Lower", color=color.blue)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Innovative Concepts
|
|
105
|
+
|
|
106
|
+
PyneCore introduces several revolutionary concepts:
|
|
107
|
+
|
|
108
|
+
### 1. Magic Comment & Import Hook
|
|
109
|
+
|
|
110
|
+
Identify your scripts with a simple magic comment:
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
"""
|
|
114
|
+
@pyne
|
|
115
|
+
"""
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
This activates PyneCore's import hook system which intercepts Python imports and applies AST transformations to recognized scripts.
|
|
119
|
+
|
|
120
|
+
### 2. Series Variables
|
|
121
|
+
|
|
122
|
+
Track historical data across bars, just like in Pine Script:
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
from pynecore import Series
|
|
126
|
+
|
|
127
|
+
price: Series[float] = close
|
|
128
|
+
previous_price = price[1] # Access previous bar's price
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### 3. Persistent Variables
|
|
132
|
+
|
|
133
|
+
Maintain state between bars with simple type annotations:
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
from pynecore import Persistent
|
|
137
|
+
|
|
138
|
+
counter: Persistent[int] = 0
|
|
139
|
+
counter += 1 # Increments with each bar
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### 4. Function Isolation
|
|
143
|
+
|
|
144
|
+
Each call to a function maintains its own isolated state:
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
def my_indicator(src, length):
|
|
148
|
+
# Each call gets its own instance of sum
|
|
149
|
+
sum: Persistent[float] = 0
|
|
150
|
+
sum += src
|
|
151
|
+
return sum / length
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Installation
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Basic installation
|
|
158
|
+
pip install pynesys-pynecore
|
|
159
|
+
|
|
160
|
+
# With CLI tools (recommended)
|
|
161
|
+
pip install pynesys-pynecore[cli]
|
|
162
|
+
|
|
163
|
+
# With all features including data providers
|
|
164
|
+
pip install pynesys-pynecore[all]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
> **Note for Windows users**: PyneCore requires timezone data that is not included in Windows by default. The `[cli]` and `[all]` installations automatically include the `tzdata` package. If you're using the basic installation and encounter timezone errors, install it manually with `pip install tzdata`.
|
|
168
|
+
|
|
169
|
+
## Getting Started
|
|
170
|
+
|
|
171
|
+
### Create a Simple Script
|
|
172
|
+
|
|
173
|
+
1. Create a file with the `@pyne` annotation:
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
"""
|
|
177
|
+
@pyne
|
|
178
|
+
"""
|
|
179
|
+
from pynecore.lib import script, close, plot
|
|
180
|
+
|
|
181
|
+
@script.indicator("My First Indicator")
|
|
182
|
+
def main():
|
|
183
|
+
# Calculate a simple moving average
|
|
184
|
+
sma_value = (close + close[1] + close[2]) / 3
|
|
185
|
+
|
|
186
|
+
# Plot the result
|
|
187
|
+
plot(sma_value, "Simple Moving Average")
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
2. Run your script with the PyneCore CLI:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# First, download some price data
|
|
194
|
+
pyne data download ccxt --symbol "BYBIT:BTC/USDT:USDT"
|
|
195
|
+
|
|
196
|
+
# Then run your script on the data
|
|
197
|
+
pyne run my_script.py ccxt_BYBIT_BTC_USDT_USDT_1D.ohlcv
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Working with Pine Script Files
|
|
201
|
+
|
|
202
|
+
PyneCore also supports running Pine Script files directly with automatic compilation:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Run a Pine Script file directly (requires PyneSys API key)
|
|
206
|
+
pyne run my_indicator.pine ccxt_BYBIT_BTC_USDT_USDT_1D.ohlcv --api-key YOUR_API_KEY
|
|
207
|
+
|
|
208
|
+
# Or compile Pine Script to Python first
|
|
209
|
+
pyne compile my_indicator.pine --api-key YOUR_API_KEY
|
|
210
|
+
|
|
211
|
+
# Then run the compiled Python file
|
|
212
|
+
pyne run my_indicator.py ccxt_BYBIT_BTC_USDT_USDT_1D.ohlcv
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
> **Note**: Pine Script compilation requires a PyneSys API key. Get yours at [pynesys.io](https://pynesys.io).
|
|
216
|
+
|
|
217
|
+
## Why Choose PyneCore?
|
|
218
|
+
|
|
219
|
+
- **Beyond TradingView Limitations**: No more platform restrictions, code size limits, or subscription fees
|
|
220
|
+
- **Python Ecosystem Access**: Use Python's data science, ML, and analysis libraries alongside trading logic
|
|
221
|
+
- **Performance & Precision**: Designed for speed and precision, the same results as Pine Script
|
|
222
|
+
- **Open Source Foundation**: The core library and runtime is open source under Apache 2.0 license
|
|
223
|
+
- **Professional Trading Tools**: Build institutional-grade systems with Pine Script simplicity
|
|
224
|
+
- **Advanced Backtesting**: Run sophisticated strategy tests outside platform constraints
|
|
225
|
+
|
|
226
|
+
## Pine Script Migration Made Easy
|
|
227
|
+
|
|
228
|
+
Have existing Pine Script code you want to run in Python? **PyneSys now offers automatic Pine
|
|
229
|
+
Script to PyneCore translation** through our [web platform](https://pynesys.io) and [Discord bot](https://discord.com/invite/jegnhtq6gy).
|
|
230
|
+
|
|
231
|
+
### 🚀 Get Started Instantly
|
|
232
|
+
- **Try for free on Discord**: Use `/pine-help` in our [Discord](https://discord.com/invite/jegnhtq6gy) for instant conversion - 3 free translations!
|
|
233
|
+
- **Full service**: Visit [pynesys.io](https://pynesys.io) for subscriptions and higher limits
|
|
234
|
+
|
|
235
|
+
### 💡 Support the Ecosystem
|
|
236
|
+
Love PyneCore and want to see it grow? Consider a **Seed subscription or higher** ($5+/mo) to support continued development:
|
|
237
|
+
- **Daily translations** of your Pine Script files (5+ per day)
|
|
238
|
+
- **Larger script support** for complex indicators and strategies
|
|
239
|
+
- **Direct contribution** to keeping PyneCore open source and advancing
|
|
240
|
+
|
|
241
|
+
*Every subscription helps maintain this free, open-source runtime and drives innovation in algorithmic trading tools.*
|
|
242
|
+
|
|
243
|
+
## Documentation & Support
|
|
244
|
+
|
|
245
|
+
- **Documentation**: [pynecore.org](https://pynecore.org/docs)
|
|
246
|
+
|
|
247
|
+
### Community
|
|
248
|
+
|
|
249
|
+
- **Discussions**: [GitHub Discussions](https://github.com/pynesys/pynecore/discussions)
|
|
250
|
+
- **Discord**: [discord.com/invite/jegnhtq6gy](https://discord.com/invite/jegnhtq6gy)
|
|
251
|
+
- **X**: [x.com/pynesys](https://x.com/pynesys)
|
|
252
|
+
- **Website**: [pynecore.org](https://pynecore.org)
|
|
253
|
+
|
|
254
|
+
## License
|
|
255
|
+
|
|
256
|
+
PyneCore is licensed under the [Apache License 2.0](LICENSE).
|
|
257
|
+
|
|
258
|
+
## Disclaimer
|
|
259
|
+
|
|
260
|
+
Pine Scriptâ„¢ is a trademark of TradingView, Inc. PyneCore is not affiliated with, endorsed by, or sponsored by TradingView. This project is an independent implementation that aims to provide compatibility with the Pine Script language concept in the Python ecosystem.
|
|
261
|
+
|
|
262
|
+
### Risk Warning
|
|
263
|
+
|
|
264
|
+
Trading involves significant risk of loss and is not suitable for all investors. The use of PyneCore does not guarantee any specific results. Past performance is not indicative of future results.
|
|
265
|
+
|
|
266
|
+
- PyneCore is provided "as is" without any warranty of any kind
|
|
267
|
+
- PyneCore is not a trading advisor and does not provide trading advice
|
|
268
|
+
- Scripts created with PyneCore should be thoroughly tested before using with real funds
|
|
269
|
+
- Users are responsible for their own trading decisions
|
|
270
|
+
- You should consult with a licensed financial advisor before making any financial decisions
|
|
271
|
+
|
|
272
|
+
By using PyneCore, you acknowledge that you are using the software at your own risk. The creators and contributors of PyneCore shall not be held liable for any financial loss or damage resulting from the use of this software.
|
|
273
|
+
|
|
274
|
+
## Commercial Support
|
|
275
|
+
|
|
276
|
+
PyneCore is part of the PyneSys ecosystem. For commercial support, custom development, or enterprise solutions:
|
|
277
|
+
|
|
278
|
+
- **Website**: [pynesys.com/contact](https://pynesys.com/contact)
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
<strong>Elevate Your Trading with the Power of Python & Pine Script</strong>
|