Merge pull request #2466 from krimsonkla/develop
Contribution: "Last of the typos"
This commit is contained in:
176 files changed
+449
-449
No files matched your search
@@ -17,14 +17,14 @@ exports.newFoundationsFunctionLibrariesProcessFilesFunctions = function () {
|
||||
let thisReport
|
||||
let statusReport
|
||||
|
||||
/* We are going to use the start date as beging of market date. */
|
||||
/* We are going to use the start date as beginning of market date. */
|
||||
contextVariables.dateBeginOfMarket = TS.projects.foundations.utilities.dateTimeFunctions.removeTime(initialDatetime)
|
||||
/*
|
||||
Here we get the status report from the bot who knows which is the end of the market.
|
||||
*/
|
||||
statusReport = statusDependencies.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 -> Status Report does not exist. Retrying Later. ")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
@@ -59,7 +59,7 @@ exports.newFoundationsFunctionLibrariesProcessFilesFunctions = function () {
|
||||
/* Finally we get our own Status Report. */
|
||||
statusReport = statusDependencies.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 -> Status Report does not exist. Retrying Later. ")
|
||||
callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_RETRY_RESPONSE)
|
||||
@@ -89,7 +89,7 @@ exports.newFoundationsFunctionLibrariesProcessFilesFunctions = function () {
|
||||
|
||||
} else {
|
||||
/*
|
||||
We are here becuse either:
|
||||
We are here because either:
|
||||
1. There is no status report
|
||||
2. There is no Last File (this happens on Market Files)
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ exports.newFoundationsFunctionLibrariesProcessFunctions = function () {
|
||||
/* Make sure that the logger associated to this process saves its cache */
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.persist()
|
||||
|
||||
/* Cancell this process timouput */
|
||||
/* Cancel this process timeout */
|
||||
clearTimeout(nextLoopTimeoutHandle)
|
||||
|
||||
let error = TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).UNEXPECTED_ERROR
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
function inflateDatafiles(processIndex, dataFiles, dataDependencies, products, mainDependency, timeFrame) {
|
||||
/*
|
||||
For each dataDependencyNode in our data dependencies, we should have a dataFile containing the records needed as an imput for this process.
|
||||
For each dataDependencyNode in our data dependencies, we should have a dataFile containing the records needed as an input for this process.
|
||||
What we need to do first is transform those records into JSON objects that can be used by user-defined formulas.
|
||||
The first step does that but with the not calculated properties, the second step adds the calculated properties.
|
||||
*/
|
||||
@@ -350,7 +350,7 @@
|
||||
}
|
||||
/*
|
||||
This function allows users to locate an object at a dataset based on the begins and end properties
|
||||
of another object provided to the function as a parameter. For example, users can localte the
|
||||
of another object provided to the function as a parameter. For example, users can locate the
|
||||
bollinger band object that has the same begin and end than a candle object.
|
||||
*/
|
||||
function getElement(dependencyName, currentRecordPrimaryDataDependency) {
|
||||
@@ -360,7 +360,7 @@
|
||||
/*
|
||||
This function allows users to locate an object at a dataset whose objects does not have a begin and end
|
||||
property but instead, they have a timestamp property. It receives an arbitrary begin / end object and
|
||||
the function will search within the dependency dataset for the first record whose timestamp is whitin
|
||||
the function will search within the dependency dataset for the first record whose timestamp is within
|
||||
the begin and end of the received reference objet. For example, a user can get the News record that belong
|
||||
to a certain Candle object.
|
||||
*/
|
||||
@@ -378,7 +378,7 @@
|
||||
Indicators might have parameters that influences it's calculations. These parameters
|
||||
are defined at the Product Definition config, and their values are set at the Process Instance config.
|
||||
Parameters are extracted at the Procedure Initialization Code. In order to facilitate this extraction
|
||||
we will create an object here that will be accesed from the Procedure Initialization with all parameters
|
||||
we will create an object here that will be accessed from the Procedure Initialization with all parameters
|
||||
and their defined values.
|
||||
*/
|
||||
let parameters = {}
|
||||
@@ -410,7 +410,7 @@
|
||||
lastInstantOfTheDay = currentDay.valueOf() + SA.projects.foundations.globals.timeConstants.ONE_DAY_IN_MILISECONDS - 1;
|
||||
|
||||
if (interExecutionMemory[productName] === undefined) {
|
||||
/* The first time the intialization variables goes to the Inter Execution Memory. */
|
||||
/* The first time the initialization variables goes to the Inter Execution Memory. */
|
||||
interExecutionMemory[productName] = {}
|
||||
interExecutionMemory[productName].variable = JSON.parse(JSON.stringify(variable))
|
||||
}
|
||||
@@ -420,7 +420,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Here we run the Prcedure Loop Code */
|
||||
/* Here we run the Procedure Loop Code */
|
||||
if (dataBuildingProcedure.loop !== undefined) {
|
||||
if (dataBuildingProcedure.loop.procedureJavascriptCode !== undefined) {
|
||||
let lastRecord
|
||||
@@ -507,7 +507,7 @@
|
||||
|
||||
if (resultsWithIrregularPeriods === true) {
|
||||
/*
|
||||
Here we have an special problem that occurs when an object spans several time peridos. If not taken care of
|
||||
Here we have an special problem that occurs when an object spans several time periods. If not taken care of
|
||||
it can happen that the object gets splitted between 2 days, which we dont want since it would loose some of
|
||||
its properties.
|
||||
|
||||
@@ -607,7 +607,7 @@
|
||||
Here we check that the Task Node received, comes with all the upstream nodes that will be
|
||||
needed to run this task in the context of a Single Market Bot.
|
||||
*/
|
||||
/* Validate that the minimun amount of input required are defined. */
|
||||
/* Validate that the minimum amount of input required are defined. */
|
||||
if (TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode === undefined) {
|
||||
TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_INSTANCE_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
|
||||
"[ERROR] checkUpstreamOfTaskNode -> Task without a Task Manager. This bot process will not run. -> Process Instance = " + JSON.stringify(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex]));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
exports.newFoundationsGlobalsProcessVariables = function () {
|
||||
/*
|
||||
We need to count how many process instances we deployd and how many of them have already finished their job, either
|
||||
because they just finished or because there was a request to stop the proceses. In this way, once we reach the
|
||||
amount of instances started, we can safelly destroy the rest of the objects running and let this nodejs process die.
|
||||
because they just finished or because there was a request to stop the processes. In this way, once we reach the
|
||||
amount of instances started, we can safely destroy the rest of the objects running and let this nodejs process die.
|
||||
*/
|
||||
let thisObject = {
|
||||
ENDED_PROCESSES_COUNTER: 0,
|
||||
@@ -13,7 +13,7 @@ exports.newFoundationsGlobalsProcessVariables = function () {
|
||||
/*
|
||||
VARIABLES_BY_PROCESS_INDEX_MAP
|
||||
|
||||
At the Task Server, a Task run Procesess, potentially many of them, depending on definitions external to the
|
||||
At the Task Server, a Task run Processes, potentially many of them, depending on definitions external to the
|
||||
Task Server. Each process is independent from each other and have a set of process level variables that help
|
||||
the process do its job. You can consider these variables as the process state. All the modules running inside
|
||||
a process know the processIndex, and with that index they can get this Map that contains all the needed variables
|
||||
@@ -33,7 +33,7 @@ exports.newFoundationsGlobalsProcessVariables = function () {
|
||||
IS_SESSION_STOPPING This tell us if a session is in the process of being stopped.
|
||||
IS_SESSION_RESUMING This tell us if a session is resuming from the state at the previous execution.
|
||||
IS_SESSION_FIRST_LOOP This tell us if we are at the execution of the first loop of the bot related to this session.
|
||||
SIMULATION_STATE This is the state of a simulaation, as it is loaded from disk.
|
||||
SIMULATION_STATE This is the state of a simulation, as it is loaded from disk.
|
||||
PROCESS_DATETIME This holds the date currently being processed.
|
||||
DAILY_FILES_PROCESS_DATETIME When processing daily files, this holds the date of the file being processed.
|
||||
TRADING_PROCESSING_DAILY_FILES When in a trading process, this tell us if we are processing Daily Files or not.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
exports.newFoundationsGlobalsTaskVariables = function () {
|
||||
/*
|
||||
Since the moment the task is stopped by the UI untiil the time the task can be stopped gracefully,
|
||||
Since the moment the task is stopped by the UI until the time the task can be stopped gracefully,
|
||||
we turn on this switch that will signal every internal procedure that it must stop.
|
||||
*/
|
||||
let thisObject = {
|
||||
|
||||
@@ -85,10 +85,10 @@
|
||||
This means that if the same task, with the same process, pointing to the same
|
||||
process definition in the same data mine, with the same exchange and market
|
||||
configured, is at two different network nodes at the same time, the current task
|
||||
is going to depend on the first one found, not necesarily the one running at the
|
||||
is going to depend on the first one found, not necessarily the one running at the
|
||||
same network node. If you need to control witch task specifically to depend on
|
||||
and need to exactly the same task to exist, you should split the network in two
|
||||
different networks, each one with unique tasks so as to avoid confussion.
|
||||
different networks, each one with unique tasks so as to avoid confusion.
|
||||
*/
|
||||
for (let i = 0; i < network.lanNetworkNodes.length; i++) {
|
||||
let lanNetworkNode = network.lanNetworkNodes[i]
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
function raiseEvents(lastFile, timeFrames, callBackFunction) {
|
||||
try {
|
||||
/* We will reaise the events for the datasets impacted by the process that just finished. */
|
||||
/* We will raise the events for the datasets impacted by the process that just finished. */
|
||||
|
||||
if (TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput !== undefined) {
|
||||
let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
try {
|
||||
/* Basic Valdidations */
|
||||
/* Basic Validations */
|
||||
if (TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies !== undefined) {
|
||||
if (TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies.statusDependencies !== undefined) {
|
||||
thisObject.nodeArray = TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies.statusDependencies
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
/*
|
||||
|
||||
A Status Report is a file that every bot reads at the begining of its execution
|
||||
A Status Report is a file that every bot reads at the beginning of its execution
|
||||
and saves after it finishes its job. The purpose of the file is to record checkpoint information
|
||||
of what was the last thing done by the bot and helpfull enough to start the next execution.
|
||||
of what was the last thing done by the bot and helpful enough to start the next execution.
|
||||
It usually does not include business related context data.
|
||||
|
||||
*/
|
||||
@@ -332,11 +332,11 @@
|
||||
|
||||
let canUserPrevious
|
||||
/*
|
||||
If we are funning Trading Engines, we can not allow ourselves to use a Status Report that is not
|
||||
the latest one, because it might contain transactioinal information related to the context of the
|
||||
If we are running Trading Engines, we can not allow ourselves to use a Status Report that is not
|
||||
the latest one, because it might contain transactional information related to the context of the
|
||||
operations the trading engine is doing.
|
||||
|
||||
On the contraty, if we are running a Sensor bot, API Data Fetcher, or an Indicator we might, if necesary,
|
||||
On the contrary, if we are running a Sensor bot, API Data Fetcher, or an Indicator we might, if necessary,
|
||||
use a previous version of a Status Report since there will be no big impact, just some reprocessing.
|
||||
*/
|
||||
if (TS.projects.foundations.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).SESSION_NODE !== undefined) {
|
||||
|
||||
Reference in new issue
Block a user