Merge pull request #1243 from Luis-Fernando-Molina/develop
Contribution: Dependency Filter Fixed so that it allows the pluralVariableName of Products to be mentioned in User Code and still load the dependency
This commit is contained in:
2 files changed
+27
-15
No files matched your search
+4
-4
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user