...
This commit is contained in:
@@ -403,7 +403,7 @@ object AutoTradingManager {
|
||||
/**
|
||||
* 자동 발굴 루프 시작 및 Watchdog 실행
|
||||
*/
|
||||
fun startAutoDiscoveryLoop() {
|
||||
fun startAutoDiscoveryLoop(doStart : Boolean = false) {
|
||||
if (isRunning()) return
|
||||
|
||||
// 1. 기존 Watchdog이 있다면 제거 후 새로 시작
|
||||
@@ -411,7 +411,7 @@ object AutoTradingManager {
|
||||
watchdogJob = scope.launch {
|
||||
val activeTrades = DatabaseFactory.findAllMonitoringTrades()
|
||||
var now = LocalTime.now(ZoneId.of("Asia/Seoul"))
|
||||
if (activeTrades.isNotEmpty()) {
|
||||
if (doStart && activeTrades.isNotEmpty() && !KisSession.isAvailBuyTime(now)) {
|
||||
executeClosingLiquidation(activeTrades)
|
||||
}
|
||||
while (isActive) {
|
||||
|
||||
Reference in New Issue
Block a user