more fixes

This commit is contained in:
Luis Fernando Molina committed 2020-03-21 13:27:10 +01:00
1 parent c0659a79fd
commit e4cc141436
4 files changed
+23 -22

No files matched your search

+1 -1
View File
@@ -130,7 +130,7 @@ function newCodeEditor () {
thisObject.container.frame.position.y = 0
thisObject.container.frame.width = thisObject.container.frame.radius * 1.8 * 1.5
thisObject.container.frame.height = thisObject.container.frame.radius * 1 * 1.5
thisObject.container.frame.height = thisObject.container.frame.radius * 1 * 1.4
let textAreaPosition = {
x: 0 - thisObject.container.frame.width / 2,
@@ -658,9 +658,9 @@
candle.begin = candlesFile[i][4];
candle.end = candlesFile[i][5];
if (candle.open > candle.close) { candle.direction = 'down'; }
if (candle.open < candle.close) { candle.direction = 'up'; }
if (candle.open === candle.close) { candle.direction = 'side'; }
if (candle.open > candle.close) { candle.direction = 'Down'; }
if (candle.open < candle.close) { candle.direction = 'Up'; }
if (candle.open === candle.close) { candle.direction = 'Side'; }
candles.push(candle);
}
@@ -694,7 +694,7 @@
let currentCandle = candles[i];
let nextCandle = candles[i + 1];
if (currentCandle.direction === nextCandle.direction && currentCandle.direction !== 'side') {
if (currentCandle.direction === nextCandle.direction && currentCandle.direction !== 'Side') {
if (stairs === undefined) {
@@ -725,7 +725,7 @@
if (currentCandle.min < nextCandle.min) { stairs.min = currentCandle.min; } else { stairs.min = nextCandle.min; }
if (currentCandle.max > nextCandle.max) { stairs.max = currentCandle.max; } else { stairs.max = nextCandle.max; }
if (stairs.direction === 'up') {
if (stairs.direction === 'Up') {
stairs.firstMin = currentCandle.open;
stairs.firstMax = currentCandle.close;
@@ -753,7 +753,7 @@
if (stairs.min < nextCandle.min) { stairs.min = currentCandle.min; }
if (stairs.max > nextCandle.max) { stairs.max = currentCandle.max; }
if (stairs.direction === 'up') {
if (stairs.direction === 'Up') {
stairs.lastMin = nextCandle.open;
stairs.lastMax = nextCandle.close;
@@ -1116,7 +1116,7 @@
};
buyUpStairs.type = 'buy';
buyUpStairs.direction = 'up';
buyUpStairs.direction = 'Up';
buyUpStairs.barsCount = 2;
buyUpStairs.begin = currentVolume.begin;
@@ -1163,7 +1163,7 @@
};
buyDownStairs.type = 'buy';
buyDownStairs.direction = 'down';
buyDownStairs.direction = 'Down';
buyDownStairs.barsCount = 2;
buyDownStairs.begin = currentVolume.begin;
@@ -1210,7 +1210,7 @@
};
sellUpStairs.type = 'sell';
sellUpStairs.direction = 'up';
sellUpStairs.direction = 'Up';
sellUpStairs.barsCount = 2;
sellUpStairs.begin = currentVolume.begin;
@@ -1257,7 +1257,7 @@
};
sellDownStairs.type = 'sell';
sellDownStairs.direction = 'down';
sellDownStairs.direction = 'Down';
sellDownStairs.barsCount = 2;
sellDownStairs.begin = currentVolume.begin;
@@ -171,9 +171,9 @@
candle.begin = marketFile[i][4];
candle.end = marketFile[i][5];
if (candle.open > candle.close) { candle.direction = 'down'; }
if (candle.open < candle.close) { candle.direction = 'up'; }
if (candle.open === candle.close) { candle.direction = 'side'; }
if (candle.open > candle.close) { candle.direction = 'Down'; }
if (candle.open < candle.close) { candle.direction = 'Up'; }
if (candle.open === candle.close) { candle.direction = 'Side'; }
candles.push(candle);
@@ -203,7 +203,7 @@
let currentCandle = candles[i];
let nextCandle = candles[i + 1];
if (currentCandle.direction === nextCandle.direction && currentCandle.direction !== 'side') {
if (currentCandle.direction === nextCandle.direction && currentCandle.direction !== 'Side') {
if (stairs === undefined) {
@@ -234,7 +234,7 @@
if (currentCandle.min < nextCandle.min) { stairs.min = currentCandle.min; } else { stairs.min = nextCandle.min; }
if (currentCandle.max > nextCandle.max) { stairs.max = currentCandle.max; } else { stairs.max = nextCandle.max; }
if (stairs.direction === 'up') {
if (stairs.direction === 'Up') {
stairs.firstMin = currentCandle.open;
stairs.firstMax = currentCandle.close;
@@ -262,7 +262,7 @@
if (stairs.min < nextCandle.min) { stairs.min = currentCandle.min; }
if (stairs.max > nextCandle.max) { stairs.max = currentCandle.max; }
if (stairs.direction === 'up') {
if (stairs.direction === 'Up') {
stairs.lastMin = nextCandle.open;
stairs.lastMax = nextCandle.close;
@@ -486,7 +486,7 @@
};
buyUpStairs.type = 'buy';
buyUpStairs.direction = 'up';
buyUpStairs.direction = 'Up';
buyUpStairs.barsCount = 2;
buyUpStairs.begin = currentVolume.begin;
@@ -533,7 +533,7 @@
};
buyDownStairs.type = 'buy';
buyDownStairs.direction = 'down';
buyDownStairs.direction = 'Down';
buyDownStairs.barsCount = 2;
buyDownStairs.begin = currentVolume.begin;
@@ -580,7 +580,7 @@
};
sellUpStairs.type = 'sell';
sellUpStairs.direction = 'up';
sellUpStairs.direction = 'Up';
sellUpStairs.barsCount = 2;
sellUpStairs.begin = currentVolume.begin;
@@ -627,7 +627,7 @@
};
sellDownStairs.type = 'sell';
sellDownStairs.direction = 'down';
sellDownStairs.direction = 'Down';
sellDownStairs.barsCount = 2;
sellDownStairs.begin = currentVolume.begin;
+2 -1
View File
@@ -117,6 +117,7 @@
try {
processHeartBeat(undefined, undefined, "Running...")
function pad(str, max) {
str = str.toString();
return str.length < max ? pad(" " + str, max) : str;
@@ -906,7 +907,7 @@
checkLoopHealthHandle = setTimeout(checkLoopHealth, processConfig.deadWaitTime, bot.loopCounter);
}
nextLoopTimeoutHandle = setTimeout(loop, waitTime);
processHeartBeat(undefined, undefined, "Waiting " + processConfig.waitTime / 1000 + " seconds for next execution.")
processHeartBeat(undefined, undefined, "Waiting " + waitTime / 1000 + " seconds for next execution.")
if (global.WRITE_LOGS_TO_FILES === 'true') {
logger.persist();
}