Merge pull request #2322 from krimsonkla/develop
Contribution: "Additional typo fixes"
This commit is contained in:
67 files changed
+223
-223
No files matched your search
+2
-2
@@ -12,12 +12,12 @@ exports.newNetworkRoot = function newNetworkRoot() {
|
||||
|
||||
async function run() {
|
||||
/*
|
||||
The NT object is accesible everywhere at the Superalgos Network.
|
||||
The NT object is accessible everywhere at the Superalgos Network.
|
||||
It provides access to all modules built for this Network.
|
||||
*/
|
||||
global.NT = {}
|
||||
/*
|
||||
The SA object is accesible everywhere at the Superalgos Network.
|
||||
The SA object is accessible everywhere at the Superalgos Network.
|
||||
It provides access to all modules built for Superalgos in general.
|
||||
*/
|
||||
global.SA = {}
|
||||
|
||||
@@ -295,7 +295,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
let fileContent // File content of the only file at the PR
|
||||
let userProfile // User Profile Object
|
||||
let githubUsername // The Github user name of who is submitting the Pull Request
|
||||
let mergeResponse // The response received from the call to Gihub to merge the Pull Request
|
||||
let mergeResponse // The response received from the call to Github to merge the Pull Request
|
||||
|
||||
if (await validatePrHasMoreThanOneFile() === false) { continue }
|
||||
if (await validateFileNameEqualsGithubUsername() === false) { continue }
|
||||
@@ -310,7 +310,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (await mergePullRequest() === false) {
|
||||
console.log('[WARN] Github Server -> mergeGithubPullRequests -> Merge Failed -> Pull Request "' + pullRequest.title + '" not merged because Github could not merge it. -> mergeResponse.message = ' + mergeResponse.data.message)
|
||||
} else {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Merge Succed -> Pull Request "' + pullRequest.title + '" successfully merged. -> mergeResponse.message = ' + mergeResponse.data.message)
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Merge Succeed -> Pull Request "' + pullRequest.title + '" successfully merged. -> mergeResponse.message = ' + mergeResponse.data.message)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
@@ -743,7 +743,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
issue_number: pullRequest.number,
|
||||
body: 'Hi, this is the Superalgos Governance System taking notice that you have submitted a pull request directly to the master branch.\n\nThanks for submitting a PR to the Superalgos Project. We value every contribution and everyone is welcome to send PRs. Unfortunatelly we are not merging pull requests directly into the master branch. Consider resubmitting to the develop branch intstead. For your convinienve, you can swithch branches from within the app, at the footer of the Docs tab. \n\n I will close this pull request now and look forward for your next contribution either to the develop branch or any other branch available for this purpose.'
|
||||
body: 'Hi, this is the Superalgos Governance System taking notice that you have submitted a pull request directly to the master branch.\n\nThanks for submitting a PR to the Superalgos Project. We value every contribution and everyone is welcome to send PRs. Unfortunately we are not merging pull requests directly into the master branch. Consider resubmitting to the develop branch instead. For your convenience, you can switch branches from within the app, at the footer of the Docs tab. \n\n I will close this pull request now and look forward for your next contribution either to the develop branch or any other branch available for this purpose.'
|
||||
});
|
||||
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
|
||||
@@ -253,7 +253,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
console.log('[INFO] httpInterface -> Webhook -> Fetch-Messages -> Exchange-Market = ' + exchange + '-' + market)
|
||||
console.log('[INFO] httpInterface -> Webhook -> Fetch-Messages -> Messeges Fetched by Webhooks Sensor Bot = ' + webhookMessages.length)
|
||||
console.log('[INFO] httpInterface -> Webhook -> Fetch-Messages -> Messages Fetched by Webhooks Sensor Bot = ' + webhookMessages.length)
|
||||
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(webhookMessages), httpResponse)
|
||||
webhookMessages = []
|
||||
@@ -301,7 +301,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
console.log('[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = ' + exchange + '-' + market)
|
||||
console.log('[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = ' + messageReceived)
|
||||
console.log('[INFO] httpInterface -> Webhook -> New-Message -> Messeges waiting to be Fetched by Webhooks Sensor Bot = ' + webhookMessages.length)
|
||||
console.log('[INFO] httpInterface -> Webhook -> New-Message -> Messages waiting to be Fetched by Webhooks Sensor Bot = ' + webhookMessages.length)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
|
||||
}
|
||||
break
|
||||
@@ -881,7 +881,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
if (error === undefined) {
|
||||
// Run node setup to prepare instance for branch change
|
||||
await runNodeSetup()
|
||||
// Return to UI that Branch is suggessfully changed
|
||||
// Return to UI that Branch is successfully changed
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
|
||||
} else {
|
||||
let docs = {
|
||||
@@ -1028,7 +1028,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
case 'FixAppSchema': {
|
||||
/*
|
||||
We will use this process when we have moved APP SCHEMA files from one project to another, and we need to fixt the
|
||||
We will use this process when we have moved APP SCHEMA files from one project to another, and we need to fix the
|
||||
actions where this node was referenced, so that it points to the new project where the node has moved to.
|
||||
*/
|
||||
let customResponse = {
|
||||
@@ -1129,7 +1129,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
let fileProject = allAppSchemasFileProjects[i]
|
||||
//console.log(fileProject, project)
|
||||
if (fileProject === project) {
|
||||
/* If the projec of the file is the same as the project found, then we consider this a match*/
|
||||
/* If the project of the file is the same as the project found, then we consider this a match*/
|
||||
hits = 1
|
||||
continue
|
||||
}
|
||||
@@ -1812,7 +1812,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
let folder = unescape(requestPath[3])
|
||||
let fileName = unescape(requestPath[4])
|
||||
|
||||
/*Beta 12 Refactoring Code: Remove this before realeasing beta 12.*/
|
||||
/*Beta 12 Refactoring Code: Remove this before releasing beta 12.*/
|
||||
if (fileName === 'Superalgos-CL.json') {
|
||||
fileName = 'Superalgos-PL.json'
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ function newFrame() {
|
||||
let thisObject = {
|
||||
type: 'Rectangle',
|
||||
containerName: '', // This is for debugging purposes only.
|
||||
parentFrame: undefined, // Here we store the parent cointainer zoom object.
|
||||
parentFrame: undefined, // Here we store the parent container zoom object.
|
||||
radius: 0,
|
||||
offset: undefined,
|
||||
position: undefined,
|
||||
@@ -53,7 +53,7 @@ function newFrame() {
|
||||
}
|
||||
|
||||
function isInViewPort() {
|
||||
/* This function is usefull to know if the object who has this frame is currently appearing at least in part at the UI.projects.foundations.spaces.chartingSpace.viewport */
|
||||
/* This function is useful to know if the object who has this frame is currently appearing at least in part at the UI.projects.foundations.spaces.chartingSpace.viewport */
|
||||
|
||||
point1 = {
|
||||
x: 0,
|
||||
@@ -78,7 +78,7 @@ function newFrame() {
|
||||
}
|
||||
|
||||
function isCenterInViewPort() {
|
||||
/* This function is usefull to know if the object who has this frame is currently appearing at least in part at the UI.projects.foundations.spaces.chartingSpace.viewport */
|
||||
/* This function is useful to know if the object who has this frame is currently appearing at least in part at the UI.projects.foundations.spaces.chartingSpace.viewport */
|
||||
|
||||
point1 = {
|
||||
x: thisObject.width * 40 / 100,
|
||||
@@ -187,8 +187,8 @@ function newFrame() {
|
||||
}
|
||||
|
||||
function isThisPointHere(point, outsideViewPort, dontTransform, padding) {
|
||||
// The second parameter is usefull when you want to check a point that you already know is outside the viewport.
|
||||
// The padding is a distance to the borders of the container. Can be either negative (outside, to increase the cointainer size) or positive (inside to decrease the cointainer size)
|
||||
// The second parameter is useful when you want to check a point that you already know is outside the viewport.
|
||||
// The padding is a distance to the borders of the container. Can be either negative (outside, to increase the container size) or positive (inside to decrease the cointainer size)
|
||||
|
||||
if (padding === undefined) { padding = 0 }
|
||||
|
||||
@@ -199,7 +199,7 @@ function newFrame() {
|
||||
}
|
||||
|
||||
/* The point received is on the screen coordinates system, which already has zoom and displacement applied. We need to remove the zoom and displacement
|
||||
in order to have the point on the containers coordinate system and be able to compare it with its dimmensions. */
|
||||
in order to have the point on the containers coordinate system and be able to compare it with its dimensions. */
|
||||
if (dontTransform === false || dontTransform === undefined) {
|
||||
if (outsideViewPort === true) {
|
||||
checkPoint = thisObject.container.frame.unframeThisPoint(checkPoint)
|
||||
@@ -208,7 +208,7 @@ function newFrame() {
|
||||
}
|
||||
}
|
||||
|
||||
/* Now we check if the resulting point is whin the current Frame. */
|
||||
/* Now we check if the resulting point is within the current Frame. */
|
||||
if (isNaN(checkPoint.x) || isNaN(checkPoint.y)) { return false }
|
||||
if (thisObject.type === 'Circle') {
|
||||
let distance = Math.sqrt(Math.pow(thisObject.position.x - checkPoint.x, 2) + Math.pow(thisObject.position.y - checkPoint.y, 2))
|
||||
@@ -244,7 +244,7 @@ function newFrame() {
|
||||
thisPoint = thisObject.parentFrame.frameThisPoint(thisPoint)
|
||||
}
|
||||
|
||||
/* Now we check if the resulting point is whin the current Frame. */
|
||||
/* Now we check if the resulting point is within the current Frame. */
|
||||
|
||||
if (thisObject.type === 'Circle') {
|
||||
let distance = Math.sqrt(Math.pow(thisPoint.x - checkPoint.x, 2) + Math.pow(thisPoint.y - checkPoint.y, 2))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Global Constatns */
|
||||
/* Global Constants */
|
||||
|
||||
let canvas
|
||||
let PROJECTS_SCHEMA
|
||||
@@ -204,9 +204,9 @@ const _1_MINUTE_IN_MILISECONDS = 1 * 60 * 1000;
|
||||
|
||||
|
||||
|
||||
let NEW_SESSION_INITIAL_DATE = new Date(); // This value will be overwritten at the UI.projects.foundations.spaces.chartingSpace.viewport.initialize if the user had a prevous session with this same browser.
|
||||
let NEW_SESSION_INITIAL_DATE = new Date(); // This value will be overwritten at the UI.projects.foundations.spaces.chartingSpace.viewport.initialize if the user had a previous session with this same browser.
|
||||
let INITIAL_ZOOM_LEVEL = -28.25 // This is the zoom level at the view port in which the APP starts.
|
||||
let INITIAL_TIME_PERIOD = ONE_DAY_IN_MILISECONDS // This value will be overwritten at the UI.projects.foundations.spaces.chartingSpace.viewport.initialize if the user had a prevous session with this same browser.
|
||||
let INITIAL_TIME_PERIOD = ONE_DAY_IN_MILISECONDS // This value will be overwritten at the UI.projects.foundations.spaces.chartingSpace.viewport.initialize if the user had a previous session with this same browser.
|
||||
let VERY_LARGE_NUMBER = 100000000000000
|
||||
|
||||
const TOP_MARGIN = 0
|
||||
@@ -246,7 +246,7 @@ const PERIOD_05_MIN = "05-min";
|
||||
const PERIOD_01_MIN = "01-min";
|
||||
|
||||
/*
|
||||
We define here the size of the chartingSpace. It has to bee enough big in order to accomodate all the charts we expect to display in this space.
|
||||
We define here the size of the chartingSpace. It has to bee enough big in order to accommodate all the charts we expect to display in this space.
|
||||
*/
|
||||
|
||||
const TIME_MACHINE_WIDTH = 8;
|
||||
|
||||
@@ -4028,7 +4028,7 @@
|
||||
"procedureJavascriptCode": {
|
||||
"type": "Procedure Javascript Code",
|
||||
"name": "New Procedure Javascript Code",
|
||||
"code": "/* LiveTester Stats */\n\n// The LiveTester Stats functions to measure and return the values for given probabilities. So instead of aiming towards a % win, you can see \n// the % probability for the % move. It is created with the concept of a profit is profit, no matter the size. Eliminating the risk of loss, will increase the\n// profitability in the long run.\n// Weighting risks vs chance might put your trading at a better win rate.\n// The LiveTester will also allow you to set a minimum profit and allow a 'Take Position' on any chart a valid 'Take Position' event occurs.\n\n//- - - - - - - - - - - - - - - - - - - \n\n// User Parameters\n\nvariable.minProfit = 0.5 // Measured in full value % - 0.5 is 0.5%\nvariable.minProbability = 90 // Measured in full value % - 90 is 90%\nvariable.rewardRatioValue = 1.5 // Set your Reward to Risk ratio by editing \nvariable.riskRatioValue = 1 // the values for the variables\n\nvariable.riskToReward = variable.rewardRatioValue / variable.riskRatioValue\n\n//- - - - - - - - - - - - - - - - - - - \n\n// Dependencies\n// Make sure to add your indicators in this section by using 'getElement', and also as node(s) in the dependencies for this indicator.\n\nlet candle = record.current\n// let indicator = getElement('indicatorPluralNames', candle)\nlet ema = getElement('5xCustomEMAs', candle)\n\n//- - - - - - - - - - - - - - - - - - - \n\n// Create a running candleIndex\nif (variable.candleIndex === undefined) {\n variable.candleIndex = 1\n}\nelse {\n variable.candleIndex = variable.candleIndex + 1\n}\n\nvariable.position = Math.round((candle.begin + candle.end) / 2)\n\n// For the first run, we set our measuring switch to 'Off'\nif (variable.livetesterStats === undefined) {\n variable.livetesterStats = 'Off'\n}\n\nif (variable.arrayLength === undefined) {\n variable.arrayLength = arrLength()\n}\n\n//- - - - - - - - - - - - - - - - - - - \n\n// Strategy section\n// Define your strategy, including 'Trigger on' and/or your 'Take position' depending on your use case\n\n// Define entry in the IF-statement\nif (record.previous !== undefined) {\n if (variable.livetesterStats === 'Off' && ema.ema03 > ema.ema05 && ema.previous.ema03 < ema.previous.ema05) {\n // Defining values to keep track on and use for calulations\n variable.livetesterStats = 'On'\n if (variable.entryIndex !== undefined) {\n variable.previousEntryIndex = variable.entryIndex\n }\n variable.entryIndex = variable.candleIndex\n }\n\n // Define exit in the IF-statement\n if (variable.livetesterStats === 'On' && ema.ema03 < ema.ema05 && ema.previous.ema03 > ema.previous.ema05) {\n // Defining values to keep track on and use for calulations\n variable.livetesterStats = 'Off'\n variable.exitIndex = variable.candleIndex\n }\n}\n//- - - - - - - - - - - - - - - - - - - \n\n// Stats Tracker section\n\nif (variable.livetesterStats === 'On') {\n\n if (variable.entryIndex === variable.candleIndex) {\n // Reset data from previous\n variable.savedPosition.length = 0\n variable.entryRate = candle.close\n variable.entryPos = variable.position\n variable.pMaxUp = 0\n variable.pMaxUpRate = candle.close\n variable.pMaxUpPos = variable.position\n variable.cMaxUp = 0\n variable.pMaxDown = 0\n variable.pMaxDownRate = candle.close\n variable.pMaxDownPos = variable.position\n variable.cMaxDown = 0\n\n variable.entryTimestamp = candle.end \n\n variable.savedPosition.push(variable.entryTimestamp)\n\n if (variable.bullOption === 1) {\n if (variable.previousBullEntry === undefined) {\n variable.previousBullEntry = variable.candleIndex\n }\n variable.bullEntry = variable.candleIndex\n variable.bullTradeToTrade = variable.bullEntry - variable.previousBullEntry\n \n variable.savedBullTradeToTrade.push(variable.bullTradeToTrade)\n if (variable.savedBullTradeToTrade.length > variable.arrayLength) {\n variable.savedBullTradeToTrade.splice(0,1)\n }\n \n variable.previousBullEntry = variable.bullEntry\n }\n \n if (variable.bearOption === 1) {\n if (variable.previousBearEntry === undefined) {\n variable.previousBearEntry = variable.candleIndex\n }\n variable.bearEntry = variable.candleIndex\n variable.bearTradeToTrade = variable.bearEntry - variable.previousBearEntry\n \n variable.savedBearTradeToTrade.push(variable.bearTradeToTrade)\n if (variable.savedBearTradeToTrade.length > variable.arrayLength) {\n variable.savedBearTradeToTrade.splice(0,1)\n }\n \n variable.previousBullEntry = variable.bullEntry\n }\n }\n\n Line truncated
|
||||
"code": "/* LiveTester Stats */\n\n// The LiveTester Stats functions to measure and return the values for given probabilities. So instead of aiming towards a % win, you can see \n// the % probability for the % move. It is created with the concept of a profit is profit, no matter the size. Eliminating the risk of loss, will increase the\n// profitability in the long run.\n// Weighting risks vs chance might put your trading at a better win rate.\n// The LiveTester will also allow you to set a minimum profit and allow a 'Take Position' on any chart a valid 'Take Position' event occurs.\n\n//- - - - - - - - - - - - - - - - - - - \n\n// User Parameters\n\nvariable.minProfit = 0.5 // Measured in full value % - 0.5 is 0.5%\nvariable.minProbability = 90 // Measured in full value % - 90 is 90%\nvariable.rewardRatioValue = 1.5 // Set your Reward to Risk ratio by editing \nvariable.riskRatioValue = 1 // the values for the variables\n\nvariable.riskToReward = variable.rewardRatioValue / variable.riskRatioValue\n\n//- - - - - - - - - - - - - - - - - - - \n\n// Dependencies\n// Make sure to add your indicators in this section by using 'getElement', and also as node(s) in the dependencies for this indicator.\n\nlet candle = record.current\n// let indicator = getElement('indicatorPluralNames', candle)\nlet ema = getElement('5xCustomEMAs', candle)\n\n//- - - - - - - - - - - - - - - - - - - \n\n// Create a running candleIndex\nif (variable.candleIndex === undefined) {\n variable.candleIndex = 1\n}\nelse {\n variable.candleIndex = variable.candleIndex + 1\n}\n\nvariable.position = Math.round((candle.begin + candle.end) / 2)\n\n// For the first run, we set our measuring switch to 'Off'\nif (variable.livetesterStats === undefined) {\n variable.livetesterStats = 'Off'\n}\n\nif (variable.arrayLength === undefined) {\n variable.arrayLength = arrLength()\n}\n\n//- - - - - - - - - - - - - - - - - - - \n\n// Strategy section\n// Define your strategy, including 'Trigger on' and/or your 'Take position' depending on your use case\n\n// Define entry in the IF-statement\nif (record.previous !== undefined) {\n if (variable.livetesterStats === 'Off' && ema.ema03 > ema.ema05 && ema.previous.ema03 < ema.previous.ema05) {\n // Defining values to keep track on and use for calculations\n variable.livetesterStats = 'On'\n if (variable.entryIndex !== undefined) {\n variable.previousEntryIndex = variable.entryIndex\n }\n variable.entryIndex = variable.candleIndex\n }\n\n // Define exit in the IF-statement\n if (variable.livetesterStats === 'On' && ema.ema03 < ema.ema05 && ema.previous.ema03 > ema.previous.ema05) {\n // Defining values to keep track on and use for calulations\n variable.livetesterStats = 'Off'\n variable.exitIndex = variable.candleIndex\n }\n}\n//- - - - - - - - - - - - - - - - - - - \n\n// Stats Tracker section\n\nif (variable.livetesterStats === 'On') {\n\n if (variable.entryIndex === variable.candleIndex) {\n // Reset data from previous\n variable.savedPosition.length = 0\n variable.entryRate = candle.close\n variable.entryPos = variable.position\n variable.pMaxUp = 0\n variable.pMaxUpRate = candle.close\n variable.pMaxUpPos = variable.position\n variable.cMaxUp = 0\n variable.pMaxDown = 0\n variable.pMaxDownRate = candle.close\n variable.pMaxDownPos = variable.position\n variable.cMaxDown = 0\n\n variable.entryTimestamp = candle.end \n\n variable.savedPosition.push(variable.entryTimestamp)\n\n if (variable.bullOption === 1) {\n if (variable.previousBullEntry === undefined) {\n variable.previousBullEntry = variable.candleIndex\n }\n variable.bullEntry = variable.candleIndex\n variable.bullTradeToTrade = variable.bullEntry - variable.previousBullEntry\n \n variable.savedBullTradeToTrade.push(variable.bullTradeToTrade)\n if (variable.savedBullTradeToTrade.length > variable.arrayLength) {\n variable.savedBullTradeToTrade.splice(0,1)\n }\n \n variable.previousBullEntry = variable.bullEntry\n }\n \n if (variable.bearOption === 1) {\n if (variable.previousBearEntry === undefined) {\n variable.previousBearEntry = variable.candleIndex\n }\n variable.bearEntry = variable.candleIndex\n variable.bearTradeToTrade = variable.bearEntry - variable.previousBearEntry\n \n variable.savedBearTradeToTrade.push(variable.bearTradeToTrade)\n if (variable.savedBearTradeToTrade.length > variable.arrayLength) {\n variable.savedBearTradeToTrade.splice(0,1)\n }\n \n variable.previousBullEntry = variable.bullEntry\n }\n }\n\n Line truncated
|
||||
"project": "Foundations",
|
||||
"id": "bb9d955f-fed2-44b8-85f0-90104a30e83b",
|
||||
"savedPayload": {
|
||||
|
||||
+9
-9
@@ -1,12 +1,12 @@
|
||||
exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket = function (processIndex) {
|
||||
/*
|
||||
This module is about converting a One-Min Daily typeo of data set into a Multi Time Frame Market type.
|
||||
This module is about converting a One-Min Daily type of data set into a Multi Time Frame Market type.
|
||||
|
||||
The process to do so involves:
|
||||
|
||||
Reading the elements (elements, volumens, bolllinger bands, news, asset metrics, etc.) from a
|
||||
Reading the elements (elements, volumes, bollinger bands, news, asset metrics, etc.) from a
|
||||
One-Min Dataset (a dataset that is organized with elements spanning one min, like one min begin-end-elements,
|
||||
or elements with a timestamp captured approximatelly one minute from each other)
|
||||
or elements with a timestamp captured approximately one minute from each other)
|
||||
organized in Daily Files.
|
||||
|
||||
It is going to output a Market Files dataset for every Market Time Frame, aggregating the
|
||||
@@ -35,7 +35,7 @@ exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket = function (proc
|
||||
|
||||
let statusDependenciesModule
|
||||
let dataDependenciesModule
|
||||
let node = {} // Usefull nodes for this module will be stored here.
|
||||
let node = {} // Useful nodes for this module will be stored here.
|
||||
|
||||
return thisObject;
|
||||
|
||||
@@ -67,7 +67,7 @@ exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket = function (proc
|
||||
datetimeLastProducedFile: undefined, // Datetime of the last file files successfully produced by this process.
|
||||
datetimeBeginingOfMarketFile: undefined, // Datetime of the first trade file in the whole market history.
|
||||
datetimeLastAvailableDependencyFile: undefined, // Datetime of the last file available to be used as an input of this process.
|
||||
beginingOfMarket: undefined // Datetime of the begining of the market.
|
||||
beginingOfMarket: undefined // Datetime of the beginning of the market.
|
||||
}
|
||||
|
||||
TS.projects.foundations.functionLibraries.fromOneMinToMultiTimeFrameFunctions.getContextVariables(
|
||||
@@ -129,7 +129,7 @@ exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket = function (proc
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] start -> loadExistingFiles -> loopBody -> readExistingFile -> onFileReceived -> err = " + err.stack)
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] start -> loadExistingFiles -> loopBody -> readExistingFile -> onFileReceived -> Asuming this is a temporary situation. Requesting a Retry.")
|
||||
"[ERROR] start -> loadExistingFiles -> loopBody -> readExistingFile -> onFileReceived -> Assuming this is a temporary situation. Requesting a Retry.")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
}
|
||||
} else {
|
||||
@@ -167,7 +167,7 @@ exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket = function (proc
|
||||
let fromDate = new Date(contextVariables.datetimeLastProducedFile.valueOf())
|
||||
let lastDate = TS.projects.foundations.utilities.dateTimeFunctions.removeTime(new Date())
|
||||
/*
|
||||
Firstly we prepere the arrays that will accumulate all the information for each output file.
|
||||
Firstly we prepare the arrays that will accumulate all the information for each output file.
|
||||
*/
|
||||
let outputElements = []
|
||||
|
||||
@@ -191,7 +191,7 @@ exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket = function (proc
|
||||
|
||||
function timeframesLoop() {
|
||||
/*
|
||||
We will iterate through all posible time frames.
|
||||
We will iterate through all possible time frames.
|
||||
*/
|
||||
let timeFrameArrayIndex = 0 // loop Variable representing each possible period as defined at the Time Frame Array.
|
||||
|
||||
@@ -252,7 +252,7 @@ exports.newDataMiningBotModulesFromOneMinToMultiTimeFrameMarket = function (proc
|
||||
function aggregateAndWriteOutputFile(dependencyDailyFile) {
|
||||
/*
|
||||
Here we call the function that will aggregate all the information
|
||||
at the dependency file into standarized begin-end-elements.
|
||||
at the dependency file into standardized begin-end-elements.
|
||||
*/
|
||||
TS.projects.foundations.functionLibraries.fromOneMinToMultiTimeFrameFunctions.aggregateFileContent(
|
||||
node,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const MODULE_NAME = "Multi Time Frame Daily"
|
||||
/*
|
||||
This module deals with Daily Files, that are data files for Time Frames below 1 hour.
|
||||
It also assumes that the data dependencias are in Daily Files, one file for each Time Frame.
|
||||
It also assumes that the data dependencies are in Daily Files, one file for each Time Frame.
|
||||
*/
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
@@ -58,11 +58,11 @@
|
||||
let thisReport
|
||||
let statusReport
|
||||
/*
|
||||
We look first for the bot who knows the begining of the market in order to get when the market starts.
|
||||
We look first for the bot who knows the beginning of the market in order to get when the market starts.
|
||||
*/
|
||||
statusReport = statusDependenciesModule.reportsByMainUtility.get("Market Starting Point")
|
||||
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the beginning of a month.
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[WARN] start -> getContextVariables -> Market Starting Point -> Status Report does not exist or Market Starting Point not defined. Retrying Later. ")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
@@ -114,7 +114,7 @@
|
||||
*/
|
||||
statusReport = statusDependenciesModule.reportsByMainUtility.get("Market Ending Point")
|
||||
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the beginning of a month.
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[WARN] start -> getContextVariables -> Market Ending Point -> Status Report does not exist or Market Ending Point not defined. Retrying Later. ")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
@@ -149,7 +149,7 @@
|
||||
/* Finally we get our own Status Report. */
|
||||
statusReport = statusDependenciesModule.reportsByMainUtility.get("Self Reference")
|
||||
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the beginning of a month.
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[WARN] start -> getContextVariables -> Self Reference -> Status Report does not exist or Self Reference not defined or badly configured. Check that at the Status Dependency you have chosen Self Reference at the config. Retrying Later. ")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
beginingOfMarket = new Date(thisReport.beginingOfMarket)
|
||||
|
||||
if (beginingOfMarket.valueOf() !== contextVariables.dateBeginOfMarket.valueOf()) { // Reset Mechanism for Begining of the Market
|
||||
if (beginingOfMarket.valueOf() !== contextVariables.dateBeginOfMarket.valueOf()) { // Reset Mechanism for Beginning of the Market
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[INFO] start -> getContextVariables -> Reset Mechanism for Begining of the Market Activated.")
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
} else {
|
||||
|
||||
/*
|
||||
In the case when there is no status report, we assume like the last processed file is the one on the date of Begining of Market.
|
||||
In the case when there is no status report, we assume like the last processed file is the one on the date of Beginning of Market.
|
||||
*/
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[INFO] start -> getContextVariables -> Starting from the begining of the market because own status report not found or lastFile was undefined.")
|
||||
@@ -209,7 +209,7 @@
|
||||
*/
|
||||
interExecutionMemoryArray = []
|
||||
/*
|
||||
Also, we will remember that we are bootstrapping the process, this will allow us, to advanceTime if necesary.
|
||||
Also, we will remember that we are bootstrapping the process, this will allow us, to advanceTime if necessary.
|
||||
It can happen that a process depends on data from another process that does not produce a file during the first day, or even more days,
|
||||
in that situation we want the process not to just wait for that data that will never arrive, but to advance time until it finds valid data.
|
||||
*/
|
||||
@@ -242,7 +242,7 @@
|
||||
let botNeverRan = true;
|
||||
|
||||
TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).DAILY_FILES_PROCESS_DATETIME =
|
||||
new Date(contextVariables.lastFile.valueOf() - SA.projects.foundations.globals.timeConstants.ONE_DAY_IN_MILISECONDS) // Go back one day to start well when we advance time at the begining of the loop.
|
||||
new Date(contextVariables.lastFile.valueOf() - SA.projects.foundations.globals.timeConstants.ONE_DAY_IN_MILISECONDS) // Go back one day to start well when we advance time at the beginning of the loop.
|
||||
let fromDate = new Date(TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).DAILY_FILES_PROCESS_DATETIME.valueOf())
|
||||
let lastDate = TS.projects.foundations.utilities.dateTimeFunctions.removeTime(new Date())
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
|
||||
function timeFramesLoop() {
|
||||
/*
|
||||
We will iterate through all posible timeFrames.
|
||||
We will iterate through all possible timeFrames.
|
||||
*/
|
||||
n = 0 // loop Variable representing each possible period as defined at the timeFrames array.
|
||||
timeFramesLoopBody()
|
||||
@@ -375,8 +375,8 @@
|
||||
function onFileReceived(err, text) {
|
||||
if ((err.message === "File does not exist." && botNeverRan === true) || err.code === 'The specified key does not exist.') {
|
||||
/*
|
||||
Sometimes one of the dependencies of an indicator for some reasons are not calculated from the begining of the market.
|
||||
When that happens we can not find those files. What we do in this situation is to move the time fordward until we can find
|
||||
Sometimes one of the dependencies of an indicator for some reasons are not calculated from the beginning of the market.
|
||||
When that happens we can not find those files. What we do in this situation is to move the time forward until we can find
|
||||
all the dependencies and the first run of the bot is successful.
|
||||
|
||||
After that, we will not accept more missing files on any of the dependencies, and if any is missing we will abort the processing.
|
||||
@@ -429,7 +429,7 @@
|
||||
if (bootstrappingTheProcess === true) {
|
||||
/*
|
||||
In the special situation where we are running this process for the first time (no status report found),
|
||||
we will consider the possibility that a depanant process does not produce a file during the first day of the market,
|
||||
we will consider the possibility that a dependant process does not produce a file during the first day of the market,
|
||||
or even more than one day. That is why we are going to advance time here.
|
||||
*/
|
||||
advanceTime()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const MODULE_NAME = "Multi Time Frame Market"
|
||||
/*
|
||||
This module deals with Market Files, that are data files for Time Frames of 1 hour and above.
|
||||
It also assumes that the data dependencias are in Market Files, one file for each Time Frame.
|
||||
It also assumes that the data dependencies are in Market Files, one file for each Time Frame.
|
||||
*/
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
@@ -46,7 +46,7 @@
|
||||
timeFramesLoop()
|
||||
|
||||
function timeFramesLoop() {
|
||||
/* We will iterate through all posible timeFrames.*/
|
||||
/* We will iterate through all possible timeFrames.*/
|
||||
n = 0 // loop Variable representing each possible period as defined at the timeFrames array.
|
||||
timeFramesLoopBody()
|
||||
}
|
||||
|
||||
+13
-13
@@ -69,7 +69,7 @@
|
||||
1. Parameters set by SA user at the Crypto Exchange node are extracted. There might be parameters for each supported method at the CCXT library.
|
||||
2. The CCXT class for the configured exchange is instantiated, with whatever options where configured.
|
||||
|
||||
This gives the SA user a lot of control over the underlaying CCXT gateway to exchanges.
|
||||
This gives the SA user a lot of control over the underlying CCXT gateway to exchanges.
|
||||
*/
|
||||
try {
|
||||
statusDependencies = pStatusDependencies;
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
if (statusDependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") {
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. ");
|
||||
"[ERROR] start -> getContextVariables -> Can not continue because dependency Status Report is corrupt. ");
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
|
||||
return;
|
||||
}
|
||||
@@ -664,11 +664,11 @@
|
||||
What we are going to do in this function is to save all the candles
|
||||
received from the exchange. We need to partition the batch of candles
|
||||
into 1 day files. At the same time we need to take care of the situation
|
||||
that some exchanges send inconsitent data. We have detected some cases
|
||||
that some exchanges send inconsistent data. We have detected some cases
|
||||
where candles do not begin at second 0 of the minute but are a little
|
||||
bit shifted. We will try to detect this and fix it as we go.
|
||||
|
||||
We have the data received from the exchange at the arrary rawDataArray
|
||||
We have the data received from the exchange at the array rawDataArray
|
||||
*/
|
||||
try {
|
||||
|
||||
@@ -761,7 +761,7 @@
|
||||
Here we will check that the current candle is not going into the future.
|
||||
Remember we are looping around all possible minutes of a day, and when
|
||||
that day is the current actual day, and the current minute is in the future,
|
||||
it manke no more sense to continue inside this loop since we are not going
|
||||
it make no more sense to continue inside this loop since we are not going
|
||||
to find more OHLCVs matchings.
|
||||
|
||||
At the same time, we are going to check that we haven't processed the whole
|
||||
@@ -808,7 +808,7 @@
|
||||
|
||||
/*
|
||||
We will check that we can have a record to
|
||||
analize. It might happen that we don't have one
|
||||
analyze. It might happen that we don't have one
|
||||
in the situation that we could not get a single
|
||||
record from the exchange. We still want to be
|
||||
here so that everything is properly logged.
|
||||
@@ -828,7 +828,7 @@
|
||||
let OHLCVMinute
|
||||
/*
|
||||
Some exchanges return inconsistent data. It is not guaranteed
|
||||
that each candle will have a timeStamp exactly at the begining of an
|
||||
that each candle will have a timeStamp exactly at the beginning of an
|
||||
UTC minute. It is also not guaranteed that the distance
|
||||
between timestamps will be the same. To fix this, we will do this.
|
||||
*/
|
||||
@@ -839,12 +839,12 @@
|
||||
If the minute of the record item received from the exchange is
|
||||
less than the minute of the current minute in our loop,
|
||||
that means that we need to reposition the inded at the rawDataArray
|
||||
array, moving it one record fordward, and that is what we are
|
||||
array, moving it one record forward, and that is what we are
|
||||
doing here.
|
||||
*/
|
||||
while (OHLCVMinute < candleMinute) {
|
||||
|
||||
/* Move fordward at the rawDataArray array. */
|
||||
/* Move forward at the rawDataArray array. */
|
||||
ohlcvArrayIndex++
|
||||
|
||||
/* Check that we have not passed the end of the array */
|
||||
@@ -903,7 +903,7 @@
|
||||
|
||||
/*
|
||||
Since we extracted this OHLCV value, we move
|
||||
fordward our array index.
|
||||
forward our array index.
|
||||
*/
|
||||
if (ohlcvArrayIndex < rawDataArray.length - 1) {
|
||||
ohlcvArrayIndex++
|
||||
@@ -915,7 +915,7 @@
|
||||
}
|
||||
|
||||
/*
|
||||
Here we remeber the last candle and volumen, in case
|
||||
Here we remember the last candle and volume, in case
|
||||
we need it.
|
||||
*/
|
||||
lastCandle = candle
|
||||
@@ -1088,7 +1088,7 @@
|
||||
|
||||
/*
|
||||
One possible exit is when we reached the amount of candles downloaded.
|
||||
This does not necesary happens at the end of the market
|
||||
This does not necessary happens at the end of the market
|
||||
if the process was canceled for any reason at the middle,
|
||||
or the exchange became unavailable.
|
||||
*/
|
||||
@@ -1111,7 +1111,7 @@
|
||||
}
|
||||
|
||||
/*
|
||||
If there is no reson to exit, we will process the next day.
|
||||
If there is no reason to exit, we will process the next day.
|
||||
*/
|
||||
setImmediate(loop)
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ exports.newFoundationsUtilitiesHttpResponses = function () {
|
||||
|
||||
if (fileNameReceived === '') {
|
||||
/*
|
||||
When there is no endpoint specidied we will respond with this app's Home Page.
|
||||
When there is no endpoint specified we will respond with this app's Home Page.
|
||||
*/
|
||||
let fs = SA.nodeModules.fs
|
||||
|
||||
@@ -194,7 +194,7 @@ exports.newFoundationsUtilitiesHttpResponses = function () {
|
||||
} else {
|
||||
/*
|
||||
When there is a parameter but it does not match any of the available endpoints, we
|
||||
will serve the file with the same name at at a location that depends on it's file extention.
|
||||
will serve the file with the same name at at a location that depends on it's file extension.
|
||||
*/
|
||||
let completeFileName = fileNameReceived
|
||||
let fileExtension = completeFileName.split('.')[1]
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "Function Library",
|
||||
"definition": {
|
||||
"text": "It is a collection of functions related to a single topic. The topic is usuarlly expressed at the Function Libray's name.",
|
||||
"text": "It is a collection of functions related to a single topic. The topic is usually expressed at the Function Library's name.",
|
||||
"updated": 1614787845534
|
||||
},
|
||||
"paragraphs": [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "LF",
|
||||
"definition": {
|
||||
"text": "LF is the abbreviation of Low Frequency, and most likey refering to the Low Frequency Trading Bot implemented at the Masters Trading Mine.",
|
||||
"text": "LF is the abbreviation of Low Frequency, and most likely referring to the Low Frequency Trading Bot implemented at the Masters Trading Mine.",
|
||||
"updated": 1611577213413
|
||||
},
|
||||
"paragraphs": [
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Usually, exchanges require autentication via your exchange account key for monetary transactions only. However, some exchanges may require autentication in other contexts as well, for instance, to retrieve information above a certain quota, or to retrieve raw trades data instead of OHLCV data."
|
||||
"text": "Usually, exchanges require authentication via your exchange account key for monetary transactions only. However, some exchanges may require autentication in other contexts as well, for instance, to retrieve information above a certain quota, or to retrieve raw trades data instead of OHLCV data."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "The shot answer is becasue the Stage Size Filled did not reach the value of the Stage Target Size.",
|
||||
"text": "The short answer is because the Stage Size Filled did not reach the value of the Stage Target Size.",
|
||||
"updated": 1615100332173
|
||||
},
|
||||
{
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "For the rest of this guide, we will assume that you are using the Getting Started workspace that comes as a Plugin. If you are not, please load that workpace and close the Welcome tutorial.",
|
||||
"text": "For the rest of this guide, we will assume that you are using the Getting Started workspace that comes as a Plugin. If you are not, please load that workspace and close the Welcome tutorial.",
|
||||
"updated": 1616009292308
|
||||
},
|
||||
{
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Look for any information there related to your favorite exchange. You will probably need to undestand also the different types of parameters you can send to CCXT in order to adapt its behaviour at the specific command of fetching OHLCVs objects.",
|
||||
"text": "Look for any information there related to your favorite exchange. You will probably need to understand also the different types of parameters you can send to CCXT in order to adapt its behaviour at the specific command of fetching OHLCVs objects.",
|
||||
"updated": 1614591710131
|
||||
},
|
||||
{
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
"pageNumber": "4",
|
||||
"type": "Exchange Raw Data - Locate The Sensor Bot Code",
|
||||
"definition": {
|
||||
"text": "Open with VS Code the Task Server Folder and inmediatelly after that, add the Projects Folder to the VS Code workspace.",
|
||||
"text": "Open with VS Code the Task Server Folder and immediately after that, add the Projects Folder to the VS Code workspace.",
|
||||
"updated": 1614591834868
|
||||
},
|
||||
"paragraphs": [
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "This is the single code that is executed to extract candles and volumen in 1 minute time frame from any exchange via the CCXT library. Now you can set a breakpoint anywhere in the code to start debugging from there."
|
||||
"text": "This is the single code that is executed to extract candles and volume in 1 minute time frame from any exchange via the CCXT library. Now you can set a breakpoint anywhere in the code to start debugging from there."
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "That migh be the reason why it is not starting the debugging session."
|
||||
"text": "That might be the reason why it is not starting the debugging session."
|
||||
},
|
||||
{
|
||||
"style": "Subtitle",
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"pageNumber": "6",
|
||||
"type": "Exchange Raw Data - Find Out Why Is Not Working",
|
||||
"definition": {
|
||||
"text": "With the intelligence you gathered at Exchange Raw Data - Research Your Exchange combined with the insight provided by debuging the code step by step, you might have figure out how why it is not working.",
|
||||
"text": "With the intelligence you gathered at Exchange Raw Data - Research Your Exchange combined with the insight provided by debugging the code step by step, you might have figure out how why it is not working.",
|
||||
"updated": 1614592591570
|
||||
},
|
||||
"paragraphs": [
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
"pageNumber": "7",
|
||||
"type": "Exchange Raw Data - Fix The Problem",
|
||||
"definition": {
|
||||
"text": "At this point you will probably know if it is possible or not to extact historical information from your Favorite Exchange or not.",
|
||||
"text": "At this point you will probably know if it is possible or not to extract historical information from your Favorite Exchange or not.",
|
||||
"updated": 1614593270288
|
||||
},
|
||||
"paragraphs": [
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "If you found that your Favorite Exchange works with some special config, please contac the Team so that is can include that config in the next release and move the exchange to the branch of Tested exchanges."
|
||||
"text": "If you found that your Favorite Exchange works with some special config, please contact the Team so that is can include that config in the next release and move the exchange to the branch of Tested exchanges."
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Basically Superalgos consists of two different parts, the UI and the CLI, that live togheter. To communicate with us they use 3 different parameters defined in the Environment.js file (see default values below) and are the following:",
|
||||
"text": "Basically Superalgos consists of two different parts, the UI and the CLI, that live together. To communicate with us they use 3 different parameters defined in the Environment.js file (see default values below) and are the following:",
|
||||
"updated": 1620714602413
|
||||
},
|
||||
{
|
||||
@@ -44,7 +44,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "In the above screenshot you can see two different installation of SA running togheter at the same time. To avoi any type of conflict it's suggested to change not only the ports being used but olso to replace'localhost'with the IP of your local lan. In Windows you can know which IP is assigned to your machine with a simple CLI command. Just type ipconfig and you will presented with details about your local lan as in the following screenshot. IPv4 Address is your local IP:",
|
||||
"text": "In the above screenshot you can see two different installation of SA running together at the same time. To avoid any type of conflict it's suggested to change not only the ports being used but also to replace 'localhost' with the IP of your local lan. In Windows you can know which IP is assigned to your machine with a simple CLI command. Just type ipconfig and you will presented with details about your local lan as in the following screenshot. IPv4 Address is your local IP:",
|
||||
"updated": 1620717800744
|
||||
},
|
||||
{
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Maybe you realized that you are doing repetitive actions at the Design Space and you can benefit from automating them. If your actions are constrained to manipulating the nodes at the workspace, by either creating new nodes, deleting existing ones, changing nodes configs, establishing references or something similar, then you might be able to create an Action function that can automate all this. This will allow you to complete the action with the click of a button and stop doing those repetitive tasks youself. Not to mention help make Superalgos easier to use for everyone once you contribute your action!",
|
||||
"text": "Maybe you realized that you are doing repetitive actions at the Design Space and you can benefit from automating them. If your actions are constrained to manipulating the nodes at the workspace, by either creating new nodes, deleting existing ones, changing nodes configs, establishing references or something similar, then you might be able to create an Action function that can automate all this. This will allow you to complete the action with the click of a button and stop doing those repetitive tasks yourself. Not to mention help make Superalgos easier to use for everyone once you contribute your action!",
|
||||
"updated": 1628255167092
|
||||
},
|
||||
{
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Warning",
|
||||
"text": "Be carefull not to damage anything in the App Schema file while editing it. You will get into trouble if you do. It can not only cause the UI to not load, but also damage the workspace you are working at.",
|
||||
"text": "Be careful not to damage anything in the App Schema file while editing it. You will get into trouble if you do. It can not only cause the UI to not load, but also damage the workspace you are working at.",
|
||||
"updated": 1628255452468
|
||||
},
|
||||
{
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Locate inside the file, the definition of the Node Type you want to add the new Action to. Once localted add a menu item object to the menuItems array, like in the following example:"
|
||||
"text": "Locate inside the file, the definition of the Node Type you want to add the new Action to. Once located add a menu item object to the menuItems array, like in the following example:"
|
||||
},
|
||||
{
|
||||
"style": "Json",
|
||||
@@ -85,7 +85,7 @@
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "disableIfPropertyIsDefined: true when you want the Menu Item to be disabled if a certain property of the Node object is defined at runtime. This is used in conbination with the property propertyToCheckFor in the special situation that the Menu Item is used to create a child for this Node that is not part of a array of children and there can only be one child of that type.",
|
||||
"text": "disableIfPropertyIsDefined: true when you want the Menu Item to be disabled if a certain property of the Node object is defined at runtime. This is used in combination with the property propertyToCheckFor in the special situation that the Menu Item is used to create a child for this Node that is not part of a array of children and there can only be one child of that type.",
|
||||
"updated": 1614789912636
|
||||
},
|
||||
{
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The basic procedure is quite straight forward. First add the function name to the thisObject and then write your function at the most appropiate place at the Function Library.",
|
||||
"text": "The basic procedure is quite straight forward. First add the function name to the thisObject and then write your function at the most appropriate place at the Function Library.",
|
||||
"updated": 1628257461177
|
||||
},
|
||||
{
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "It is a very good idea to invest some time at the Utilities folder, scaning the files in there to see what you already have available to use at your actions. You will see that other actions in Function Libraries heavily rely on utilities functions defined at one of the files within the Utilities folder.",
|
||||
"text": "It is a very good idea to invest some time at the Utilities folder, scanning the files in there to see what you already have available to use at your actions. You will see that other actions in Function Libraries heavily rely on utilities functions defined at one of the files within the Utilities folder.",
|
||||
"updated": 1628257595439
|
||||
},
|
||||
{
|
||||
@@ -49,7 +49,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is the way you programatically manipulate the config of a Node:"
|
||||
"text": "This is the way you programmatically manipulate the config of a Node:"
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "It is a very good idea to invest some time at the Function-Libraries folder, scaning the files in there to see what you already have available to use at your actions. You will see that other actions in Function Libraries heavily rely on functions defined at one of the files within the Function-Libraries folder.",
|
||||
"text": "It is a very good idea to invest some time at the Function-Libraries folder, scanning the files in there to see what you already have available to use at your actions. You will see that other actions in Function Libraries heavily rely on functions defined at one of the files within the Function-Libraries folder.",
|
||||
"updated": 1628257873103
|
||||
},
|
||||
{
|
||||
@@ -19,7 +19,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "At runtime, all Function Library objects will be already instantiated by the time your Action function code runs. You just need to get to the object that host the Function Library funtion you want to execute via the UI Global Object that is available to you. For exmaple:",
|
||||
"text": "At runtime, all Function Library objects will be already instantiated by the time your Action function code runs. You just need to get to the object that host the Function Library function you want to execute via the UI Global Object that is available to you. For example:",
|
||||
"updated": 1628257884243
|
||||
},
|
||||
{
|
||||
|
||||
+17
-17
@@ -23,7 +23,7 @@
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Receving Data: the Client receives via it's http interface notifications from external sources (like Trading View) and keep the data received in-memory. This happens independently of the Webhooks Sensor Bot, meaning that it does not matter if the Webhook Sensor Bot is running or not.",
|
||||
"text": "Receiving Data: the Client receives via it's http interface notifications from external sources (like Trading View) and keep the data received in-memory. This happens independently of the Webhooks Sensor Bot, meaning that it does not matter if the Webhook Sensor Bot is running or not.",
|
||||
"updated": 1615366502234
|
||||
},
|
||||
{
|
||||
@@ -124,11 +124,11 @@
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "At the Signals Provider node you will see a message of failure or success depending if the message was succesfuly delivered to the Client or not."
|
||||
"text": "At the Signals Provider node you will see a message of failure or success depending if the message was successfully delivered to the Client or not."
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "At the Client 's console, you will see 3 lines of logs, aknolidging that the message was received or if something was wrong, an error message with the cause."
|
||||
"text": "At the Client 's console, you will see 3 lines of logs, acknowledging that the message was received or if something was wrong, an error message with the cause."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
@@ -136,7 +136,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = Sell\n[INFO] httpInterface -> Webhook -> New-Message -> Messeges waiting to be Ferched by Webhooks Sensor Bot = 1",
|
||||
"text": "[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = Sell\n[INFO] httpInterface -> Webhook -> New-Message -> Messages waiting to be Fetched by Webhooks Sensor Bot = 1",
|
||||
"updated": 1615370618823
|
||||
},
|
||||
{
|
||||
@@ -160,7 +160,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The default workspace does not feature these tasks. To create a task for the Webhooks sensor bot, you need to uninstall and re-install the corresponding market. The prcess of installing a market adds all the tasks needed to run all the bots defined at all Data Mines present at the workspace.",
|
||||
"text": "The default workspace does not feature these tasks. To create a task for the Webhooks sensor bot, you need to uninstall and re-install the corresponding market. The process of installing a market adds all the tasks needed to run all the bots defined at all Data Mines present at the workspace.",
|
||||
"updated": 1629361603647
|
||||
},
|
||||
{
|
||||
@@ -183,7 +183,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "2021-03-10T09:57:40.111Z Binance BTC/USDT Masters Webhooks Check-Webhook Main Loop # 3\n[INFO] httpInterface -> Webhook -> Fetch-Messages -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> Fetch-Messages -> Messeges Fetched by Webhooks Sensor Bot = 0",
|
||||
"text": "2021-03-10T09:57:40.111Z Binance BTC/USDT Masters Webhooks Check-Webhook Main Loop # 3\n[INFO] httpInterface -> Webhook -> Fetch-Messages -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> Fetch-Messages -> Messages Fetched by Webhooks Sensor Bot = 0",
|
||||
"updated": 1615370294905
|
||||
},
|
||||
{
|
||||
@@ -198,7 +198,7 @@
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "The Client accumulates the signas received.",
|
||||
"text": "The Client accumulates the signals received.",
|
||||
"updated": 1615370477786
|
||||
},
|
||||
{
|
||||
@@ -211,7 +211,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = Sell\n[INFO] httpInterface -> Webhook -> New-Message -> Messeges waiting to be Fetched by Webhooks Sensor Bot = 1\n[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = Sell\n[INFO] httpInterface -> Webhook -> New-Message -> Messeges waiting to be Fetched by Webhooks Sensor Bot = 2\n[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = Sell\n[INFO] httpInterface -> Webhook -> New-Message -> Messeges waiting to be Fetched by Webhooks Sensor Bot = 3\n2021-03-10T10:04:40.472Z Binance BTC/USDT Masters Webhooks Check-Webhook Main Loop # 17\n[INFO] httpInterface -> Webhook -> Fetch-Messages -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> Fetch-Messages -> Messeges Fetched by Webhooks Sensor Bot = 3",
|
||||
"text": "[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = Sell\n[INFO] httpInterface -> Webhook -> New-Message -> Messages waiting to be Fetched by Webhooks Sensor Bot = 1\n[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = Sell\n[INFO] httpInterface -> Webhook -> New-Message -> Messeges waiting to be Fetched by Webhooks Sensor Bot = 2\n[INFO] httpInterface -> Webhook -> New-Message -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> New-Message -> messageReceived = Sell\n[INFO] httpInterface -> Webhook -> New-Message -> Messeges waiting to be Fetched by Webhooks Sensor Bot = 3\n2021-03-10T10:04:40.472Z Binance BTC/USDT Masters Webhooks Check-Webhook Main Loop # 17\n[INFO] httpInterface -> Webhook -> Fetch-Messages -> Exchange-Market = binance-BTC-USDT\n[INFO] httpInterface -> Webhook -> Fetch-Messages -> Messeges Fetched by Webhooks Sensor Bot = 3",
|
||||
"updated": 1615370778562
|
||||
},
|
||||
{
|
||||
@@ -268,7 +268,7 @@
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "source: the name of the Signal Provider. This comes as part of the message sent by the provider, because is part of the URL you will specify later at the Signal Provider's system. In our example we used Trading View, but in fact it could be any other provider. You will have this property available at your Trading System, meaning that you will be able to write conditions that distingish the signal by Signal Provider.",
|
||||
"text": "source: the name of the Signal Provider. This comes as part of the message sent by the provider, because is part of the URL you will specify later at the Signal Provider's system. In our example we used Trading View, but in fact it could be any other provider. You will have this property available at your Trading System, meaning that you will be able to write conditions that distinguish the signal by Signal Provider.",
|
||||
"updated": 1615371322994
|
||||
},
|
||||
{
|
||||
@@ -337,7 +337,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "We will make ourselves sure that from within a strategy we can react to an external Signal. To test this, plese take the following steps. All of the following goes into the current Lighting Strike Backtesting Session / Task.",
|
||||
"text": "We will make ourselves sure that from within a strategy we can react to an external Signal. To test this, please take the following steps. All of the following goes into the current Lighting Strike Backtesting Session / Task.",
|
||||
"updated": 1615379790606
|
||||
},
|
||||
{
|
||||
@@ -347,7 +347,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Rigth click over the Backtesting Session node and select switch to Paper Trading so that we can simulate live trading without connecting to the exchange."
|
||||
"text": "Right click over the Backtesting Session node and select switch to Paper Trading so that we can simulate live trading without connecting to the exchange."
|
||||
},
|
||||
{
|
||||
"style": "Subtitle",
|
||||
@@ -390,7 +390,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The initialDatetime will be ingoned because we are running a Paper Trading Session. The important thing is that the finalDatetime is in the future.",
|
||||
"text": "The initialDatetime will be ignored because we are running a Paper Trading Session. The important thing is that the finalDatetime is in the future.",
|
||||
"updated": 1615380159343
|
||||
},
|
||||
{
|
||||
@@ -436,7 +436,7 @@
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Candles Volumens"
|
||||
"text": "Candles Volumes"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
@@ -470,7 +470,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Important",
|
||||
"text": "This is not necesary the first time you run this, but if you are repeating this test, you will avoid confusions since the file of signals will be accumulating the test messages you send, and at the strategy we are not checking for the age of the messages, so it is a good idea to delete this data every time you try this procedure.",
|
||||
"text": "This is not necessary the first time you run this, but if you are repeating this test, you will avoid confusions since the file of signals will be accumulating the test messages you send, and at the strategy we are not checking for the age of the messages, so it is a good idea to delete this data every time you try this procedure.",
|
||||
"updated": 1615381726583
|
||||
},
|
||||
{
|
||||
@@ -528,15 +528,15 @@
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Set-up your Firewall / Rounter to accept Incoming Connections"
|
||||
"text": "Set-up your Firewall / Router to accept Incoming Connections"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "As you might have imagined, you will need to open a port at your rounter / firewall to accept incomming connections from the signal provider's servers (like Trading View for instance). This is what allows that server to connect to the server where the Client is running, enabling the Client to receive those signals."
|
||||
"text": "As you might have imagined, you will need to open a port at your router / firewall to accept incoming connections from the signal provider's servers (like Trading View for instance). This is what allows that server to connect to the server where the Client is running, enabling the Client to receive those signals."
|
||||
},
|
||||
{
|
||||
"style": "Important",
|
||||
"text": "How you configure your Rounter / Firewall is up to you, and it depends on your network setup. You will need to do your research for details on how to do it, because it depends on which rounter / firewall you are using. We suggest you to include on the rules of your Firewall / Rounter the domain name or IP address of the Signal provider, so that nobody else can connect to the Client's http interface, which has, beyond Webhooks other features you don't want to expose openly to the world without restrictions.",
|
||||
"text": "How you configure your Router / Firewall is up to you, and it depends on your network setup. You will need to do your research for details on how to do it, because it depends on which router / firewall you are using. We suggest you to include on the rules of your Firewall / Router the domain name or IP address of the Signal provider, so that nobody else can connect to the Client's http interface, which has, beyond Webhooks other features you don't want to expose openly to the world without restrictions.",
|
||||
"updated": 1615368540044
|
||||
},
|
||||
{
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "All launch related scripts are held in the Lauch-Scripts folder in the main Superalgos directory.",
|
||||
"text": "All launch related scripts are held in the Launch-Scripts folder in the main Superalgos directory.",
|
||||
"updated": 1620504577923
|
||||
},
|
||||
{
|
||||
@@ -84,7 +84,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "There is one unifed script to automatically create and place shortcuts to the appropriate launch script. This script is automatically run during the \"node setup\" command. It can also be run individual as follows.",
|
||||
"text": "There is one unified script to automatically create and place shortcuts to the appropriate launch script. This script is automatically run during the \"node setup\" command. It can also be run individual as follows.",
|
||||
"updated": 1621802202684
|
||||
},
|
||||
{
|
||||
@@ -217,7 +217,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "There is one unifed script to automatically uninstall shortcuts. To ese it open a command prompt or terminal. Then navigate to your Superalgos directory and type the following command:",
|
||||
"text": "There is one unified script to automatically uninstall shortcuts. To ese it open a command prompt or terminal. Then navigate to your Superalgos directory and type the following command:",
|
||||
"updated": 1621804036052
|
||||
},
|
||||
{
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The backend application runs independently from the frontend browser-based application. You may close the browser at any point without affecting your data-mining operation or the bots you may be running in your testing or prodution environments. Once you restart the browser and navigate to the correct URL, the frontend app reconnects with the backend and you regain control over the whole operation.",
|
||||
"text": "The backend application runs independently from the frontend browser-based application. You may close the browser at any point without affecting your data-mining operation or the bots you may be running in your testing or production environments. Once you restart the browser and navigate to the correct URL, the frontend app reconnects with the backend and you regain control over the whole operation.",
|
||||
"updated": 1611650588719
|
||||
},
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
/*
|
||||
This module contains the functions to aggregate data into elements with
|
||||
begin and end properties. It is used by both the One Min to Market
|
||||
and One Min to Daily frameworks as a common place to haave functions
|
||||
and One Min to Daily frameworks as a common place to have functions
|
||||
used at both of them.
|
||||
*/
|
||||
const MODULE_NAME = "From One Min To Multi Time Frame Functions"
|
||||
@@ -25,9 +25,9 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
callBackFunction
|
||||
) {
|
||||
/*
|
||||
This Framework have a few contraints that we are going to check right here.
|
||||
This Framework have a few constraints that we are going to check right here.
|
||||
One of them is the fact that it can only accept one data dependency. The
|
||||
reason why is because the purpose of this framwork is to produce a transformation
|
||||
reason why is because the purpose of this framework is to produce a transformation
|
||||
between one dataset type (One-Min) to another dataset type (Multi-Time-Frame-Market).
|
||||
To do that it can only handle one dependency and it will only produce one output.
|
||||
|
||||
@@ -90,7 +90,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
*/
|
||||
statusReport = statusDependenciesModule.reportsByMainUtility.get('Market Starting Point')
|
||||
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the beginning of a month.
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[WARN] getContextVariables -> detectWhereTheMarketBegins-> Status Report does not exist. Retrying Later. ")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
@@ -102,7 +102,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
processIndex,
|
||||
MODULE_NAME,
|
||||
'Dataset Type Standard Converter',
|
||||
{ errorDetails: "getContextVariables -> detectWhereTheMarketBegins -> Can not continue because dependecy Status Report is corrupt. " },
|
||||
{ errorDetails: "getContextVariables -> detectWhereTheMarketBegins -> Can not continue because dependency Status Report is corrupt. " },
|
||||
'Status Report Is Corrupt',
|
||||
TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput
|
||||
)
|
||||
@@ -135,7 +135,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
*/
|
||||
statusReport = statusDependenciesModule.reportsByMainUtility.get('Market Ending Point')
|
||||
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the beginning of a month.
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[WARN] getContextVariables -> detectWhereTheMarketEnds-> Status Report does not exist. Retrying Later. ")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
@@ -147,7 +147,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
processIndex,
|
||||
MODULE_NAME,
|
||||
'Dataset Type Standard Converter',
|
||||
{ errorDetails: "getContextVariables -> detectWhereTheMarketEnds -> Can not continue because dependecy Status Report is corrupt. " },
|
||||
{ errorDetails: "getContextVariables -> detectWhereTheMarketEnds -> Can not continue because dependency Status Report is corrupt. " },
|
||||
'Status Report Is Corrupt',
|
||||
TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput
|
||||
)
|
||||
@@ -179,7 +179,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
*/
|
||||
statusReport = statusDependenciesModule.reportsByMainUtility.get('Self Reference')
|
||||
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
|
||||
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the beginning of a month.
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[WARN] getContextVariables -> Status Report does not exist. Retrying Later. ")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
@@ -191,7 +191,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
processIndex,
|
||||
MODULE_NAME,
|
||||
'Dataset Type Standard Converter',
|
||||
{ errorDetails: "getContextVariables -> getOwnStatusReport -> Can not continue because dependecy Status Report is corrupt. " },
|
||||
{ errorDetails: "getContextVariables -> getOwnStatusReport -> Can not continue because dependency Status Report is corrupt. " },
|
||||
'Status Report Is Corrupt',
|
||||
TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput
|
||||
)
|
||||
@@ -203,13 +203,13 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
if (thisReport.lastFile !== undefined) {
|
||||
/*
|
||||
We get in here when the report already exists, meaning that this process
|
||||
has succesfully ran before at least once.
|
||||
has successfully ran before at least once.
|
||||
*/
|
||||
contextVariables.beginingOfMarket = new Date(thisReport.beginingOfMarket)
|
||||
|
||||
if (contextVariables.beginingOfMarket.valueOf() !== contextVariables.datetimeBeginingOfMarketFile.valueOf()) { // Reset Mechanism for Begining of the Market
|
||||
if (contextVariables.beginingOfMarket.valueOf() !== contextVariables.datetimeBeginingOfMarketFile.valueOf()) { // Reset Mechanism for Beginning of the Market
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[INFO] getContextVariables -> getOwnStatusReport-> Reset Mechanism for Begining of the Market Activated.")
|
||||
"[INFO] getContextVariables -> getOwnStatusReport-> Reset Mechanism for Beginning of the Market Activated.")
|
||||
|
||||
contextVariables.beginingOfMarket = new Date(
|
||||
contextVariables.datetimeBeginingOfMarketFile.getUTCFullYear() + "-" +
|
||||
@@ -243,7 +243,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
} else {
|
||||
/*
|
||||
We get in here when the report does not exist, meaning that this process
|
||||
has never ran succesfully before at least once.
|
||||
has never ran successfully before at least once.
|
||||
*/
|
||||
contextVariables.beginingOfMarket = new Date(
|
||||
contextVariables.datetimeBeginingOfMarketFile.getUTCFullYear() + "-" +
|
||||
@@ -352,7 +352,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
callBackFunction
|
||||
) {
|
||||
/*
|
||||
Here is where we read Data Depnedency's files and add their content to whatever
|
||||
Here is where we read Data Dependency's files and add their content to whatever
|
||||
we already have in our arrays in-memory. In this way the process will run as
|
||||
many days needed and it should only stop when it reaches
|
||||
the head of the market.
|
||||
@@ -394,14 +394,14 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[WARN] nextDependencyDailyFile -> onFileReceived -> Error Parsing JSON -> err = " + err.stack)
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[WARN] nextDependencyDailyFile -> onFileReceived -> Asuming this is a temporary situation. Requesting a Retry.")
|
||||
"[WARN] nextDependencyDailyFile -> onFileReceived -> Assuming this is a temporary situation. Requesting a Retry.")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (err.message === 'File does not exist.' || err.code === 'The specified key does not exist.') {
|
||||
/*
|
||||
When a Dependency Daily File does not exist, we will asume that the process
|
||||
When a Dependency Daily File does not exist, we will assume that the process
|
||||
of fetching data was not ran at that day and that day was skipped. In such a situation
|
||||
we will produce an empty array so that this process can continue without getting stuck
|
||||
at this date where a file is missing.
|
||||
@@ -469,7 +469,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
const TOTAL_OUTPUT_ELEMENTS = INPUT_FILE_TIME_FRAME_VALUE / TIME_FRAME_VALUE
|
||||
const STARTING_DATE_VALUE = contextVariables.datetimeLastProducedFile.valueOf()
|
||||
/*
|
||||
The algorithm that follows is going to agregate elements of 1 min timeFrame
|
||||
The algorithm that follows is going to aggregate elements of 1 min timeFrame
|
||||
read from Data Dependency File, into elements of each timeFrame.
|
||||
*/
|
||||
for (let i = 0; i < TOTAL_OUTPUT_ELEMENTS; i++) {
|
||||
@@ -543,7 +543,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
element.timestamp = (new Date(element.timestamp)).valueOf()
|
||||
}
|
||||
/*
|
||||
Here we discard all the elements out of range based on the timestamp propertiy of
|
||||
Here we discard all the elements out of range based on the timestamp property of
|
||||
the Data Dependency element.
|
||||
*/
|
||||
if (
|
||||
@@ -583,7 +583,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun
|
||||
/*
|
||||
This is the LAST type of aggregation.
|
||||
|
||||
Everything that follows will be set for each element overiding the previous
|
||||
Everything that follows will be set for each element overriding the previous
|
||||
ones, so only the last values will survive.
|
||||
*/
|
||||
for (let j = 0; j < node.outputDataset.referenceParent.parentNode.record.properties.length; j++) {
|
||||
|
||||
@@ -11,7 +11,7 @@ exports.newFoundationsGlobalsLoggerVariables = function () {
|
||||
|
||||
PROCESS_INSTANCE_LOGGER_MODULE_OBJECT This is the logger module used by the process instance.
|
||||
BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT This is the logger module instantiated at every main loop and used at downstream modules.
|
||||
LOGS_TO_DELETE_QUEUE This stores the logs that need to be deleted, for auto mantainance.
|
||||
LOGS_TO_DELETE_QUEUE This stores the logs that need to be deleted, for auto maintenance.
|
||||
|
||||
*/
|
||||
return thisObject
|
||||
|
||||
@@ -94,7 +94,7 @@ exports.newFileStorage = function newFileStorage(processIndex, host, port) {
|
||||
|
||||
logger.write(MODULE_NAME, '[INFO] FileStorage -> getTextFile -> fileLocation: ' + fileLocation)
|
||||
|
||||
/* Here we actually reaad the file. */
|
||||
/* Here we actually read the file. */
|
||||
if (host === undefined || host === 'localhost' || host === ip.address() || host === '127.0.0.1') {
|
||||
/* We read the file from the local file system. */
|
||||
const fs = SA.nodeModules.fs
|
||||
@@ -251,7 +251,7 @@ exports.newFileStorage = function newFileStorage(processIndex, host, port) {
|
||||
try {
|
||||
logger.write(MODULE_NAME, '[INFO] FileStorage -> createTextFile -> fileLocation: ' + fileLocation)
|
||||
|
||||
/* If necesary a folder or folders are created before writing the file to disk. */
|
||||
/* If necessary a folder or folders are created before writing the file to disk. */
|
||||
SA.projects.foundations.utilities.filesAndDirectories.mkDirByPathSync(fileLocation)
|
||||
|
||||
/*
|
||||
@@ -282,7 +282,7 @@ exports.newFileStorage = function newFileStorage(processIndex, host, port) {
|
||||
}
|
||||
if (keepPrevious === true) {
|
||||
/*
|
||||
In some cases, we are going to keep a copy of the previous version of the file being written. This will be usefull to recover from crashes
|
||||
In some cases, we are going to keep a copy of the previous version of the file being written. This will be useful to recover from crashes
|
||||
when the file written gets corrupted for any reason.
|
||||
*/
|
||||
fs.unlink(fileLocation + '.Previous.json', onUnlinked)
|
||||
|
||||
@@ -32,7 +32,7 @@ function newNodesWarnings() {
|
||||
let arrayItem = array[i]
|
||||
let docs = arrayItem[2]
|
||||
let nodeIdArray = arrayItem[0]
|
||||
/* We migth receive here and array of node Ids. If we dont, we receive at least one node id*/
|
||||
/* We might receive here and array of node Ids. If we dont, we receive at least one node id*/
|
||||
if (Array.isArray(nodeIdArray) === true) {
|
||||
for (let j = 0; j < nodeIdArray.length; j++) {
|
||||
let nodeId = nodeIdArray[j]
|
||||
@@ -58,7 +58,7 @@ function newNodesWarnings() {
|
||||
let docs = arrayItem[2]
|
||||
let nodeId
|
||||
let nodeIdArray = arrayItem[0]
|
||||
/* We migth receive here and array of node Ids. If we dont, we receive at least one node id*/
|
||||
/* We might receive here and array of node Ids. If we dont, we receive at least one node id*/
|
||||
if (Array.isArray(nodeIdArray) === true) {
|
||||
/* For repositioning the design space we will pick the first Id at the Node Id Array */
|
||||
nodeId = nodeIdArray[0]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This module represent one layer of many possible layers that could be at the Floating Space. Objects in the same layer are subject to
|
||||
the same physics, and by being at the same level, they interact with each other. For example, they can bounce when one hit the other.
|
||||
This module posesses its own physics engine. There are different types of floating objects, but this layer takes care of each of them.
|
||||
This module possesses its own physics engine. There are different types of floating objects, but this layer takes care of each of them.
|
||||
|
||||
Floating Objects Types:
|
||||
|
||||
@@ -42,7 +42,7 @@ function newFloatingLayer() {
|
||||
let invisibleFloatingObjects = []
|
||||
|
||||
/*
|
||||
Floating objects are accesible to plotters because they carry a "payload" object that was creted by them. This object includes the position
|
||||
Floating objects are accessible to plotters because they carry a "payload" object that was created by them. This object includes the position
|
||||
and visible property. When visible turns to true, this layer module will move the reference of the floating object from the invisible array
|
||||
to the visibleFloatingObjects array. If the plotter decides that the object is to far from the what the user is seeing, it can eventually
|
||||
turn the visible property off again, forcing the layer to remove the object from the visibleFloatingObjects and place it again at the invisible
|
||||
@@ -109,7 +109,7 @@ function newFloatingLayer() {
|
||||
/*
|
||||
There are two ways to look for a floating object: by handle or by index. The search by handle is done on the visible and invisible array.
|
||||
The search by index is done only on the visible ones. The search by index is usually needed when mouse events occurs. In those cases
|
||||
only objects visible to the end usser matters.
|
||||
only objects visible to the end user matters.
|
||||
*/
|
||||
|
||||
try {
|
||||
@@ -165,7 +165,7 @@ function newFloatingLayer() {
|
||||
floatingObject.drawForeground()
|
||||
}
|
||||
|
||||
/* Invisible objects on focus (freezed) should still have some priority */
|
||||
/* Invisible objects on focus (frozen) should still have some priority */
|
||||
for (let i = 0; i < invisibleFloatingObjects.length; i++) {
|
||||
let floatingObject = invisibleFloatingObjects[i]
|
||||
floatingObject.drawOnFocus()
|
||||
@@ -256,7 +256,7 @@ function newFloatingLayer() {
|
||||
floating object has a position and a speed. In fact, each floating object has two positions at the same time:
|
||||
|
||||
1. The current position: is the position of the ball, floating around.
|
||||
2. The anchor position: is the position of where the ball is achored on the plot. This one is inside the payload object controlled by the
|
||||
2. The anchor position: is the position of where the ball is anchored on the plot. This one is inside the payload object controlled by the
|
||||
plotter.
|
||||
|
||||
The anchor position influences the current position, since the Physics engine will apply a gravity force to the ball's position in order
|
||||
@@ -295,7 +295,7 @@ function newFloatingLayer() {
|
||||
}
|
||||
|
||||
function enginePhysics() {
|
||||
/* This function makes all the calculations to apply phisycs on all visible floatingObjects in this layer. */
|
||||
/* This function makes all the calculations to apply physics on all visible floatingObjects in this layer. */
|
||||
|
||||
try {
|
||||
|
||||
@@ -319,8 +319,8 @@ function newFloatingLayer() {
|
||||
floatingObject.friction = floatingObject.friction - 0.00001
|
||||
}
|
||||
|
||||
floatingObject.currentSpeed.x = floatingObject.currentSpeed.x * floatingObject.friction // Desaceleration factor.
|
||||
floatingObject.currentSpeed.y = floatingObject.currentSpeed.y * floatingObject.friction // Desaceleration factor.
|
||||
floatingObject.currentSpeed.x = floatingObject.currentSpeed.x * floatingObject.friction // Deceleration factor.
|
||||
floatingObject.currentSpeed.y = floatingObject.currentSpeed.y * floatingObject.friction // Deceleration factor.
|
||||
|
||||
let payload = {
|
||||
position: undefined,
|
||||
@@ -473,7 +473,7 @@ function newFloatingLayer() {
|
||||
|
||||
function repulsionForceBetweenFloatingObjects(currentFloatingObject) {
|
||||
try {
|
||||
/* We generate a repulsion force between floatingObjects, that prevents them to be collisioning so often. */
|
||||
/* We generate a repulsion force between floatingObjects, that prevents them to be collision so often. */
|
||||
|
||||
const coulomb = 2
|
||||
|
||||
@@ -522,7 +522,7 @@ function newFloatingLayer() {
|
||||
y: unitVector.y * force
|
||||
}
|
||||
|
||||
/* We substract the force vector to the speed vector of the current floatingObject */
|
||||
/* We subtract the force vector to the speed vector of the current floatingObject */
|
||||
if (isNaN(forceVector.x) === false && isNaN(forceVector.y) === false) {
|
||||
floatingObject1.currentSpeed.x = floatingObject1.currentSpeed.x - forceVector.x
|
||||
floatingObject1.currentSpeed.y = floatingObject1.currentSpeed.y - forceVector.y
|
||||
@@ -570,7 +570,7 @@ function newFloatingLayer() {
|
||||
|
||||
function targetRepulsionForce(currentFloatingObject) {
|
||||
try {
|
||||
/* We generate a repulsion force between floatingObjects, that prevents them to be collisioning so often. */
|
||||
/* We generate a repulsion force between floatingObjects, that prevents them to be collision so often. */
|
||||
|
||||
const coulomb = 2
|
||||
|
||||
@@ -631,7 +631,7 @@ function newFloatingLayer() {
|
||||
y: unitVector.y * force
|
||||
}
|
||||
|
||||
/* We substract the force vector to the speed vector of the current floatingObject */
|
||||
/* We subtract the force vector to the speed vector of the current floatingObject */
|
||||
|
||||
if (isNaN(forceVector.x) === false && isNaN(forceVector.y) === false) {
|
||||
floatingObject1.currentSpeed.x = floatingObject1.currentSpeed.x - forceVector.x
|
||||
|
||||
@@ -15,7 +15,7 @@ function newFloatingObject() {
|
||||
type: undefined, // Currently there are two types of Floating Objects: Profile Balls, and Notes.
|
||||
currentSpeed: 0, // This is the current speed of the floating object.
|
||||
currentMass: 0, // This is the current mass of the floating object, including its zoom applied.
|
||||
friction: 0, // This is a factor that will ultimatelly desacelerate the floating object.
|
||||
friction: 0, // This is a factor that will ultimately decelerate the floating object.
|
||||
targetFriction: 0,
|
||||
rawMass: 0, // This is the mass value without zoom.
|
||||
rawRadius: 0, // This is the radius of this floating object without zoom.
|
||||
|
||||
@@ -246,7 +246,7 @@ function newFoundationsFloatingSpace() {
|
||||
}
|
||||
}
|
||||
|
||||
/* Movign the Floating Space to where the mouse is. */
|
||||
/* Moving the Floating Space to where the mouse is. */
|
||||
thisObject.container.frame.position.x = -mousePosition.x / browserCanvas.width * SPACE_SIZE + browserCanvas.width / 2
|
||||
thisObject.container.frame.position.y = -mousePosition.y / browserCanvas.height * SPACE_SIZE + browserCanvas.height / 2
|
||||
|
||||
@@ -255,13 +255,13 @@ function newFoundationsFloatingSpace() {
|
||||
}
|
||||
|
||||
function isItFar(payload, dontCheckParent) {
|
||||
/* If for any reason the paylaod is undefined we return false */
|
||||
/* If for any reason the payload is undefined we return false */
|
||||
if (payload === undefined) { return false }
|
||||
if (thisObject.inMapMode === true) { return false }
|
||||
|
||||
let radarFactor = 2 // How big is the margin
|
||||
|
||||
/* If the chain parent is not far, they we dont consither this far. */
|
||||
/* If the chain parent is not far, they we dont consider this far. */
|
||||
if (dontCheckParent !== true) {
|
||||
if (payload.chainParent !== undefined) {
|
||||
if (isItFar(payload.chainParent.payload, true) === false) { return false }
|
||||
@@ -287,7 +287,7 @@ function newFoundationsFloatingSpace() {
|
||||
/* Another exception are the ones who have reference parents */
|
||||
if (payload.referenceParent !== undefined) { return false }
|
||||
|
||||
/* Here we will check the position of a floatingobject to see if it is outside the screen, with a margin of one screen around. */
|
||||
/* Here we will check the position of a floating object to see if it is outside the screen, with a margin of one screen around. */
|
||||
let point = thisObject.container.frame.frameThisPoint(payload.position)
|
||||
|
||||
if (point.x > browserCanvas.width + browserCanvas.width * radarFactor) {
|
||||
|
||||
@@ -139,7 +139,7 @@ function newLayer() {
|
||||
}
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
/* Create this objects continer */
|
||||
/* Create this objects container */
|
||||
try {
|
||||
thisObject.container = newContainer()
|
||||
thisObject.container.initialize(MODULE_NAME + ' ' + thisObject.payload.node.id)
|
||||
@@ -333,7 +333,7 @@ function newLayer() {
|
||||
}
|
||||
|
||||
function checkStatusAtShutDown() {
|
||||
/* Mechanism to recover a layer that was left loading the last time the browser was shut dowm. */
|
||||
/* Mechanism to recover a layer that was left loading the last time the browser was shut down. */
|
||||
let storedValue = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(thisObject.payload, 'status')
|
||||
if (storedValue !== undefined) {
|
||||
if (storedValue === LAYER_STATUS.LOADING) {
|
||||
|
||||
@@ -390,10 +390,10 @@ function newLayersPanel() {
|
||||
syncWithConfigPhysics()
|
||||
|
||||
/*
|
||||
The overall idea here is that we need to keep syncronized the panel with the layers that are
|
||||
The overall idea here is that we need to keep synchronized the panel with the layers that are
|
||||
defined at the Designer. Users can connect or disconnect any objext resulting in changes in which
|
||||
are valid layers and which not at any point in time. So what we do here is trying to keep the panel
|
||||
only with the layers that are connected to the Charting Space hiriarcy.
|
||||
only with the layers that are connected to the Charting Space hierarchy.
|
||||
|
||||
To achieve this, first we are going to move all session related cards to a local array. Then we are
|
||||
going to check for layers at the designer, and will move back the cards which still have layers well
|
||||
@@ -408,7 +408,7 @@ function newLayersPanel() {
|
||||
moveToLocalLayers()
|
||||
syncWithDesignerLayers()
|
||||
|
||||
/* At this poins all the cards still at the local array need to be removed from the panel. */
|
||||
/* At this points all the cards still at the local array need to be removed from the panel. */
|
||||
turnOffUnusedLayers()
|
||||
calculateVisbleLayers()
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ function newLeftRightButton() {
|
||||
}
|
||||
|
||||
let isInitialized = false
|
||||
/* Cointainer stuff */
|
||||
/* Container stuff */
|
||||
|
||||
thisObject.container = newContainer()
|
||||
thisObject.container.name = 'Left Right Button'
|
||||
|
||||
@@ -39,7 +39,7 @@ function newFoundationsUtilitiesFolders() {
|
||||
let originObject = originNodePropertyArray[m]
|
||||
if (originObjectArrayPropertyName === undefined) {
|
||||
/*
|
||||
In this first Use Case, we are going to connect each orgin object clone
|
||||
In this first Use Case, we are going to connect each origin object clone
|
||||
to its origin object counter part.
|
||||
*/
|
||||
let clonedObject = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(destinationNode, clonedObjectType)
|
||||
@@ -48,7 +48,7 @@ function newFoundationsUtilitiesFolders() {
|
||||
/*
|
||||
In this second Use Case, we are going to connect an inner object that is
|
||||
inside the origin object at an array. We recognize we have to do this
|
||||
because we did receive this array proeprty name.
|
||||
because we did receive this array property name.
|
||||
*/
|
||||
let originObjectArray = originObject[originObjectArrayPropertyName]
|
||||
for (let n = 0; n < originObjectArray.length; n++) {
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Github Crendentials are Missing. The property token is missing or empty. Please create it following the guide below and try again.",
|
||||
"text": "Github Credentials are Missing. The property token is missing or empty. Please create it following the guide below and try again.",
|
||||
"updated": 1610559900470
|
||||
},
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"pageNumber": "1",
|
||||
"type": "Gov Message - Pull Requests Processed",
|
||||
"definition": {
|
||||
"text": "The pull requests at the main Superalgos repository have been succesfully processed.",
|
||||
"text": "The pull requests at the main Superalgos repository have been successfully processed.",
|
||||
"updated": 1628336677481,
|
||||
"translations": []
|
||||
},
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"pageNumber": "2",
|
||||
"type": "Gov Message - Processing Pull Requests",
|
||||
"definition": {
|
||||
"text": "Hold on while this process checks all the open PRs at the Superalgos repository at GitHub.com and merges all the ones that can be merged accorfing to the PRs Processing Rules. You will get a new message when the operation is complete.",
|
||||
"text": "Hold on while this process checks all the open PRs at the Superalgos repository at GitHub.com and merges all the ones that can be merged according to the PRs Processing Rules. You will get a new message when the operation is complete.",
|
||||
"updated": 1611002766659,
|
||||
"translations": [
|
||||
]
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "The process to pay contributors was fully successfull and all payments have been sent.",
|
||||
"text": "The process to pay contributors was fully successful and all payments have been sent.",
|
||||
"updated": 1616081292001,
|
||||
"translations": [
|
||||
]
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"pageNumber": "5",
|
||||
"type": "Gov Message - Not All Payments Were Sent",
|
||||
"definition": {
|
||||
"text": "The update pay run but no all the payments were sent. You need to check the process output to fix it and proably run it again.",
|
||||
"text": "The update pay run but no all the payments were sent. You need to check the process output to fix it and probably run it again.",
|
||||
"updated": 1615458687718,
|
||||
"translations": [
|
||||
]
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"pageNumber": "2",
|
||||
"type": "App Pay Command",
|
||||
"definition": {
|
||||
"text": "Use this command to pay to contributors using the Trasury Blockchain Account to do so. If you are not in charge of the Treasury Account you can still run this command to generate the output file of the Pay process.",
|
||||
"text": "Use this command to pay to contributors using the Treasury Blockchain Account to do so. If you are not in charge of the Treasury Account you can still run this command to generate the output file of the Pay process.",
|
||||
"updated": 1610449365984
|
||||
},
|
||||
"paragraphs": [
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Several project-specific Assets hierarchies defining multiple catetories of assets, such as:"
|
||||
"text": "Several project-specific Assets hierarchies defining multiple categories of assets, such as:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
|
||||
@@ -107,7 +107,7 @@ function newGovernanceFunctionLibraryGithubProgram() {
|
||||
) {
|
||||
node.payload.githubProgram.isActive = false
|
||||
userProfile.payload.uiObject.setErrorMessage(
|
||||
"Waiting for blockchain balance. It takes 1 minute to load the balance of each profile, bacause you are using a free API provided by BSC Scan.",
|
||||
"Waiting for blockchain balance. It takes 1 minute to load the balance of each profile, because you are using a free API provided by BSC Scan.",
|
||||
UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR
|
||||
)
|
||||
return
|
||||
@@ -150,7 +150,7 @@ function newGovernanceFunctionLibraryGithubProgram() {
|
||||
if (programNode === undefined || programNode.payload === undefined) { return }
|
||||
/*
|
||||
Here we will convert Token Power into Github Power.
|
||||
As per system rules Github Powar = 1200 SA Tokens.
|
||||
As per system rules Github Power = 1200 SA Tokens.
|
||||
*/
|
||||
let programPower = 3000
|
||||
programNode.payload.githubProgram.ownPower = programPower
|
||||
|
||||
@@ -122,7 +122,7 @@ function newGovernanceFunctionLibraryLiquidityProgram() {
|
||||
if (programNode === undefined || programNode.payload === undefined) { return }
|
||||
/*
|
||||
Here we will convert Liquidity Tokens into Liquidity Power.
|
||||
As per system rules Liquidity Powar = userProfile.payload.liquidityTokens
|
||||
As per system rules Liquidity Power = userProfile.payload.liquidityTokens
|
||||
*/
|
||||
let programPower = userProfile.payload.liquidityTokens[asset]
|
||||
programNode.payload.liquidityProgram.ownPower = programPower
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
return;
|
||||
}
|
||||
/*
|
||||
We will store here the session key, which we will need everytine
|
||||
We will store here the session key, which we will need everytime
|
||||
we need to emit an event related to the session itself.
|
||||
*/
|
||||
let VARIABLES_BY_PROCESS_INDEX = TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex)
|
||||
@@ -84,13 +84,13 @@
|
||||
function onSessionStatus() {
|
||||
if (TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SESSION_STATUS === 'Running') {
|
||||
let event = {
|
||||
status: 'Learning Session Runnning'
|
||||
status: 'Learning Session Running'
|
||||
}
|
||||
TS.projects.foundations.globals.taskConstants.EVENT_SERVER_CLIENT_MODULE_OBJECT.raiseEvent(
|
||||
TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SESSION_KEY, 'Status Response', event)
|
||||
} else {
|
||||
let event = {
|
||||
status: 'Learning Session Not Runnning'
|
||||
status: 'Learning Session Not Running'
|
||||
}
|
||||
TS.projects.foundations.globals.taskConstants.EVENT_SERVER_CLIENT_MODULE_OBJECT.raiseEvent(
|
||||
TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SESSION_KEY, 'Status Response', event)
|
||||
@@ -109,7 +109,7 @@
|
||||
return
|
||||
}
|
||||
|
||||
/* We are going to initialize here these constants whose values are comming at the event. */
|
||||
/* We are going to initialize here these constants whose values are coming at the event. */
|
||||
TS.projects.foundations.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_SYSTEM_NODE = JSON.parse(message.event.learningSystem)
|
||||
TS.projects.foundations.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_ENGINE_NODE = JSON.parse(message.event.learningEngine)
|
||||
TS.projects.foundations.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).SESSION_NODE = JSON.parse(message.event.session)
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
exports.newMachineLearningBotModulesLearningEngine = function (processIndex) {
|
||||
/*
|
||||
We call the Learning Engine to the data structure that is needed in order to exevute the
|
||||
We call the Learning Engine to the data structure that is needed in order to execute the
|
||||
learning protocol with the specific rules defined at the Learning System.
|
||||
*/
|
||||
let thisObject = {
|
||||
@@ -30,7 +30,7 @@ exports.newMachineLearningBotModulesLearningEngine = function (processIndex) {
|
||||
|
||||
if (TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).IS_SESSION_FIRST_LOOP === true) {
|
||||
/*
|
||||
Here we will go through all the nodes in the Learning Engine hiriarchy and
|
||||
Here we will go through all the nodes in the Learning Engine hierarchy and
|
||||
apply the initial value to the value property when needed
|
||||
*/
|
||||
initializeNode(learningEngine)
|
||||
@@ -115,7 +115,7 @@ exports.newMachineLearningBotModulesLearningEngine = function (processIndex) {
|
||||
if (schemaDocument === undefined) { return }
|
||||
|
||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = schemaDocument.childrenNodesProperties[i]
|
||||
|
||||
@@ -154,7 +154,7 @@ exports.newMachineLearningBotModulesLearningEngine = function (processIndex) {
|
||||
if (schemaDocument === undefined) { return }
|
||||
|
||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = schemaDocument.childrenNodesProperties[i]
|
||||
|
||||
@@ -197,7 +197,7 @@ exports.newMachineLearningBotModulesLearningEngine = function (processIndex) {
|
||||
if (schemaDocument === undefined) { return }
|
||||
|
||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = schemaDocument.childrenNodesProperties[i]
|
||||
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ exports.newMachineLearningBotModulesLearningEpisode = function (processIndex) {
|
||||
}
|
||||
|
||||
function updatedistanceToLearningEventsCounters() {
|
||||
/* Keeping Distance Counters Up-to-date while avoinding counting before the first event happens. */
|
||||
/* Keeping Distance Counters Up-to-date while avoiding counting before the first event happens. */
|
||||
/*
|
||||
if (
|
||||
learningEngine.learningCurrent.learningEpisode.distanceToLearningEvent.triggerOn.value > 0
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
exports.newMachineLearningBotModulesLearningOutput = function (processIndex) {
|
||||
/*
|
||||
This module will load if necesary all the data outputs so that they can be appended with new
|
||||
This module will load if necessary all the data outputs so that they can be appended with new
|
||||
records if needed. After running the simulation, it will save all the data outputs.
|
||||
*/
|
||||
const MODULE_NAME = 'Learning Output'
|
||||
|
||||
+3
-3
@@ -52,7 +52,7 @@
|
||||
/* Initializing the Learning Process Date */
|
||||
if (TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).IS_SESSION_FIRST_LOOP === true && TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).IS_SESSION_RESUMING === false) {
|
||||
/*
|
||||
This funcion is going to be called many times by the Learning Bot Loop.
|
||||
This function is going to be called many times by the Learning Bot Loop.
|
||||
Only during the first execution and when the User is not resuming the execution
|
||||
of a stopped session / task; we are going to initialize the Process Date Time.
|
||||
This variable tell us which day we are standing at, specially while working
|
||||
@@ -66,7 +66,7 @@
|
||||
This is the Date that is going to be used across the execution of this Learning Process.
|
||||
We need this because it has a different life cycle than the processData stored at the
|
||||
Learning Engine data structure. This date has to remain the same during the whole execution
|
||||
of the Learning Process until the end, inclusind the writting of Data Ranges and Status Reports.
|
||||
of the Learning Process until the end, including the writing of Data Ranges and Status Reports.
|
||||
The processDate of the Learning Engine data structure on the other hand can be changed during
|
||||
the simulation loop, once we discover that all candles from a certain date have benn processed.
|
||||
Here is the point where we sync one and the other.
|
||||
@@ -109,7 +109,7 @@
|
||||
Here we check if we need to get Daily Files or not. As an optimization, when
|
||||
we are running on a Time Frame of 1hs or above, we are not going to load
|
||||
dependencies on Daily Files. The way we recognize that is by checking if
|
||||
we alreaady set a value to currentTimeFrame.value. We are also not going to loop
|
||||
we already set a value to currentTimeFrame.value. We are also not going to loop
|
||||
through days if we are processing market files.
|
||||
*/
|
||||
if (currentTimeFrame.value) {
|
||||
|
||||
+11
-11
@@ -91,18 +91,18 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
if (product.config.nodePathType === 'array') {
|
||||
/*
|
||||
This means that the configured nodePath is not pointing to a node, but to a node property that is an array.
|
||||
For that reason we will assume that each element of the array is a record to be outputed
|
||||
For that reason we will assume that each element of the array is a record to be outputted
|
||||
*/
|
||||
for (let index = 0; index < productRoot.length; index++) {
|
||||
/*
|
||||
The Product Root Node is the root of the node hiriarchy from where we are going to extract the record values.
|
||||
The Product Root Node is the root of the node hierarchy from where we are going to extract the record values.
|
||||
*/
|
||||
let productRootNode = productRoot[index]
|
||||
let record = scanRecordDefinition(product, productRootNode, index)
|
||||
if (record !== undefined) {
|
||||
/*
|
||||
We will add the index value to the record itself, so that the plotter can know to which
|
||||
brach of the learning engine data structure it belongs.
|
||||
branch of the learning engine data structure it belongs.
|
||||
*/
|
||||
record.push(index)
|
||||
persistIndividualRecord(record, product, outputDatasetArray)
|
||||
@@ -114,7 +114,7 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
the record to be saved at the output file.
|
||||
*/
|
||||
/*
|
||||
The Product Root Node is the root of the node hiriarchy from where we are going to extract the record values.
|
||||
The Product Root Node is the root of the node hierarchy from where we are going to extract the record values.
|
||||
*/
|
||||
let productRootNode = productRoot
|
||||
let record = scanRecordDefinition(product, productRootNode)
|
||||
@@ -131,7 +131,7 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
for (let j = 0; j < product.record.properties.length; j++) {
|
||||
let recordProperty = product.record.properties[j]
|
||||
/*
|
||||
The Property Root Node is the Root of the Hiriarchy branch we must find in order
|
||||
The Property Root Node is the Root of the Hierarchy branch we must find in order
|
||||
to get the node where we are going to extract the value. Initially
|
||||
we point it to the Product Root Node, because that is the default in case
|
||||
a property does not have at its configuration a different nodePath configured
|
||||
@@ -150,7 +150,7 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
}
|
||||
}
|
||||
/*
|
||||
The Target Node is the node from where we are going to exctract the value.
|
||||
The Target Node is the node from where we are going to extract the value.
|
||||
We will use the codeName of the Record Property to match it with
|
||||
any of the properties of the Root Node to get the Target Node.
|
||||
*/
|
||||
@@ -170,7 +170,7 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
targetNode = propertyRootNode[recordProperty.config.childProperty]
|
||||
}
|
||||
/*
|
||||
It can happen that intead of having a Node in targetNode what we have is an
|
||||
It can happen that instead of having a Node in targetNode what we have is an
|
||||
array of nodes. We need to pick one of the elements of the array and for that
|
||||
we use the Index value we find at the configuration of the Record Property.
|
||||
*/
|
||||
@@ -187,7 +187,7 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
of Nodes defined in the Record Properties but not all of them exist at the Root Node.
|
||||
We filter out those cases by not extracting the value from the value property.
|
||||
*/
|
||||
let value = 0 // This is a default value, since we do not want null in files because it breakes JSON format.
|
||||
let value = 0 // This is a default value, since we do not want null in files because it breaks JSON format.
|
||||
if (targetNode !== undefined) {
|
||||
if (targetNode.type !== undefined) {
|
||||
/*
|
||||
@@ -250,14 +250,14 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
/*
|
||||
When dealing with Daily Files, we need to avoid to write an open object at the last 'candle' of the day,
|
||||
since the object will be duplicated on the next day. How do we know we are positioned at the last candle
|
||||
of the day? Easy: the end of the candle must be 1 millisecod before the next day. That happens at any
|
||||
of the day? Easy: the end of the candle must be 1 millisecond before the next day. That happens at any
|
||||
time frame.
|
||||
*/
|
||||
let currentDay = new Date(learningEngine.learningCurrent.learningEpisode.candle.end.value)
|
||||
let nextDay = new Date(learningEngine.learningCurrent.learningEpisode.candle.end.value + 1)
|
||||
if (currentDay.getUTCDate() !== nextDay.getUTCDate()) {
|
||||
/*
|
||||
We will save the object only if it is closed, becasuse we are at the last candle of the day.
|
||||
We will save the object only if it is closed, because we are at the last candle of the day.
|
||||
*/
|
||||
if (propertyValue === product.config.propertyValueThatClosesObject) {
|
||||
outputDatasetArray.push(record)
|
||||
@@ -274,7 +274,7 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
}
|
||||
else {
|
||||
/*
|
||||
For Market Files we will add a record everytime that proeprty value does not match this
|
||||
For Market Files we will add a record everytime that property value does not match this
|
||||
*/
|
||||
if (propertyValue !== product.config.propertyValueThatPreventsSavingObject) {
|
||||
outputDatasetArray.push(record)
|
||||
|
||||
+7
-7
@@ -179,7 +179,7 @@ exports.newMachineLearningBotModulesLearningSimulation = function (processIndex)
|
||||
// Skipping current loop if we are before initial candle:
|
||||
if (checkInitialDatetime() === false) {
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
'[INFO] runSimulation -> loop -> Candle Before the Initia Date Time @ ' + (new Date(candle.begin)).toUTCString())
|
||||
'[INFO] runSimulation -> loop -> Candle Before the Initial Date Time @ ' + (new Date(candle.begin)).toUTCString())
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ exports.newMachineLearningBotModulesLearningSimulation = function (processIndex)
|
||||
|
||||
/*
|
||||
Do the stuff needed previous to the run like
|
||||
Episode Counters and Statistics update. Mantaince is done
|
||||
Episode Counters and Statistics update. Maintenance is done
|
||||
once per simulation candle.
|
||||
*/
|
||||
learningSystemModuleObject.mantain() /* ***NOTE*** Currently empty */
|
||||
@@ -252,7 +252,7 @@ exports.newMachineLearningBotModulesLearningSimulation = function (processIndex)
|
||||
function checkIfWeNeedToStopBetweenCycles() {
|
||||
if (TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).IS_SESSION_STOPPING === true) {
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
'[INFO] runSimulation -> controlLoop -> We are going to stop here bacause we were requested to stop processing this session.')
|
||||
'[INFO] runSimulation -> controlLoop -> We are going to stop here because we were requested to stop processing this session.')
|
||||
updateEpisode('Session Stopped')
|
||||
breakLoop = true
|
||||
return
|
||||
@@ -260,7 +260,7 @@ exports.newMachineLearningBotModulesLearningSimulation = function (processIndex)
|
||||
|
||||
if (TS.projects.foundations.globals.taskVariables.IS_TASK_STOPPING === true) {
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
'[INFO] runSimulation -> controlLoop -> We are going to stop here bacause we were requested to stop processing this task.')
|
||||
'[INFO] runSimulation -> controlLoop -> We are going to stop here because we were requested to stop processing this task.')
|
||||
updateEpisode('Task Stopped')
|
||||
breakLoop = true
|
||||
return
|
||||
@@ -337,7 +337,7 @@ exports.newMachineLearningBotModulesLearningSimulation = function (processIndex)
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.newInternalLoop(currentDate, percentage)
|
||||
}
|
||||
|
||||
/* Date only hearbeat */
|
||||
/* Date only heartbeat */
|
||||
if (sessionParameters.heartbeats.config.date === true && sessionParameters.heartbeats.config.candleIndex === false) {
|
||||
hartbeatText = hartbeatText + currentDateString
|
||||
TS.projects.foundations.functionLibraries.processFunctions.processHeartBeat(processIndex, hartbeatText, percentage)
|
||||
@@ -363,7 +363,7 @@ exports.newMachineLearningBotModulesLearningSimulation = function (processIndex)
|
||||
|
||||
function positionDataStructuresAtCurrentCandle() {
|
||||
/*
|
||||
In conditions and Formulas, we want users to have an easy sintax to refer to indicators. In order to achieve that, we need the user to have
|
||||
In conditions and Formulas, we want users to have an easy syntax to refer to indicators. In order to achieve that, we need the user to have
|
||||
easy access to the current candle for instance, or the current bollinger band, meaning the one the Simulation is currently standing at.
|
||||
For that reason we do the following processing, to have at the chart data structure the current objects of each indicator / time frame.
|
||||
*/
|
||||
@@ -492,7 +492,7 @@ exports.newMachineLearningBotModulesLearningSimulation = function (processIndex)
|
||||
Note: for Daily Files, this means that the last candle of each day will never be processed.
|
||||
|
||||
The first +1 is because array indexes are based on 0.
|
||||
The second +1 is because we need to compare the next candle (remember that the loops allways avoid the
|
||||
The second +1 is because we need to compare the next candle (remember that the loops always avoid the
|
||||
last candle of the dataset available.)
|
||||
*/
|
||||
if (learningEngine.learningCurrent.learningEpisode.candle.index.value + 1 + 1 === candles.length) {
|
||||
|
||||
+4
-4
@@ -250,7 +250,7 @@ exports.newMachineLearningBotModulesLearningSystem = function (processIndex) {
|
||||
|
||||
} catch (err) {
|
||||
/*
|
||||
If an error ocurred during execution, it was alreeady logged and
|
||||
If an error occurred during execution, it was already logged and
|
||||
included at the errors array. That means we need to do nothing here,
|
||||
just prevent the execution to be halted for not handling exceptions.
|
||||
*/
|
||||
@@ -266,14 +266,14 @@ exports.newMachineLearningBotModulesLearningSystem = function (processIndex) {
|
||||
function evalNode(node, evaluating, descendentOfNodeType, isDescendent) {
|
||||
if (node === undefined) { return }
|
||||
|
||||
/* Verify if this node is decendent of the specified node type */
|
||||
/* Verify if this node is descendant of the specified node type */
|
||||
if (isDescendent !== true) {
|
||||
if (node.type === descendentOfNodeType) {
|
||||
isDescendent = true
|
||||
}
|
||||
}
|
||||
|
||||
/* Here we check if there is a codition to be evaluated */
|
||||
/* Here we check if there is a condition to be evaluated */
|
||||
if ((node.type === 'Condition' || node.type === 'Collection Condition') && evaluating === 'Conditions') {
|
||||
/* We will eval this condition */
|
||||
if (isDescendent === true) {
|
||||
@@ -296,7 +296,7 @@ exports.newMachineLearningBotModulesLearningSystem = function (processIndex) {
|
||||
if (schemaDocument === undefined) { return }
|
||||
|
||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = schemaDocument.childrenNodesProperties[i]
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ function newMachineLearningFunctionLibraryLearningSessionFunctions() {
|
||||
}
|
||||
|
||||
if (result.market.payload.parentNode.payload.parentNode === undefined) {
|
||||
node.payload.uiObject.setErrorMessage('Exchange Markets neeed to be a child of Crypto Exchange.')
|
||||
node.payload.uiObject.setErrorMessage('Exchange Markets need to be a child of Crypto Exchange.')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "Label Formula",
|
||||
"definition": {
|
||||
"text": "A user defined formula that defines which data will be feeded to a certain Data Label.",
|
||||
"text": "A user defined formula that defines which data will be fed to a certain Data Label.",
|
||||
"updated": 1615896316212
|
||||
},
|
||||
"paragraphs": [
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ exports.newMLDataObj = function(featureLen, labelLen) {
|
||||
|
||||
|
||||
/* A rank two tensor is what we typically think of as a matrix, a rank one tensor is a vector.
|
||||
* For a rank two tensor you can acccess any element with the syntax t[i, j].
|
||||
* For a rank two tensor you can access any element with the syntax t[i, j].
|
||||
* For a rank three tensor you would need to address an element with t[i, j, k].
|
||||
*/
|
||||
// setRank() : placeholder for future expansion past sequential model.
|
||||
|
||||
@@ -17,7 +17,7 @@ function newVisualScriptingFunctionLibraryNodeChildren() {
|
||||
let parentSchemaDocument = getSchemaDocument(parentNode)
|
||||
if (parentSchemaDocument !== undefined) {
|
||||
if (parentSchemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
|
||||
for (let i = 0; i < parentSchemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = parentSchemaDocument.childrenNodesProperties[i]
|
||||
|
||||
@@ -31,7 +31,7 @@ function newVisualScriptingFunctionLibraryNodeCloning() {
|
||||
|
||||
/* Children Nodes */
|
||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = schemaDocument.childrenNodesProperties[i]
|
||||
|
||||
@@ -85,7 +85,7 @@ function newVisualScriptingFunctionLibraryNodeCloning() {
|
||||
|
||||
/* Children Nodes */
|
||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = schemaDocument.childrenNodesProperties[i]
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ function newVisualScriptingFunctionLibraryNodeDeleter() {
|
||||
if (schemaDocument !== undefined) {
|
||||
/* Remove all of its own children nodes. */
|
||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = schemaDocument.childrenNodesProperties[i]
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ function newVisualScriptingUtilitiesHierarchy() {
|
||||
if (schemaDocument === undefined) { return }
|
||||
|
||||
if (schemaDocument.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoid counting each property of those as individual children.
|
||||
for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) {
|
||||
let property = schemaDocument.childrenNodesProperties[i]
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ function newVisualScriptingUtilitiesNodeChildren() {
|
||||
|
||||
function isMissingChildrenById(startingNode, checkNode, checkReferenceParent) {
|
||||
/*
|
||||
This functioin scan all the children of a node and returns true or false
|
||||
This function scan all the children of a node and returns true or false
|
||||
depending if the checkNode is a missing children.
|
||||
*/
|
||||
if (startingNode === undefined) { return }
|
||||
@@ -78,7 +78,7 @@ function newVisualScriptingUtilitiesNodeChildren() {
|
||||
|
||||
function isMissingChildrenByName(startingNode, nodeName) {
|
||||
/*
|
||||
This functioin scan all the children of a node and returns true or false
|
||||
This function scan all the children of a node and returns true or false
|
||||
depending if the node has a children with a certain name.
|
||||
*/
|
||||
if (startingNode === undefined) { return }
|
||||
@@ -121,7 +121,7 @@ function newVisualScriptingUtilitiesNodeChildren() {
|
||||
|
||||
function isMissingChildrenByType(startingNode, nodeType) {
|
||||
/*
|
||||
This functioin scan all the children of a node and returns true or false
|
||||
This function scan all the children of a node and returns true or false
|
||||
depending if the node has a children with a certain type.
|
||||
*/
|
||||
if (startingNode === undefined) { return }
|
||||
@@ -164,7 +164,7 @@ function newVisualScriptingUtilitiesNodeChildren() {
|
||||
|
||||
function findChildReferencingThisNode(startingNode, checkNode) {
|
||||
/*
|
||||
This functioin scan all the children of a node and returns the child
|
||||
This function scan all the children of a node and returns the child
|
||||
that is referencing the checkNode.
|
||||
*/
|
||||
if (startingNode === undefined) { return }
|
||||
@@ -215,7 +215,7 @@ function newVisualScriptingUtilitiesNodeChildren() {
|
||||
|
||||
function findChildByType(startingNode, nodeType) {
|
||||
/*
|
||||
This functioin scan all the children of a node and returns the child
|
||||
This function scan all the children of a node and returns the child
|
||||
that has a type as specified via parameter.
|
||||
*/
|
||||
if (startingNode === undefined) { return }
|
||||
@@ -262,7 +262,7 @@ function newVisualScriptingUtilitiesNodeChildren() {
|
||||
|
||||
function findChildByCodeName(startingNode, checkCodeName) {
|
||||
/*
|
||||
This functioin scan all the children of a node and returns the child
|
||||
This function scan all the children of a node and returns the child
|
||||
that has a codeName as specified via parameter.
|
||||
*/
|
||||
if (startingNode === undefined) { return }
|
||||
@@ -316,8 +316,8 @@ function newVisualScriptingUtilitiesNodeChildren() {
|
||||
function findOrCreateChildWithReference(startingNode, childType, referencedNode) {
|
||||
/*
|
||||
This function find the child node of starting node that references
|
||||
refereced node. If there is none, then it creates a child and stablish
|
||||
the referecen.
|
||||
referenced node. If there is none, then it creates a child and establish
|
||||
the reference.
|
||||
*/
|
||||
let child
|
||||
if (isMissingChildrenById(startingNode, referencedNode, true) === true) {
|
||||
@@ -347,7 +347,7 @@ function newVisualScriptingUtilitiesNodeChildren() {
|
||||
|
||||
function findChildIndexAtParentNode(startingNode) {
|
||||
/*
|
||||
This functioin scan all the children of a node's parent and returns the child
|
||||
This function scan all the children of a node's parent and returns the child
|
||||
index at the node property array that contains it.
|
||||
*/
|
||||
if (startingNode === undefined) { return }
|
||||
|
||||
@@ -36,15 +36,15 @@ exports.newNodeJsProcess = function () {
|
||||
//console.log('[INFO] Task Server -> Node JS Process -> process.on.exit -> About to exit -> config = ' + config)
|
||||
})
|
||||
|
||||
/* Here we listen for the message to stop this Task / Process comming from the Task Manager, which is the paret of this node js process. */
|
||||
/* Here we listen for the message to stop this Task / Process coming from the Task Manager, which is the parent of this node js process. */
|
||||
process.on('message', message => {
|
||||
if (message === 'Stop this Task') {
|
||||
|
||||
TS.projects.foundations.globals.taskVariables.IS_TASK_STOPPING = true;
|
||||
|
||||
/*
|
||||
There are some process that might no be able to end grafully, for example the ones schedulle to process information in a future day or month.
|
||||
In order to be sure that the process will be terminated, we schedulle one forced exit in 2 minutes from now.
|
||||
There are some process that might no be able to end gracefully, for example the ones schedule to process information in a future day or month.
|
||||
In order to be sure that the process will be terminated, we schedule one forced exit in 2 minutes from now.
|
||||
*/
|
||||
let key = TS.projects.foundations.globals.taskConstants.TASK_NODE.name + '-' + TS.projects.foundations.globals.taskConstants.TASK_NODE.type
|
||||
console.log('[INFO] Task Server -> Node JS Process -> process.on -> Stopping Task ' + key + '. Nodejs process will be exited in less than 1 minute.')
|
||||
|
||||
Reference in new issue
Block a user