-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cac1ff0
commit d7550bc
Showing
17 changed files
with
152,736 additions
and
152,556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
from quick_trade.trading_sys import ExampleStrategies | ||
from quick_trade.plots import make_trader_figure, TraderGraph | ||
from custom_client import BinanceTradingClient | ||
|
||
class Portfolio(ExampleStrategies): | ||
def DP2(self, sl=400, tp=3000): | ||
self.DP_2_strategy(tp=sl, | ||
sl=tp) | ||
self.inverse_strategy() | ||
|
||
def DP2I(self, sl=400, tp=3000): | ||
self.DP_2_strategy(tp=tp, | ||
sl=sl) | ||
|
||
def BB(self, window=80, dev=1): | ||
self.strategy_bollinger_breakout(window=window, | ||
window_dev=dev) | ||
|
||
def SMA3(self, s=1500, m=400, f=60): | ||
self.strategy_3_sma(fast=f, | ||
slow=s, | ||
mid=m) | ||
|
||
|
||
timeframe = '15m' | ||
|
||
figure = make_trader_figure(height=700, width=1400, row_heights=[1, 20, 1]) | ||
graph = TraderGraph(figure=figure) | ||
client = BinanceTradingClient() | ||
|
||
trader = Portfolio(interval=timeframe) | ||
|
||
trader.connect_graph(graph) | ||
trader.log_deposit() | ||
trader.log_data() | ||
trader.set_client(client) | ||
|
||
config = { | ||
'BTC/USDT': [ | ||
{'DP2': {}}, | ||
], | ||
'ETH/USDT': [ | ||
{'DP2': {}}, | ||
], | ||
'SOL/USDT': [ | ||
{'DP2': dict(sl=1000)}, | ||
{'DP2': dict(sl=700)}, | ||
] | ||
} | ||
trader.multi_backtest(test_config=config, deposit=300, commission=0.075) |
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from quick_trade.trading_sys import ExampleStrategies | ||
from quick_trade.plots import make_trader_figure, TraderGraph | ||
from custom_client import BinanceTradingClient | ||
|
||
ticker = 'SOL/BTC' | ||
timeframe = '1h' | ||
|
||
figure = make_trader_figure(height=600, width=900) | ||
graph = TraderGraph(figure=figure) | ||
client = BinanceTradingClient() | ||
|
||
df = client.get_data_historical(ticker=ticker, interval=timeframe) | ||
|
||
trader = ExampleStrategies(ticker=ticker, interval=timeframe, df=df) | ||
|
||
trader.connect_graph(graph) | ||
|
||
trader.strategy_price_channel(100, 100, 1) | ||
trader.backtest(deposit=300, commission=0.075) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.