Skip to content

Commit d56bd12

Browse files
committed
Support for trade take profit and take loss operations
1 parent 1f37966 commit d56bd12

File tree

83 files changed

+4982
-2351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+4982
-2351
lines changed

investing_algorithm_framework/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from investing_algorithm_framework.app import App, Algorithm, AppHook
2-
from investing_algorithm_framework.app import TradingStrategy, \
3-
StatelessAction, Task
1+
from investing_algorithm_framework.app import App, Algorithm, \
2+
TradingStrategy, StatelessAction, Task, AppHook, Context
43
from investing_algorithm_framework.domain import ApiException, \
54
TradingDataType, TradingTimeFrame, OrderType, OperationalException, \
65
OrderStatus, OrderSide, TimeUnit, TimeInterval, Order, Portfolio, \
@@ -12,7 +11,7 @@
1211
RESERVED_BALANCES, APP_MODE, AppMode, DATETIME_FORMAT, \
1312
load_backtest_report, BacktestDateRange, convert_polars_to_pandas, \
1413
DateRange, get_backtest_report, DEFAULT_LOGGING_CONFIG, \
15-
BacktestReport, TradeStatus, MarketDataType
14+
BacktestReport, TradeStatus, MarketDataType, TradeRiskType
1615
from investing_algorithm_framework.infrastructure import \
1716
CCXTOrderBookMarketDataSource, CCXTOHLCVMarketDataSource, \
1817
CCXTTickerMarketDataSource, CSVOHLCVMarketDataSource, \
@@ -92,5 +91,7 @@
9291
"DEFAULT_LOGGING_CONFIG",
9392
"BacktestReport",
9493
"TradeStatus",
95-
"MarketDataType"
94+
"MarketDataType",
95+
"TradeRiskType",
96+
"Context"
9697
]

investing_algorithm_framework/app/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from investing_algorithm_framework.app.task import Task
55
from investing_algorithm_framework.app.web import create_flask_app
66
from .algorithm import Algorithm
7+
from .context import Context
78

89
__all__ = [
910
"Algorithm",
@@ -12,5 +13,6 @@
1213
"TradingStrategy",
1314
"StatelessAction",
1415
"Task",
15-
"AppHook"
16+
"AppHook",
17+
"Context",
1618
]

0 commit comments

Comments
 (0)