Validations added

This commit is contained in:
Luis Fernando Molina committed 2020-02-26 14:40:04 +01:00
1 parent 1909e8c54f
commit 3d8f92ff3b
2 files changed
+16

No files matched your search

+8
View File
@@ -54,6 +54,14 @@ function newDailyFiles () {
fileCloud = newFileCloud()
fileCloud.initialize(pBot)
/* Some Validations */
if (pDataset.code.validTimeFrames === undefined) {
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = Can not initialize Market Files for bot ' + pBot.name) }
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = You need to define validTimeFrames at the Dataset config. ') }
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
return
}
/* First we will get the Data Range */
fileCloud.getFile(pDataMine, pBot, pSession, pDataset, exchange, pMarket, undefined, undefined, undefined, true, onDataRangeReceived)
+8
View File
@@ -78,6 +78,14 @@ function newMarketFiles () {
fileCloud = newFileCloud()
fileCloud.initialize(pBot)
/* Some Validations */
if (dataset.code.validTimeFrames === undefined) {
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = Can not initialize Market Files for bot ' + pBot.name) }
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = You need to define validTimeFrames at the Dataset config. ') }
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
return
}
/* Now we will get the market files */
for (let i = 0; i < marketFilesPeriods.length; i++) {