From 54e93cbb72a37bc4dadbc397ab282b01872a8ec1 Mon Sep 17 00:00:00 2001 From: "mati108@gmail.com" <34651529+matbenitez@users.noreply.github.com> Date: Thu, 20 Sep 2018 09:44:50 -0300 Subject: [PATCH] including force logic --- Trading-Process/User.Bot.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Trading-Process/User.Bot.js b/Trading-Process/User.Bot.js index 4baecaeb2..9b4843265 100644 --- a/Trading-Process/User.Bot.js +++ b/Trading-Process/User.Bot.js @@ -139,7 +139,18 @@ exports.newUserBot = function newUserBot (bot, logger) { function businessLogic (callBack) { if (LOG_INFO === true) { logger.write(MODULE_NAME, '[INFO] start -> businessLogic -> Entering function.') } - getChannelTilt(firstTiltCheck); + // Simulation for forcing buy or sell on each execution without checking the rules + let forceBuyAndSell = false + if(forceBuyAndSell){ + if (Math.random(1) <= 0.5){ + createBuyPosition(callBack); + }else{ + createSellPosition(callBack); + } + }else{ + // Here we really check the bot business logic + getChannelTilt(firstTiltCheck); + } function firstTiltCheck (err, channelTilt) { try {