From bad6a31b1192864b69627a433bf91af7203427d8 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 4 Jun 2018 16:15:34 +0200 Subject: [PATCH] Interval Hanlde missing --- IndicatorBotProcessMainLoop.js | 12 +++++++++++- TradingBotProcessMainLoop.js | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) 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() {