trigerr 0.7.6__tar.gz → 0.7.7__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.
- {trigerr-0.7.6/trigerr.egg-info → trigerr-0.7.7}/PKG-INFO +1 -1
- trigerr-0.7.7/tests/test_order_records_say_what_is_left.py +34 -0
- trigerr-0.7.7/tests/test_trade_closes_when_flat.py +94 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/__init__.py +1 -1
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/orders/orders_utils.py +10 -1
- {trigerr-0.7.6 → trigerr-0.7.7/trigerr.egg-info}/PKG-INFO +1 -1
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr.egg-info/SOURCES.txt +2 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/LICENSE +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/README.md +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/pyproject.toml +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/setup.cfg +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_brokerage.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_bt_orders.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_capital_used.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_crypto_utils.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_data_market.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_exit_mutex.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_historical_client_config.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_ledger_contract.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_live_orders_correlation.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_live_orders_time_limits.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_live_record_saves.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_logging_utils.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_orders_schema.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_package.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_positions_with_oms.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_reference_symbol_details.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_schema_parity.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/tests/test_symbols.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/config.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/crypto_utils.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/custom_indicators.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/data/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/data/historical.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/data/market.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/data/reference.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/bt_state.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/candle_transforms.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/catalog.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/clock.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/compiler.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/data_feeds.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/execution_core.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/exit_engine.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/expressions.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/instrument.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/point_in_time.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/position_sizing.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/framework/tick_sources.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/jobs.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/orders/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/orders/backtest.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/orders/live.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/orders/positions.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/orders/virtual.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/symbols.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/__main__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/_typing.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/candle/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/candle/cdl_doji.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/candle/cdl_inside.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/candle/cdl_pattern.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/candle/cdl_z.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/candle/ha.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/core.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/custom.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/cycle/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/cycle/ebsw.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/cycle/reflex.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/ma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/maps.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/ao.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/apo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/bias.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/bop.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/brar.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/cci.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/cfo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/cg.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/cmo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/coppock.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/crsi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/cti.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/dm.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/er.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/eri.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/exhc.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/fisher.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/inertia.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/kdj.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/kst.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/macd.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/mom.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/pgo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/ppo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/psl.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/qqe.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/roc.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/rsi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/rsx.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/rvgi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/slope.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/smc.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/smi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/squeeze.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/squeeze_pro.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/stc.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/stoch.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/stochf.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/stochrsi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/tmo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/trix.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/tsi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/uo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/momentum/willr.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/alligator.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/alma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/dema.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/ema.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/fwma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/hilo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/hl2.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/hlc3.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/hma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/hwma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/ichimoku.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/jma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/kama.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/linreg.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/mama.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/mcgd.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/midpoint.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/midprice.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/ohlc4.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/pivots.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/pwma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/rma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/sinwma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/sma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/smma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/ssf.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/ssf3.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/supertrend.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/swma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/t3.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/tema.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/trima.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/vidya.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/wcp.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/wma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/overlap/zlma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/performance/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/performance/drawdown.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/performance/log_return.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/performance/percent_return.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/py.typed +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/entropy.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/kurtosis.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/mad.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/median.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/quantile.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/skew.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/stdev.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/tos_stdevall.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/variance.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/statistics/zscore.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/adx.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/alphatrend.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/amat.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/aroon.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/chop.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/cksp.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/decay.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/decreasing.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/dpo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/ht_trendline.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/increasing.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/long_run.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/psar.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/qstick.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/rwi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/short_run.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/trendflex.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/ttm_trend.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/vhf.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/vortex.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/trend/zigzag.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/_candles.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/_core.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/_math.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/_numba.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/_signals.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/_study.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/_time.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/utils/_validate.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/aberration.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/accbands.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/atr.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/atrts.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/bbands.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/chandelier_exit.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/donchian.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/hwc.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/kc.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/massi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/natr.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/pdist.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/rvi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/thermo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/true_range.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volatility/ui.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/__init__.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/ad.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/adosc.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/aobv.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/cmf.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/efi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/eom.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/kvo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/mfi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/nvi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/obv.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/pvi.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/pvo.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/pvol.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/pvr.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/pvt.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/tsv.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/vhm.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/vp.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/vwap.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/ta/volume/vwma.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr/utils.py +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr.egg-info/dependency_links.txt +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr.egg-info/requires.txt +0 -0
- {trigerr-0.7.6 → trigerr-0.7.7}/trigerr.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Every call inside the SDK that writes an order record says what is left of the position after it.
|
|
3
|
+
|
|
4
|
+
quantity_left is what check_open_orders reads to say a position is open or closed, and convert_to_trades ends a trade on an exit
|
|
5
|
+
that leaves nothing open. The writers (place_vt_order, place_bt_order, place_bt_leg_order, save_lt_order) default quantity_left to 0,
|
|
6
|
+
so a call that forgets it would record a partial exit as the last one. Today every call passes it; this keeps it so. A call that
|
|
7
|
+
spreads **kwargs is not checked: it cannot be read.
|
|
8
|
+
|
|
9
|
+
Offline: reads source files only.
|
|
10
|
+
"""
|
|
11
|
+
import ast
|
|
12
|
+
import pathlib
|
|
13
|
+
|
|
14
|
+
import trigerr
|
|
15
|
+
|
|
16
|
+
RECORD_WRITERS = {"place_vt_order", "place_bt_order", "place_bt_leg_order", "save_lt_order"}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def calls_without_quantity_left():
|
|
20
|
+
package = pathlib.Path(trigerr.__file__).parent
|
|
21
|
+
found = []
|
|
22
|
+
for path in package.rglob("*.py"):
|
|
23
|
+
for node in ast.walk(ast.parse(path.read_text())):
|
|
24
|
+
if not isinstance(node, ast.Call):
|
|
25
|
+
continue
|
|
26
|
+
name = node.func.id if isinstance(node.func, ast.Name) else node.func.attr if isinstance(node.func, ast.Attribute) else None
|
|
27
|
+
keywords = {keyword.arg for keyword in node.keywords}
|
|
28
|
+
if name in RECORD_WRITERS and "quantity_left" not in keywords and None not in keywords:
|
|
29
|
+
found.append(f"{path.relative_to(package)}:{node.lineno} {name}")
|
|
30
|
+
return found
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_every_call_that_writes_an_order_record_passes_quantity_left():
|
|
34
|
+
assert calls_without_quantity_left() == []
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""
|
|
2
|
+
A trade ends when an exit leaves nothing open, as well as when the exit carries one of the policy's last-exit names.
|
|
3
|
+
|
|
4
|
+
The lots of a position are split between the targets in whole numbers and what is left over goes to the first target, so with few
|
|
5
|
+
lots (one lot, or a big share at the first target) the first target sells the whole position and the exits that were to follow get
|
|
6
|
+
nothing. convert_to_trades used to end a trade only on a named last exit (order_exit_levels), so such a trade was never closed and
|
|
7
|
+
its record was lost (the strategies' `convert_to_trades(...)[-1]` raised IndexError). quantity_left is what check_open_orders reads
|
|
8
|
+
to say a position is closed, so an exit whose quantity_left is zero ends the trade too.
|
|
9
|
+
|
|
10
|
+
Offline: no Mongo, no Redis, no network.
|
|
11
|
+
"""
|
|
12
|
+
import datetime
|
|
13
|
+
|
|
14
|
+
from trigerr.orders import orders_utils
|
|
15
|
+
|
|
16
|
+
LEVELS = ["SL", "TSL", "LSL", "MARKETEXIT", "T2"] # strat_crb's T1|T2: T1 is not a last exit
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def entry_order(quantity, **extra):
|
|
20
|
+
order = {
|
|
21
|
+
"symbol": "NIFTY_22600_PE", "data_key": "UPSTOX:XNSE:NIFTY_22600_PE", "group_id": "r1:1",
|
|
22
|
+
"trade_action": "ENTRY", "date": datetime.datetime(2026, 10, 22), "day": "Thursday",
|
|
23
|
+
"order_timestamp": "2026-10-22 13:38:00", "trigger_price": 100.0, "quantity": quantity, "quantity_left": quantity,
|
|
24
|
+
"lot_size": 65, "investment": 100000, "position_type": "LONG", "exchange": "NFO", "market": "IN", "order_type": "MARKET",
|
|
25
|
+
"user_id": "507f1f77bcf86cd799439011", "strategy_id": "507f1f77bcf86cd799439012", "request_id": "507f1f77bcf86cd799439013",
|
|
26
|
+
}
|
|
27
|
+
order.update(extra)
|
|
28
|
+
return order
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def exit_order(exit_type, quantity, left, price, minute, **extra):
|
|
32
|
+
order = {
|
|
33
|
+
"symbol": "NIFTY_22600_PE", "trade_action": "EXIT", "exit_type": exit_type, "quantity": quantity, "quantity_left": left,
|
|
34
|
+
"order_timestamp": f"2026-10-22 13:{minute}:00", "trigger_price": price, "position_type": "LONG", "order_type": "MARKET",
|
|
35
|
+
}
|
|
36
|
+
order.update(extra)
|
|
37
|
+
return order
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def convert(orders, levels=LEVELS):
|
|
41
|
+
return orders_utils.convert_to_trades(orders_list=orders, market_type="options", order_exit_levels=levels, mode="vt", broker="zerodha")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_a_target_that_sells_the_whole_position_ends_the_trade():
|
|
45
|
+
(trade,) = convert([entry_order(1), exit_order("T1", 1, 0, 110.0, 50)])
|
|
46
|
+
assert (trade["exit_type"], trade["exit_price"], trade["exit_time"]) == ("T1", 110.0, "2026-10-22 13:50:00")
|
|
47
|
+
assert trade["points"] == 10 and trade["pnl"] == 10 * 1 * 65
|
|
48
|
+
assert trade["brokerage"] > 0 and trade["net_pnl"] > 0
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def test_a_target_that_sells_part_of_the_position_does_not_end_it_and_the_last_exit_does_as_before():
|
|
52
|
+
orders = [entry_order(44), exit_order("T1", 22, 22, 110.0, 50)]
|
|
53
|
+
assert convert(orders) == []
|
|
54
|
+
|
|
55
|
+
(trade,) = convert(orders + [exit_order("SL", 22, 0, 95.0, 55)])
|
|
56
|
+
assert trade["exit_type"] == "T1|SL" and trade["exit_price"] == 95.0
|
|
57
|
+
assert trade["points"] == 10 + -5 and trade["pnl"] == (22 * 10 - 22 * 5) * 65
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def test_two_trades_in_one_list_each_end_where_they_ran_out():
|
|
61
|
+
first = [entry_order(1), exit_order("T1", 1, 0, 110.0, 50)]
|
|
62
|
+
second = [entry_order(44, order_timestamp="2026-10-22 14:00:00"), exit_order("SL", 44, 0, 95.0, 20, order_timestamp="2026-10-22 14:20:00")]
|
|
63
|
+
trades = convert(first + second)
|
|
64
|
+
assert [(trade["exit_type"], trade["quantity"]) for trade in trades] == [("T1", 1), ("SL", 44)]
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def test_a_named_last_exit_still_ends_the_trade_whatever_it_says_is_left():
|
|
68
|
+
(trade,) = convert([entry_order(44), exit_order("SL", 22, 22, 95.0, 50)])
|
|
69
|
+
assert trade["exit_type"] == "SL"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def test_an_exit_that_does_not_say_what_is_left_is_judged_by_its_name_alone():
|
|
73
|
+
orders = [entry_order(1), exit_order("T1", 1, 0, 110.0, 50)]
|
|
74
|
+
del orders[1]["quantity_left"]
|
|
75
|
+
assert convert(orders) == []
|
|
76
|
+
assert len(convert(orders + [exit_order("SL", 0, 0, 95.0, 55)])) == 1
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def test_a_part_fill_does_not_end_the_trade_and_the_fill_that_empties_it_does():
|
|
80
|
+
""" The position manager records a fill that covers only part of an exit as <name>_PART, so the real name closes the trade. """
|
|
81
|
+
part = exit_order("T2_PART", 10, 34, 108.0, 50)
|
|
82
|
+
rest = exit_order("T2", 34, 0, 108.0, 51)
|
|
83
|
+
assert convert([entry_order(44), part]) == []
|
|
84
|
+
(trade,) = convert([entry_order(44), part, rest])
|
|
85
|
+
assert trade["exit_type"] == "T2_PART|T2"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def test_a_list_closed_by_a_single_manual_level_still_ends_on_the_manual_exit():
|
|
89
|
+
""" orders-api's exit_position converts with order_exit_levels=["MANUAL"] and takes the last trade: that must stay the manual one,
|
|
90
|
+
with earlier trades of the day in the list. """
|
|
91
|
+
earlier = [entry_order(44), exit_order("SL", 44, 0, 95.0, 10)]
|
|
92
|
+
manual = [entry_order(44, order_timestamp="2026-10-22 14:00:00"), exit_order("MANUAL", 44, 0, 104.0, 30, order_timestamp="2026-10-22 14:30:00")]
|
|
93
|
+
trades = convert(earlier + manual, levels=["MANUAL"])
|
|
94
|
+
assert trades[-1]["exit_type"] == "MANUAL" and trades[-1]["exit_price"] == 104.0
|
|
@@ -185,6 +185,15 @@ def capital_used(order, market_type):
|
|
|
185
185
|
return round(order["trigger_price"] * units / (order.get("leverage") or 1), 2)
|
|
186
186
|
|
|
187
187
|
|
|
188
|
+
def closes_trade(order, order_exit_levels):
|
|
189
|
+
""" True when this exit order ends its trade: its name is one of the policy's last exits (order_exit_levels), or it leaves nothing
|
|
190
|
+
open. quantity_left is what check_open_orders reads to say a position is closed, so a target that sells the whole position (the lots
|
|
191
|
+
split in whole numbers, so with few lots the rest rounds to nothing) ends the trade the way a named last exit does. Naming the last
|
|
192
|
+
exits alone left such a trade without a record. An order that carries no quantity_left is judged by its name only. """
|
|
193
|
+
left = order.get("quantity_left")
|
|
194
|
+
return order["exit_type"] in order_exit_levels or (left is not None and left <= 0)
|
|
195
|
+
|
|
196
|
+
|
|
188
197
|
def convert_to_trades(orders_list, market_type, order_exit_levels, mode, broker, holding_type="intraday"):
|
|
189
198
|
"""Function to convert Orders to Trades """
|
|
190
199
|
try:
|
|
@@ -269,7 +278,7 @@ def convert_to_trades(orders_list, market_type, order_exit_levels, mode, broker,
|
|
|
269
278
|
else:
|
|
270
279
|
trade_dict["exit_type"] = order["exit_type"]
|
|
271
280
|
|
|
272
|
-
if order
|
|
281
|
+
if closes_trade(order, order_exit_levels):
|
|
273
282
|
trade_dict["exit_time"] = order["order_timestamp"]
|
|
274
283
|
trade_dict["exit_price"] = order["trigger_price"]
|
|
275
284
|
tmp_market_type = "equity" if market_type == "spot" else market_type
|
|
@@ -13,12 +13,14 @@ tests/test_live_orders_correlation.py
|
|
|
13
13
|
tests/test_live_orders_time_limits.py
|
|
14
14
|
tests/test_live_record_saves.py
|
|
15
15
|
tests/test_logging_utils.py
|
|
16
|
+
tests/test_order_records_say_what_is_left.py
|
|
16
17
|
tests/test_orders_schema.py
|
|
17
18
|
tests/test_package.py
|
|
18
19
|
tests/test_positions_with_oms.py
|
|
19
20
|
tests/test_reference_symbol_details.py
|
|
20
21
|
tests/test_schema_parity.py
|
|
21
22
|
tests/test_symbols.py
|
|
23
|
+
tests/test_trade_closes_when_flat.py
|
|
22
24
|
trigerr/__init__.py
|
|
23
25
|
trigerr/config.py
|
|
24
26
|
trigerr/crypto_utils.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|