From dbaf0b3e7d9df83cface409579a5522492319c61 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 4 Jun 2019 22:00:44 +0200 Subject: [PATCH] Checking if Stop or Take Profit were hit --- Commons.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Commons.js b/Commons.js index 736a2c286..b09d30b06 100644 --- a/Commons.js +++ b/Commons.js @@ -482,7 +482,10 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { /* Checking if Stop or Take Profit were hit */ - if (strategyStage === 'Manage Stage') { + if ( + strategyStage === 'Open Stage' || + strategyStage === 'Manage Stage' + ) { /* Checking what happened since the last execution. We need to know if the Stop Loss or our Take Profit were hit. */ @@ -547,7 +550,10 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { /* Stop Loss Management */ - if (strategyStage === 'Manage Stage') { + if ( + strategyStage === 'Open Stage' || + strategyStage === 'Manage Stage' + ) { checkStopPhases() calculateStopLoss(); @@ -604,7 +610,10 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { /* Take Profit Management */ - if (strategyStage === 'Manage Stage') { + if ( + strategyStage === 'Open Stage' || + strategyStage === 'Manage Stage' + ) { checkTakeProfitPhases(); calculateTakeProfit();