Autotrader

Latest version: v1.1.2

Safety actively analyzes 714792 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 6

0.6.5

Features
- General exception handling of bot updates in continuous mode

Fixes
- Link to documentation and website

0.6.4

Fixes
- Autodetect divergence order of operations, timeseries indexing
- Specification and handling of 'home_currency' (provided through `configure`)
- Calculation of home conversion factors, and handling of oanda quote data

0.6.3

Features
- Portfolio strategies: include `"PORTFOLIO": True` in your strategy
configuration to signal that the strategy is a portfolio-based strategy.
Doing so, data for each instrument in the watchlist will be passed to the
strategy, allowing a single strategy to control multiple instruments at
once, as in a portfolio. Currently supported for continuous mode only.
- Strategy configuration key `PARAMETERS` now optional.
- Autodetection of multiple instrument backtests for plotting.
- Option to select chart type (standard or portfolio) for single instrument
backtests, via `AutoTrader.plot_settings()`.
- Option to specify `base_size` when creating an `Order`. This refers to the
trade size calculated using the base currency, pre-conversion using the
account's home currency (particularly useful for Forex traders).
- `modify` order types are now supported by the Oanda broker API, allowing
a trader to change the take profit or stop loss attached to an open trade.

Fixes
- generalised `get_size` method of broker utilities to give correct results
for non-FX instruments (in this case, SL price must be provided rather than
SL distance).

0.6.2

Features
- Named arguments for strategy initialisation: strategies must be constructed
from named arguments "parameters", "data" and "instrument". Additionally,
"broker" and "broker_utils", when including broker access, and "data_stream"
when including data stream access. This change was made for disambiguation of
input arguments.
- Improvements to `AutoPlot`, including autoscaling of indicator figures
and backtest account history
- Addition of `BacktestResults` class, improving readability and accessibility
of backtest results.

0.6.1

Features
- Simpler imports: for example, `AutoTrader` can be imported
using `from autotrader import AutoTrader`, instead of
`from autotrader.autotrader import AutoTrader`. Likewise for `AutoPlot`,
`GetData`, and trade objects (`Order`, `Trade`, `Position`).


Fixes
- Handling of close and reduce order types in `autobot`
- Assign UTC timezone to data after downloading from yfinance
- Fetch current positions from virtual broker after updating with latest
data.
- Duplicate bar checking method in `autobot`

0.6.0

- Interactive Brokers is now supported.
- Improvements to public broker methods for clarity.
- Comprehensive docstrings and type hints added.
- Distinction of broker and feed, allowing specification of broker and feed
separately.
- New broker template directory added.
- All AutoTrader attributes have been made private to avoid confusion - the
configuration methods should be used exclusively to set the attributes.
This also clarifies and promotes visibility of public methods.
- New method `get_bots_deployed` added to AutoTrader.
- Project heirarchy: note changes in location of `autodata`, `indicators` and
other modules previously in the `lib/` directory.
- Deprecated `help` and `usage` methods of AutoTrader (replaced by in-code
docstrings).
- AutoTrader method `add_strategy` now accepts strategy classes as input
argument, to directly provide strategy class objects.
- Broker public method name changes: `cancel_pending_order` to `cancel_order`,
`get_pending_orders` to `get_orders`, `get_open_trades` to `get_trades`,
`get_open_positions` to `get_positions`.
- Broker public method deleted: `get_cancelled_orders` - functionality
available using `get_orders` method with `order_status = 'cancelled'`.
- To facilitate strategies built with prior autotrader versions, the previous
format of signal dictionaries from strategy modules is still supported.
Support for this format will be phased out in favour of the new `Order` and
`Trade` objects (found in `autotrader.brokers.trading` module).
- For new Order, Trade and Position objects, support for legacy code is
included via `as_dict` methods, to convert class objects to dictionaries.
- AutoTrader demo repository has been updated to reflect the changes above.
- Option to include/exclude positions from broker when updating strategy.
- Distinction of order/trade size and direction; size is now an absolute value
representing the number of units to be traded, while direction specifies
if the trade is long or short.
- Strategy module: method `generate_signal` is passed named arguments
`i` and `current_position`.
- Continuous mode: single instantiation, iteration by timestamp
- AutoStream deprecated: if using streamed data, local data file paths should
be provided using the `add_data` method.
- Abstracted data update method into `DataStream` class
(within `autotrader.utilities` module) to allow custom data pipelines
- Ability to trade multiple contracts on an underlying asset (continuous
mode only)
- Ability to use virtual broker in livetrade mode


Older Versions
For a changelog of versions prior to `v0.6.0`, please refer to the
[older versions](old-changelog) changelog.

Page 6 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.