refactoring sellAmount

This commit is contained in:
Luis Fernando Molina committed 2019-06-04 17:39:52 +02:00
1 parent 1615815dd2
commit 24dedbf40d
3 files changed
+6 -6

No files matched your search

+4 -4
View File
@@ -101,7 +101,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) {
/* Building records */
let positionRate = 0;
let sellAmount = 0;
let positionSize = 0;
let sellInstant;
let previousBalanceAssetA = 0;
@@ -745,7 +745,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) {
marketRate = candle.close;
positionRate = marketRate;
sellAmount = balanceAssetA;
positionSize = balanceAssetA;
stopLoss = positionRate + positionRate * 1 / 100;
previousStopLoss = stopLoss;
@@ -845,7 +845,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) {
strategyNumber = 0;
stopLoss = 0;
positionRate = 0;
sellAmount = 0;
positionSize = 0;
sellInstant = undefined;
takeProfit = 0;
strategyPhase = 0;
@@ -957,7 +957,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) {
stopLossPhase: stopLossPhase,
takeProfitPhase: takeProfitPhase,
orderRecord: orderRecord,
sellAmount: sellAmount
positionSize: positionSize
}
recordsArray.push(simulationRecord);
+1 -1
View File
@@ -167,7 +167,7 @@
record.stopLossPhase + "," +
record.takeProfitPhase + "," +
JSON.stringify(record.orderRecord) + "," +
record.sellAmount + "]";
record.positionSize + "]";
if (separator === "") { separator = ","; }
+1 -1
View File
@@ -166,7 +166,7 @@
record.takeProfitPhase + "," +
JSON.stringify(record.orderRecord) + "," +
record.sellAmount + "]";
record.positionSize + "]";
if (separator === "") { separator = ","; }