From 59e67d27eb53da13650b8746387f3fb0ddb61e0a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 14 Mar 2018 19:52:02 +0100 Subject: [PATCH] Ready to Debug Multi Period Market just moved to Alpha --- .vs/AAOlivia-Indicator-Bot/v15/.suo | Bin 22016 -> 24576 bytes .../{Interval.js => User.bot.js} | 18 ++++++------------ Project.njsproj | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) rename Multi-Period-Market/{Interval.js => User.bot.js} (97%) diff --git a/.vs/AAOlivia-Indicator-Bot/v15/.suo b/.vs/AAOlivia-Indicator-Bot/v15/.suo index 8eb844d70421674f4adb2f73384bb3c6faed5847..0efdaa32abfe89f0e673e544d968769b824fe01a 100644 GIT binary patch delta 3216 zcmds2-A@}w5WhX_#4=|vm=E(2V<;p9?28Xf9Hct214U|Gu!&9Dv`EQeAH>1sEZ<#~ zq(nIXKpQ*{%|lhSd2Xeumip2c)I@5Y+C=?F`hcbI(sbtVQ4^IY%~O><{ciVWZ)SIA zXMR)uj+J-V4+XxZc>VVIM?e3;1~`t3b;E7`U6^T-*fP}kE!GQ0Q&OO*=k*5LzF~G5 zYE5fbPN3L_=tp=FencOl2k{sFK8SrUVhHgTVi+-kIEffV1QDkZrx2ET>c#4}wgjv2 z@3UbTR7KOWI%1)uzk5`Z| z9YJDhaCbmIEZFviD!sGth!4STcR$?g%`rFBdY{`V3Nx_R{T@8zCFTOdn-nOqC{|5V zbiHMt4W4;7Su+?t=&5!|pz!_@K@DOj%KbTIRW=IxRsECVJMoFQs4JSTDY~BDSkuf9 zDf{k2d7uN~t@ku0JcjL|bJeon#_W_a9NhIqU}vzy`8~xZwPWyk9uF@=Zls@~p^*#K^2n#WbN0?=s-)gfvU+9g>xm^z zDTynpF5b{KH$RiYIVm!IRtl~vQ&KQ|Hk=DiOOh1KhUHaB%0+V1(=t36`xAE3F}N_k zP+b@uW((oaTqqb1hbDqkGw}#VJ0*8nI~I5p+?>y6ORA=>>f+_RX2^xKZsh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h#V-SkN#A+32o%J$jsH^#T&O4myTSyxx9QwjZUePiI^J7Oi!qx zXe>GvN~o$DN=H)}Rh^ogN+eRSk8a}H$hEIA{XO_l`*M$W+nQ|7qkSxeb3v!_DY3mt z3@%=bOfG)c6619E7A2Oo)bsBEE#Jt)&(v7NEGmxlzb-Qq*O#%nJ$_PH1b@W-ueV0M x;Y>1HIjj8_Yp1!&kP8IxxX{&-6o#s{pb7de9Wq`^bd`MgnIx0 diff --git a/Multi-Period-Market/Interval.js b/Multi-Period-Market/User.bot.js similarity index 97% rename from Multi-Period-Market/Interval.js rename to Multi-Period-Market/User.bot.js index 897b2b009..90c75693f 100644 --- a/Multi-Period-Market/Interval.js +++ b/Multi-Period-Market/User.bot.js @@ -1,4 +1,4 @@ -exports.newInterval = function newInterval(BOT, UTILITIES, AZURE_FILE_STORAGE, DEBUG_MODULE, POLONIEX_CLIENT_MODULE, FILE_STORAGE, STATUS_REPORT) { +exports.newUserBot = function newUserBot(BOT, UTILITIES, DEBUG_MODULE, FILE_STORAGE, STATUS_REPORT) { const FULL_LOG = true; const LOG_FILE_CONTENT = false; @@ -9,7 +9,7 @@ const GMT_MILI_SECONDS = '.000 GMT+0000'; const ONE_DAY_IN_MILISECONDS = 24 * 60 * 60 * 1000; - const MODULE_NAME = "Interval"; + const MODULE_NAME = "UserBot"; const EXCHANGE_NAME = "Poloniex"; const EXCHANGE_ID = 1; @@ -31,9 +31,9 @@ start: start }; - let charlyAzureFileStorage = AZURE_FILE_STORAGE.newAzureFileStorage(bot); - let bruceAzureFileStorage = AZURE_FILE_STORAGE.newAzureFileStorage(bot); - let oliviaAzureFileStorage = AZURE_FILE_STORAGE.newAzureFileStorage(bot); + let charlyAzureFileStorage = FILE_STORAGE.newAzureFileStorage(bot); + let bruceAzureFileStorage = FILE_STORAGE.newAzureFileStorage(bot); + let oliviaAzureFileStorage = FILE_STORAGE.newAzureFileStorage(bot); let utilities = UTILITIES.newUtilities(bot); @@ -48,7 +48,7 @@ /* IMPORTANT NOTE: - We are ignoring in this Interval the received Year and Month. This interval is not depending on Year Month since it procecess the whole market at once. + We are ignoring in this UserBot the received Year and Month. This interval is not depending on Year Month since it procecess the whole market at once. */ @@ -84,9 +84,6 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (FULL_LOG === true) { logger.write("[INFO] start -> Entering function."); } - let nextIntervalExecution = false; // This tell weather the Interval module will be executed again or not. By default it will not unless some hole have been found in the current execution. - let nextIntervalLapse; // With this we can request the next execution wait time. - let market = global.MARKET; /* Context Variables */ @@ -426,8 +423,6 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (lastCandleFile.valueOf() > maxCandleFile.valueOf()) { - nextIntervalExecution = true; // we request a new interval execution. - if (FULL_LOG === true) { logger.write("[INFO] start -> buildCandles -> advanceTime -> Head of the market found @ " + lastCandleFile.getUTCFullYear() + "/" + (lastCandleFile.getUTCMonth() + 1) + "/" + lastCandleFile.getUTCDate() + "."); } callBackFunction(global.DEFAULT_OK_RESPONSE); // Here is where we finish processing and wait for the platform to run this module again. @@ -899,7 +894,6 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark callBackFunction(global.DEFAULT_FAIL_RESPONSE); } } - } catch (err) { logger.write("[ERROR] start -> err = " + err.message); diff --git a/Project.njsproj b/Project.njsproj index 0e98ad2af..88157af1a 100644 --- a/Project.njsproj +++ b/Project.njsproj @@ -22,7 +22,7 @@ - +