LIVE and BACKTEST mode working

This commit is contained in:
Luis Fernando Molina committed 2018-04-27 10:21:53 +02:00
1 parent 2ad8ccb812
commit 6cc0e83d65
3 files changed
+3 -1

No files matched your search

Binary file not shown.
+2
View File
@@ -111,6 +111,7 @@
if (bot.processDatetime.valueOf() >= candle.begin && bot.processDatetime.valueOf() < candle.end) {
marketRate = (candle.open + candle.close) / 2;
marketRate = Number(marketRate.toFixed(8));
/* The Backtest Mode simulates that every trade posted is executed.
In order to do this, we will take all open orders from the context and create a trades array similar to the one returned by the Exchange. */
@@ -141,6 +142,7 @@
};
marketRate = candle.close;
marketRate = Number(marketRate.toFixed(8));
/*
Now we verify that this candle is not too old. Lets say no more than 2 minutes old. This could happen if the datasets for
+1 -1
View File
@@ -337,7 +337,7 @@ for (let p = 0; p < global.PLATFORM_CONFIG.executionList.length; p++) {
processConfig.normalWaitTime = processConfig.startMode.timePeriod.waitTime;
processConfig.retryWaitTime = processConfig.startMode.timePeriod.waitTime;
if (processConfig.startMode.noTime.resumeExecution === "true") {
if (processConfig.startMode.timePeriod.resumeExecution === "true") {
botConfig.hasTheBotJustStarted = false;
} else {
botConfig.hasTheBotJustStarted = true;