Trading Simulation
This commit is contained in:
1 parent
01f18b07ba
commit
230c6c6099
3 files changed
+11
-5
No files matched your search
@@ -575,6 +575,13 @@
|
||||
"functionName": "newSuperalgosBotModulesTradingOutput",
|
||||
"fileName": "TradingOutput.js",
|
||||
"folderName": "Trading-Bot/Low-Frequency-Trading"
|
||||
},
|
||||
{
|
||||
"name": "Trading Simulation",
|
||||
"propertyName": "tradingSimulation",
|
||||
"functionName": "newSuperalgosBotModulesTradingSimulation",
|
||||
"fileName": "TradingSimulation.js",
|
||||
"folderName": "Trading-Bot/Low-Frequency-Trading"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+3
-4
@@ -37,8 +37,7 @@ exports.newSuperalgosBotModulesTradingOutput = function (processIndex, tradingEn
|
||||
}
|
||||
|
||||
/* Preparing everything for the Simulation */
|
||||
const TRADING_SIMULATION = require('./TradingSimulation.js')
|
||||
let tradingSimulation = TRADING_SIMULATION.newTradingSimulation(processIndex, tradingEngineModule)
|
||||
let tradingSimulationModuleObject = TS.projects.superalgos.botModules.tradingSimulation.newSuperalgosBotModulesTradingSimulation(processIndex, tradingEngineModule)
|
||||
|
||||
let outputDatasets = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray(TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
|
||||
let outputDatasetsMap = new Map()
|
||||
@@ -73,13 +72,13 @@ exports.newSuperalgosBotModulesTradingOutput = function (processIndex, tradingEn
|
||||
}
|
||||
}
|
||||
|
||||
await tradingSimulation.runSimulation(
|
||||
await tradingSimulationModuleObject.runSimulation(
|
||||
chart,
|
||||
outputDatasetsMap,
|
||||
writeFiles
|
||||
)
|
||||
|
||||
tradingSimulation.finalize()
|
||||
tradingSimulationModuleObject.finalize()
|
||||
return
|
||||
|
||||
async function initializeOutputs() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newTradingSimulation = function (processIndex, tradingEngineModule) {
|
||||
exports.newSuperalgosBotModulesTradingSimulation = function (processIndex, tradingEngineModule) {
|
||||
/*
|
||||
This Module represents the trading simulacion. Escentially a loop through a set of candles and
|
||||
the execution at each loop cycle of the Trading System Protocol.
|
||||
Reference in new issue
Block a user