diff --git a/IndicatorBotProcessMainLoop.js b/IndicatorBotProcessMainLoop.js index 0a7e24b80..789269f0a 100644 --- a/IndicatorBotProcessMainLoop.js +++ b/IndicatorBotProcessMainLoop.js @@ -143,7 +143,17 @@ bot.eventHandler.raiseEvent("Close Log File"); - loop(); + let intervalHandle; + + if (bot.runAtFixedInterval === true) { + + intervalHandle = setInterval(loop, bot.fixedInterval); + + } else { + + loop(); + + } function loop() { diff --git a/TradingBotProcessMainLoop.js b/TradingBotProcessMainLoop.js index dc80d799f..ae4cb431d 100644 --- a/TradingBotProcessMainLoop.js +++ b/TradingBotProcessMainLoop.js @@ -144,7 +144,17 @@ bot.eventHandler.raiseEvent("Close Log File"); - loop(); + let intervalHandle; + + if (bot.runAtFixedInterval === true) { + + intervalHandle = setInterval(loop, bot.fixedInterval); + + } else { + + loop(); + + } function loop() {