diff --git a/Projects/Foundations/Schemas/Docs-Topics/T/Trading/Trading-Logic/trading-logic-002-syntax-overview.json b/Projects/Foundations/Schemas/Docs-Topics/T/Trading/Trading-Logic/trading-logic-002-syntax-overview.json index 23365ba29..45e9fe125 100644 --- a/Projects/Foundations/Schemas/Docs-Topics/T/Trading/Trading-Logic/trading-logic-002-syntax-overview.json +++ b/Projects/Foundations/Schemas/Docs-Topics/T/Trading/Trading-Logic/trading-logic-002-syntax-overview.json @@ -160,8 +160,8 @@ }, { "style": "Javascript", - "text": "productName.[tradingEngine.tradingCurrent.tradingEpisode.candle.index.value-n].propertyName", - "updated": 1616079715540 + "text": "productPluralVariable[tradingEngine.tradingCurrent.tradingEpisode.candle.index.value-n].propertyName", + "updated": 1624868076284 }, { "style": "Text", @@ -175,8 +175,8 @@ }, { "style": "Javascript", - "text": "chart.at01hs.candle.[tradingEngine.tradingCurrent.tradingEpisode.candle.index.value-5].max", - "updated": 1616079725136 + "text": "chart.at01hs.candles[tradingEngine.tradingCurrent.tradingEpisode.candle.index.value-5].max", + "updated": 1624868093927 }, { "style": "Text", diff --git a/Projects/Foundations/TS/Process-Modules/DataDependencies.js b/Projects/Foundations/TS/Process-Modules/DataDependencies.js index e67683a25..51b66a539 100644 --- a/Projects/Foundations/TS/Process-Modules/DataDependencies.js +++ b/Projects/Foundations/TS/Process-Modules/DataDependencies.js @@ -193,22 +193,34 @@ if (dataDependency.referenceParent.parentNode.config.singularVariableName === undefined) { continue } + let foundAtDependencyFilters = false /* This is the product related to this Data Dependency, as the user would type it at a Condition or Formula and appear at the UI provided filter. */ - let product = dataDependency.referenceParent.parentNode.config.singularVariableName - - if (thisObject.filters.exchange.products.get(exchange + '-' + market + '-' + product) !== true) { - /* - We will filter out all the data dependencies which are not at the filters, except for candles, - because we will need the candles dataset to run the simulation. - */ - if (dataDependency.referenceParent.parentNode.config.codeName !== 'Candles') { - continue - } + let product + /* + We will filter out all the data dependencies which are not at the filters, except for candles, + because we will need the candles dataset to run the simulation. + */ + if (dataDependency.referenceParent.parentNode.config.codeName === 'Candles') { + foundAtDependencyFilters = true + } + /* + We will consider that the user might use the singularVariableName or the pluralVariableName + as well. + */ + product = dataDependency.referenceParent.parentNode.config.singularVariableName + if (thisObject.filters.exchange.products.get(exchange + '-' + market + '-' + product) === true) { + foundAtDependencyFilters = true + } + product = dataDependency.referenceParent.parentNode.config.pluralVariableName + if (thisObject.filters.exchange.products.get(exchange + '-' + market + '-' + product) === true) { + foundAtDependencyFilters = true + } + if (foundAtDependencyFilters === true) { + addDataSet(exchange, market) } - addDataSet(exchange, market) } else { addDataSet(exchange, market) }