Skip to content

Commit

Permalink
can use 3min, 5min, 10min candle info for UpbitDataProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
msaltnet committed Aug 6, 2023
1 parent c3728b4 commit 40657f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion smtm/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def main(self):
data_provider = BithumbDataProvider(currency=self.currency)
trader = BithumbTrader(currency=self.currency, budget=self.budget)
else:
data_provider = UpbitDataProvider(currency=self.currency)
data_provider = UpbitDataProvider(currency=self.currency, interval=Config.candle_interval)
trader = UpbitTrader(currency=self.currency, budget=self.budget)

self.operator.initialize(
Expand Down
3 changes: 2 additions & 1 deletion smtm/jpt_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Jupyter notebook에서 사용하기 좋게 만든 자동 거래 시스템 컨트롤 모듈
"""
from IPython.display import Image, display
from .config import Config
from .log_manager import LogManager
from .analyzer import Analyzer
from .upbit_trader import UpbitTrader
Expand Down Expand Up @@ -51,7 +52,7 @@ def initialize(self, interval=10, strategy=0, budget=50000, is_bithumb=False):
currency=self.market, commission_ratio=0.0005, budget=self.budget
)
else:
data_provider = UpbitDataProvider(currency=self.market)
data_provider = UpbitDataProvider(currency=self.market, interval=Config.candle_interval)
trader = UpbitTrader(currency=self.market, commission_ratio=0.0005, budget=self.budget)

self.operator.initialize(
Expand Down
4 changes: 3 additions & 1 deletion smtm/telegram_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ def _on_start_step3(self, command):
not_ok = True
if command.upper() in ["1. UPBIT", "1", "UPBIT"]:
if self.currency in self.UPBIT_CURRENCY:
self.data_provider = UpbitDataProvider(currency=self.currency)
self.data_provider = UpbitDataProvider(
currency=self.currency, interval=Config.candle_interval
)
if self.is_demo:
self.trader = DemoTrader(budget=self.budget, currency=self.currency)
else:
Expand Down

0 comments on commit 40657f8

Please sign in to comment.