diff --git a/.vs/AABruce-Indicator-Bot/v15/.suo b/.vs/AABruce-Indicator-Bot/v15/.suo
new file mode 100644
index 000000000..8432b3397
Binary files /dev/null and b/.vs/AABruce-Indicator-Bot/v15/.suo differ
diff --git a/.vs/AABruce/v15/.suo b/.vs/AABruce/v15/.suo
index 93e15830d..c2166bdaf 100644
Binary files a/.vs/AABruce/v15/.suo and b/.vs/AABruce/v15/.suo differ
diff --git a/AABruce.sln b/AABruce-Indicator-Bot.sln
similarity index 88%
rename from AABruce.sln
rename to AABruce-Indicator-Bot.sln
index 0f8bf8f28..913b8fd07 100644
--- a/AABruce.sln
+++ b/AABruce-Indicator-Bot.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "AABruce", "AABruce.njsproj", "{045BBAEF-3C35-4017-8458-E46AEF438790}"
+Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Project", "Project.njsproj", "{045BBAEF-3C35-4017-8458-E46AEF438790}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/One-Min-Daily-Candles-Volumes/Interval.js b/One-Min-Daily-Candles-Volumes/Interval.js
index 67341883e..598da0690 100644
--- a/One-Min-Daily-Candles-Volumes/Interval.js
+++ b/One-Min-Daily-Candles-Volumes/Interval.js
@@ -136,136 +136,6 @@ Read the trades from Charly's Output and pack them into daily files with candles
marketsLoop();
- /*
-
- At every run, the process needs to loop through all the markets at this exchange.
- The following functions marketsLoop(), openMarket(), closeMarket() and closeAndOpenMarket() controls the serialization of this processing.
-
- */
-
- function marketsLoop() {
-
- try {
-
- if (LOG_INFO === true) {
- logger.write("[INFO] Entering function 'marketsLoop'");
- }
-
- markets.getMarketsByExchange(EXCHANGE_ID, onMarketsReady);
-
- function onMarketsReady(marketsArray) {
-
- marketQueue = JSON.parse(marketsArray);
-
- openMarket(); // First execution and entering into the real loop.
-
- }
- }
- catch (err) {
- const logText = "[ERROR] 'marketsLoop' - ERROR : " + err.message;
- logger.write(logText);
- }
- }
-
- function openMarket() {
-
- // To open a Market means picking a new market from the queue.
-
- try {
-
- if (LOG_INFO === true) {
- logger.write("[INFO] Entering function 'openMarket'");
- }
-
-
- if (marketQueue.length === 0) {
-
- if (LOG_INFO === true) {
- logger.write("[INFO] 'openMarket' - marketQueue.length === 0");
- }
-
- const logText = "[WARN] We processed all the markets.";
- logger.write(logText);
-
- callBackFunction(nextIntervalExecution);
-
- return;
- }
-
- if (GO_RANDOM === true) {
- const index = parseInt(Math.random() * (marketQueue.length - 1));
-
- market.id = marketQueue[index][0];
- market.assetA = marketQueue[index][1];
- market.assetB = marketQueue[index][2];
- market.status = marketQueue[index][3];
-
- marketQueue.splice(index, 1);
- } else {
- let marketRecord = marketQueue.shift();
-
- market.id = marketRecord[0];
- market.assetA = marketRecord[1];
- market.assetB = marketRecord[2];
- market.status = marketRecord[3];
-
- if (FORCE_MARKET > 0) {
- if (FORCE_MARKET !== market.id) {
- closeAndOpenMarket();
- return;
- }
- }
- }
-
- if (LOG_INFO === true) {
- logger.write("[INFO] 'openMarket' - marketQueue.length = " + marketQueue.length);
- logger.write("[INFO] 'openMarket' - market sucessfully opened : " + market.assetA + "_" + market.assetB);
- }
-
- if (market.status === markets.ENABLED) {
-
- getStatusReport();
-
- } else {
-
- logger.write("[INFO] 'openMarket' - market " + market.assetA + "_" + market.assetB + " skipped because its status is not valid. Status = " + market.status);
- closeAndOpenMarket();
- return;
-
- }
-
-
- }
- catch (err) {
- const logText = "[ERROR] 'openMarket' - ERROR : " + err.message;
- logger.write(logText);
- closeMarket();
- }
- }
-
- function closeMarket() {
-
- if (LOG_INFO === true) {
- logger.write("[INFO] Entering function 'closeMarket'");
- }
-
- }
-
- function closeAndOpenMarket() {
-
- if (LOG_INFO === true) {
- logger.write("[INFO] Entering function 'closeAndOpenMarket'");
- }
-
- openMarket();
- }
-
- /*
-
- The following code executes for each market.
-
- */
-
function getStatusReport() {
try {
diff --git a/AABruce.njsproj b/Project.njsproj
similarity index 99%
rename from AABruce.njsproj
rename to Project.njsproj
index 8b7ed3f48..8a269f3c9 100644
--- a/AABruce.njsproj
+++ b/Project.njsproj
@@ -13,6 +13,7 @@
{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{349c5851-65df-11da-9384-00065b846f21};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}
14.0
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+ Project
diff --git a/this.bot.config.json b/this.bot.config.json
index 60c09ec97..93bbe382d 100644
--- a/this.bot.config.json
+++ b/this.bot.config.json
@@ -1,10 +1,14 @@
{
- "bot": {
- "name": "Bruce",
- "type": "Indicator",
- "version": "1.0.0",
- "devTeam": "AA Masters"
+ "displayName": "Bruce",
+ "codeName": "AABruce",
+ "type": "Indicator",
+ "version": {
+ "major": 1,
+ "minor": 0,
+ "patch": 0
},
+ "devTeam": "AAMasters",
+ "dataSetVersion": "dataSet.V1",
"processes": [
{
"name": "One-Min-Daily-Candles-Volumes",
@@ -24,8 +28,42 @@
"run": "false"
}
},
- "intervalLapse": 10000,
- "intervalMaxLoops": -1
+ "normalWaitTime": 60000,
+ "retryWaitTime": 10000,
+ "sleepWaitTime": 3600000,
+ "comaWaitTime": 86400000,
+ "dependencies": [
+ {
+ "devTeam": "AAMasters",
+ "bot": "AACharly",
+ "botVersion": {
+ "major": 1,
+ "minor": 0
+ },
+ "process": "Poloniex-Historic-Trades",
+ "dataSetVersion": "dataSet.V1"
+ },
+ {
+ "devTeam": "AAMasters",
+ "bot": "AACharly",
+ "botVersion": {
+ "major": 1,
+ "minor": 0
+ },
+ "process": "Poloniex-Hole-Fixing",
+ "dataSetVersion": "dataSet.V1"
+ },
+ {
+ "devTeam": "AAMasters",
+ "bot": "AABruce",
+ "botVersion": {
+ "major": 1,
+ "minor": 0
+ },
+ "process": "One-Min-Daily-Candles-Volumes",
+ "dataSetVersion": "dataSet.V1"
+ }
+ ]
}
]
}