From 4d3c9ce4abda94b7d7e773eb5d68ad73bf11a454 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 6 Oct 2019 11:39:52 +0200 Subject: [PATCH] Tyding up --- Session.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Session.js b/Session.js index 07e526339..9236dc6e3 100644 --- a/Session.js +++ b/Session.js @@ -36,6 +36,7 @@ /* We are going to run the Definition comming at the event. */ bot.DEFINITION = JSON.parse(message.event.definition) bot.SESSION = JSON.parse(message.event.session) + bot.UI_CURRENT_VALUES = message.event.uiCurrentValues setValuesToUse(message) @@ -113,7 +114,7 @@ minimumBalanceB: 0, maximumBalanceA: 0.002, maximumBalanceB: 0, - timePeriod: bot.DEFINITION.uiCurrentValues.timePeriod, + timePeriod: bot.UI_CURRENT_VALUES.timePeriod, slippage: { positionRate: 0, stopLoss: 0, @@ -133,7 +134,7 @@ const ONE_YEAR_IN_MILISECONDS = 365 * 24 * 60 * 60 * 1000 switch (bot.SESSION.type) { case 'Backtesting Session': { - bot.VALUES_TO_USE.timeRange.initialDatetime = new Date(bot.DEFINITION.uiCurrentValues.initialDatetime) + bot.VALUES_TO_USE.timeRange.initialDatetime = new Date(bot.UI_CURRENT_VALUES.initialDatetime) bot.VALUES_TO_USE.timeRange.finalDatetime = new Date() break }