Dependency Fileter Refactoring
This commit is contained in:
1 parent
bc5fa505d8
commit
240d549fc7
3 files changed
+10
-6
No files matched your search
@@ -1,20 +1,24 @@
|
||||
function newSuperalgosFunctionLibraryDependenciesFilter() {
|
||||
/*
|
||||
A Dependency Filter is list of Indicators a Strategy depends
|
||||
on, that is later used to filter out all the other indicators
|
||||
the Trading Bot depends on.
|
||||
|
||||
The function will scen a node branch, most likely a Trading System,
|
||||
looking into the code property of each node. It will analyze it's
|
||||
content and try to make a list of all indicators mentioned at the code
|
||||
text and at which time frames they are mentioned.
|
||||
|
||||
It is important to note that all node that are not of the type
|
||||
Javascript Code are going to be filtered out.
|
||||
It is important to note that all nodes that are not of the type
|
||||
Javascript Code or Formula are going to be ignored.
|
||||
*/
|
||||
thisObject = {
|
||||
createFilter: createFilter
|
||||
createDependencyFilter: createDependencyFilter
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function createFilter(node) {
|
||||
function createDependencyFilter(node) {
|
||||
let filters = new Map()
|
||||
recursiveFilter(node)
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ function newSuperalgosFunctionLibraryLearningSessionFunctions() {
|
||||
|
||||
let session = UI.projects.superalgos.functionLibraries.protocolNode.getProtocolNode(node, false, true, true, false, false, lightingPath)
|
||||
|
||||
let dependencyFilter = UI.projects.superalgos.functionLibraries.dependenciesFilter.createFilter(node.tradingSystemReference.payload.referenceParent)
|
||||
let dependencyFilter = UI.projects.superalgos.functionLibraries.dependenciesFilter.createDependencyFilter(node.tradingSystemReference.payload.referenceParent)
|
||||
|
||||
/* Raise event to run the session */
|
||||
let event = {
|
||||
|
||||
@@ -123,7 +123,7 @@ function newSuperalgosFunctionLibraryTradingSessionFunctions() {
|
||||
|
||||
let session = UI.projects.superalgos.functionLibraries.protocolNode.getProtocolNode(node, false, true, true, false, false, lightingPath)
|
||||
|
||||
let dependencyFilter = UI.projects.superalgos.functionLibraries.dependenciesFilter.createFilter(node.tradingSystemReference.payload.referenceParent)
|
||||
let dependencyFilter = UI.projects.superalgos.functionLibraries.dependenciesFilter.createDependencyFilter(node.tradingSystemReference.payload.referenceParent)
|
||||
|
||||
/* Raise event to run the session */
|
||||
let event = {
|
||||
|
||||
Reference in new issue
Block a user