diff --git a/Commons.js b/Commons.js index 115012afd..90f83d756 100644 --- a/Commons.js +++ b/Commons.js @@ -1176,6 +1176,26 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { "") } + let strategyStageNumber + switch (strategyStage) { + case 'Trigger Stage': { + strategyStageNumber = 1 + break + } + case 'Open Stage': { + strategyStageNumber = 2 + break + } + case 'Manage Stage': { + strategyStageNumber = 3 + break + } + case 'Close Stage': { + strategyStageNumber = 4 + break + } + } + simulationRecord = { begin: candle.begin, end: candle.end, @@ -1198,7 +1218,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { positionRate: positionRate, lastProfitPercent: lastProfitPercent, strategy: currentStrategyIndex, - strategyStage: strategyStage, + strategyStageNumber: strategyStageNumber, takeProfit: takeProfit, stopLossPhase: stopLossPhase, takeProfitPhase: takeProfitPhase, @@ -1215,7 +1235,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { /* Prepare the information for the Conditions File */ conditionsArrayRecord.push(currentStrategyIndex); - conditionsArrayRecord.push(strategyStage); + conditionsArrayRecord.push(strategyStageNumber); conditionsArrayRecord.push(stopLossPhase); conditionsArrayRecord.push(takeProfitPhase); conditionsArrayRecord.push(conditionsArrayValues); diff --git a/Multi-Period-Daily/User.Bot.js b/Multi-Period-Daily/User.Bot.js index d3fef5d04..68ce0df4e 100644 --- a/Multi-Period-Daily/User.Bot.js +++ b/Multi-Period-Daily/User.Bot.js @@ -162,7 +162,7 @@ record.positionRate + "," + record.lastProfitPercent + "," + record.strategy + "," + - '"' + record.strategyStage + '"' + "," + + record.strategyStageNumber + "," + record.takeProfit + "," + record.stopLossPhase + "," + record.takeProfitPhase + "," + diff --git a/Multi-Period-Market/User.Bot.js b/Multi-Period-Market/User.Bot.js index 7d9dc8670..ac5a13578 100644 --- a/Multi-Period-Market/User.Bot.js +++ b/Multi-Period-Market/User.Bot.js @@ -160,7 +160,7 @@ record.positionRate + "," + record.lastProfitPercent + "," + record.strategy + "," + - '"' + record.strategyStage + '"' + "," + + record.strategyStageNumber + "," + record.takeProfit + "," + record.stopLossPhase + "," + record.takeProfitPhase + "," +