From fe43a621e4027998e82b157be0cc47a047348cee Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Jul 2020 11:12:42 +0200 Subject: [PATCH] Key Reference --- LowFrequencyTrading/TradingSystem.js | 3 +-- Root.js | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/LowFrequencyTrading/TradingSystem.js b/LowFrequencyTrading/TradingSystem.js index 14b9d34d5..6ca9b3852 100644 --- a/LowFrequencyTrading/TradingSystem.js +++ b/LowFrequencyTrading/TradingSystem.js @@ -54,8 +54,7 @@ exports.newTradingSystem = function newTradingSystem(bot, logger, tradingEngineM snapshotsModule.initialize() tradingExecutionModule.initialize() - /* Adding Functions to Trading System definition */ - + /* Adding Functions used elsewhere to Trading System definition */ tradingSystem.checkConditions = function (situation, passed) { /* Given a Situation, we check if all children conditions are true or not */ for (let m = 0; m < situation.conditions.length; m++) { diff --git a/Root.js b/Root.js index be3cc5da9..5349465ce 100644 --- a/Root.js +++ b/Root.js @@ -227,9 +227,9 @@ if (botConfig.processNode) { if (botConfig.processNode.marketReference) { - if (botConfig.processNode.marketReference.keyInstance !== undefined) { - if (botConfig.processNode.marketReference.keyInstance.referenceParent !== undefined) { - let key = botConfig.processNode.marketReference.keyInstance.referenceParent + if (botConfig.processNode.marketReference.keyReference !== undefined) { + if (botConfig.processNode.marketReference.keyReference.referenceParent !== undefined) { + let key = botConfig.processNode.marketReference.keyReference.referenceParent botConfig.KEY = key.config.codeName botConfig.SECRET = key.config.secret