From c9df7ab3146345a90075fc85868529b41c589a67 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 5 Jun 2019 16:43:00 +0200 Subject: [PATCH] takePositionNow BUG --- Commons.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Commons.js b/Commons.js index a80be565b..8ebe8458a 100644 --- a/Commons.js +++ b/Commons.js @@ -861,6 +861,10 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { } } + if (phase === undefined) { + console.log('O AQUI ES') + } + if (phase.formula !== undefined) { try { stopLoss = eval(phase.formula.code); // Here is where we apply the formula given for the stop loss. @@ -969,6 +973,10 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { } } + if (phase === undefined) { + console.log('AQUI ES') + } + if (phase.formula !== undefined) { try { takeProfit = eval(phase.formula.code); // Here is where we apply the formula given for the stop loss. @@ -987,6 +995,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { if ( takePositionNow === true ) { + takePositionNow = false marketRate = candle.close; positionRate = marketRate;