Using Stage Number instead of text

This commit is contained in:
Luis Fernando Molina committed 2019-06-05 19:20:03 +02:00
1 parent bf195f65a4
commit c3f4535010
3 files changed
+24 -4

No files matched your search

+22 -2
View File
@@ -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);
+1 -1
View File
@@ -162,7 +162,7 @@
record.positionRate + "," +
record.lastProfitPercent + "," +
record.strategy + "," +
'"' + record.strategyStage + '"' + "," +
record.strategyStageNumber + "," +
record.takeProfit + "," +
record.stopLossPhase + "," +
record.takeProfitPhase + "," +
+1 -1
View File
@@ -160,7 +160,7 @@
record.positionRate + "," +
record.lastProfitPercent + "," +
record.strategy + "," +
'"' + record.strategyStage + '"' + "," +
record.strategyStageNumber + "," +
record.takeProfit + "," +
record.stopLossPhase + "," +
record.takeProfitPhase + "," +