bot parameter removed from all files
This commit is contained in:
1 parent
042241de0f
commit
28f4c56d56
49 files changed
+108
-128
No files matched your search
@@ -1,4 +1,4 @@
|
||||
exports.newAnnouncements = function (processIndex, bot, logger) {
|
||||
exports.newAnnouncements = function (processIndex, logger) {
|
||||
|
||||
const MODULE_NAME = 'Announcements'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newExchangeAPI = function (processIndex, bot, logger) {
|
||||
exports.newExchangeAPI = function (processIndex, logger) {
|
||||
|
||||
let MODULE_NAME = "Exchange API";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newOrdersCalculations = function (processIndex, bot, logger) {
|
||||
exports.newOrdersCalculations = function (processIndex, logger) {
|
||||
/*
|
||||
When we are live trading, we need to syncronize with the exchange.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newOrdersSimulations = function (processIndex, bot, logger) {
|
||||
exports.newOrdersSimulations = function (processIndex, logger) {
|
||||
/*
|
||||
When we are backtesting or paper trading, we need to simulate what would have happened at the exchange.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newSnapshots = function (processIndex, bot, logger) {
|
||||
exports.newSnapshots = function (processIndex, logger) {
|
||||
/*
|
||||
This module encapsulates the snapshots functionality.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingEngine = function (processIndex, bot, logger) {
|
||||
exports.newTradingEngine = function (processIndex, logger) {
|
||||
/*
|
||||
We call the Trading Engine to the data structure that is needed in order to exevute the
|
||||
trading protocol with the specific rules defined at the Trading System.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingEpisode = function (processIndex, bot, logger, tradingEngineModule) {
|
||||
exports.newTradingEpisode = function (processIndex, logger, tradingEngineModule) {
|
||||
/*
|
||||
This module packages all functions related to Episodes.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingExecution = function (processIndex, bot, logger, tradingEngineModule) {
|
||||
exports.newTradingExecution = function (processIndex, logger, tradingEngineModule) {
|
||||
/*
|
||||
The Trading Execution modules manages the execution nodes and execution algoritms.
|
||||
*/
|
||||
@@ -17,7 +17,7 @@ exports.newTradingExecution = function (processIndex, bot, logger, tradingEngine
|
||||
let sessionParameters
|
||||
|
||||
const TRADING_ORDERS_MODULE = require('./TradingOrders.js')
|
||||
let tradingOrdersModule = TRADING_ORDERS_MODULE.newTradingOrders(processIndex, bot, logger, tradingEngineModule)
|
||||
let tradingOrdersModule = TRADING_ORDERS_MODULE.newTradingOrders(processIndex, logger, tradingEngineModule)
|
||||
|
||||
return thisObject
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingOrders = function (processIndex, bot, logger, tradingEngineModule) {
|
||||
exports.newTradingOrders = function (processIndex, logger, tradingEngineModule) {
|
||||
/*
|
||||
The Trading Orders modules manages the execution of orders against the exchanges.
|
||||
*/
|
||||
@@ -17,10 +17,10 @@ exports.newTradingOrders = function (processIndex, bot, logger, tradingEngineMod
|
||||
let sessionParameters
|
||||
|
||||
const EXCHANGE_API_MODULE = require('./ExchangeAPI.js')
|
||||
let exchangeAPIModule = EXCHANGE_API_MODULE.newExchangeAPI(processIndex, bot, logger)
|
||||
let exchangeAPIModule = EXCHANGE_API_MODULE.newExchangeAPI(processIndex, logger)
|
||||
|
||||
const ANNOUNCEMENTS_MODULE = require('./Announcements.js')
|
||||
let announcementsModule = ANNOUNCEMENTS_MODULE.newAnnouncements(processIndex, bot, logger)
|
||||
let announcementsModule = ANNOUNCEMENTS_MODULE.newAnnouncements(processIndex, logger)
|
||||
|
||||
return thisObject
|
||||
|
||||
@@ -572,7 +572,7 @@ exports.newTradingOrders = function (processIndex, bot, logger, tradingEngineMod
|
||||
tradingEngineOrder.status.value = 'Closed'
|
||||
/*
|
||||
We must be carefull here not to overide an already defined exitType. It can happen
|
||||
for instance that the order was cancellerd from the bot, but veryfing the cancellation
|
||||
for instance that the order was cancellerd from the but veryfing the cancellation
|
||||
was not possible because of a connection to the exchange problem. In that case
|
||||
the exit type was defined but the order was kept open until the verification could be done.
|
||||
*/
|
||||
@@ -658,7 +658,7 @@ exports.newTradingOrders = function (processIndex, bot, logger, tradingEngineMod
|
||||
let previousQuotedAssetFeesPaid = tradingEngineOrder.orderQuotedAsset.feesPaid.value
|
||||
|
||||
const ORDERS_SIMULATIONS_MODULE = require('./OrdersSimulations.js')
|
||||
let ordersSimulationsModule = ORDERS_SIMULATIONS_MODULE.newOrdersSimulations(processIndex, bot, logger)
|
||||
let ordersSimulationsModule = ORDERS_SIMULATIONS_MODULE.newOrdersSimulations(processIndex, logger)
|
||||
ordersSimulationsModule.initialize()
|
||||
|
||||
ordersSimulationsModule.actualSizeSimulation(tradingEngineStage, tradingSystemOrder, tradingEngineOrder, applyFeePercentage)
|
||||
@@ -690,7 +690,7 @@ exports.newTradingOrders = function (processIndex, bot, logger, tradingEngineMod
|
||||
let previousQuotedAssetFeesPaid = tradingEngineOrder.orderQuotedAsset.feesPaid.value
|
||||
|
||||
const ORDERS_CALCULATIONS_MODULE = require('./OrdersCalculations.js')
|
||||
let ordersCalculationsModule = ORDERS_CALCULATIONS_MODULE.newOrdersCalculations(processIndex, bot, logger)
|
||||
let ordersCalculationsModule = ORDERS_CALCULATIONS_MODULE.newOrdersCalculations(processIndex, logger)
|
||||
ordersCalculationsModule.initialize()
|
||||
|
||||
await ordersCalculationsModule.actualSizeCalculation(tradingEngineStage, tradingSystemOrder, tradingEngineOrder, order, applyFeePercentage)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingOutput = function (processIndex, bot, logger, tradingEngineModule, UTILITIES, FILE_STORAGE) {
|
||||
exports.newTradingOutput = function (processIndex, logger, tradingEngineModule, UTILITIES, FILE_STORAGE) {
|
||||
/*
|
||||
This module will load if necesary all the data outputs so that they can be appended with new
|
||||
records if needed. After running the simulation, it will save all the data outputs.
|
||||
@@ -38,7 +38,7 @@ exports.newTradingOutput = function (processIndex, bot, logger, tradingEngineMod
|
||||
|
||||
/* Preparing everything for the Simulation */
|
||||
const TRADING_SIMULATION = require('./TradingSimulation.js')
|
||||
let tradingSimulation = TRADING_SIMULATION.newTradingSimulation(processIndex, bot, logger, tradingEngineModule, UTILITIES)
|
||||
let tradingSimulation = TRADING_SIMULATION.newTradingSimulation(processIndex, logger, tradingEngineModule, UTILITIES)
|
||||
|
||||
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()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingPosition = function (processIndex, bot, logger, tradingEngineModule) {
|
||||
exports.newTradingPosition = function (processIndex, logger, tradingEngineModule) {
|
||||
/*
|
||||
This module packages all functions related to Positions.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingProcess = function (processIndex, bot, logger, UTILITIES) {
|
||||
exports.newTradingProcess = function (processIndex, logger, UTILITIES) {
|
||||
/*
|
||||
This Module will load all the process data dependencies from files and send them downstream.
|
||||
After execution, will save the time range and status report of the process.
|
||||
@@ -24,10 +24,10 @@
|
||||
let fileStorage = FILE_STORAGE.newFileStorage(logger);
|
||||
|
||||
const TRADING_ENGINE_MODULE = require('./TradingEngine.js')
|
||||
let tradingEngineModule = TRADING_ENGINE_MODULE.newTradingEngine(processIndex, bot, logger)
|
||||
let tradingEngineModule = TRADING_ENGINE_MODULE.newTradingEngine(processIndex, logger)
|
||||
|
||||
let TRADING_OUTPUT_MODULE = require("./TradingOutput")
|
||||
let tradingOutputModule = TRADING_OUTPUT_MODULE.newTradingOutput(processIndex, bot, logger, tradingEngineModule, UTILITIES, FILE_STORAGE)
|
||||
let tradingOutputModule = TRADING_OUTPUT_MODULE.newTradingOutput(processIndex, logger, tradingEngineModule, UTILITIES, FILE_STORAGE)
|
||||
|
||||
let processConfig;
|
||||
|
||||
@@ -550,7 +550,7 @@
|
||||
|
||||
function buildCharts(chart) {
|
||||
const COMMONS = require('../Commons.js')
|
||||
let commons = COMMONS.newCommons(bot, logger, UTILITIES, FILE_STORAGE)
|
||||
let commons = COMMONS.newCommons(logger, UTILITIES, FILE_STORAGE)
|
||||
|
||||
let mainDependency = {}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingRecords = function (processIndex, bot, logger) {
|
||||
exports.newTradingRecords = function (processIndex, logger) {
|
||||
/*
|
||||
This module facilitates the appending of records to the output of the process.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingSimulation = function (processIndex, bot, logger, tradingEngineModule, UTILITIES) {
|
||||
exports.newTradingSimulation = function (processIndex, logger, tradingEngineModule, UTILITIES) {
|
||||
/*
|
||||
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.
|
||||
@@ -11,7 +11,7 @@ exports.newTradingSimulation = function (processIndex, bot, logger, tradingEngin
|
||||
runSimulation: runSimulation
|
||||
}
|
||||
|
||||
let utilities = UTILITIES.newCloudUtilities(bot, logger)
|
||||
let utilities = UTILITIES.newCloudUtilities(logger)
|
||||
|
||||
return thisObject
|
||||
|
||||
@@ -35,15 +35,15 @@ exports.newTradingSimulation = function (processIndex, bot, logger, tradingEngin
|
||||
|
||||
/* These are the Modules we will need to run the Simulation */
|
||||
const TRADING_RECORDS_MODULE = require('./TradingRecords.js')
|
||||
let tradingRecordsModule = TRADING_RECORDS_MODULE.newTradingRecords(processIndex, bot, logger)
|
||||
let tradingRecordsModule = TRADING_RECORDS_MODULE.newTradingRecords(processIndex, logger)
|
||||
tradingRecordsModule.initialize(outputDatasetsMap)
|
||||
|
||||
const TRADING_SYSTEM_MODULE = require('./TradingSystem.js')
|
||||
let tradingSystemModule = TRADING_SYSTEM_MODULE.newTradingSystem(processIndex, bot, logger, tradingEngineModule)
|
||||
let tradingSystemModule = TRADING_SYSTEM_MODULE.newTradingSystem(processIndex, logger, tradingEngineModule)
|
||||
tradingSystemModule.initialize()
|
||||
|
||||
const TRADING_EPISODE_MODULE = require('./TradingEpisode.js')
|
||||
let tradingEpisodeModule = TRADING_EPISODE_MODULE.newTradingEpisode(processIndex, bot, logger, tradingEngineModule)
|
||||
let tradingEpisodeModule = TRADING_EPISODE_MODULE.newTradingEpisode(processIndex, logger, tradingEngineModule)
|
||||
tradingEpisodeModule.initialize()
|
||||
|
||||
/* Setting up the candles array: The whole simulation is based on the array of candles at the time-frame defined at the session parameters. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingStages = function (processIndex, bot, logger, tradingEngineModule) {
|
||||
exports.newTradingStages = function (processIndex, logger, tradingEngineModule) {
|
||||
/*
|
||||
This module packages all functions related to Stages.
|
||||
*/
|
||||
@@ -21,22 +21,22 @@ exports.newTradingStages = function (processIndex, bot, logger, tradingEngineMod
|
||||
}
|
||||
|
||||
const TRADING_STRATEGY_MODULE = require('./TradingStrategy.js')
|
||||
let tradingStrategyModule = TRADING_STRATEGY_MODULE.newTradingStrategy(processIndex, bot, logger, tradingEngineModule)
|
||||
let tradingStrategyModule = TRADING_STRATEGY_MODULE.newTradingStrategy(processIndex, logger, tradingEngineModule)
|
||||
|
||||
const TRADING_POSITION_MODULE = require('./TradingPosition.js')
|
||||
let tradingPositionModule = TRADING_POSITION_MODULE.newTradingPosition(processIndex, bot, logger, tradingEngineModule)
|
||||
let tradingPositionModule = TRADING_POSITION_MODULE.newTradingPosition(processIndex, logger, tradingEngineModule)
|
||||
|
||||
const TRADING_ENGINE_EXECUTION = require('./TradingExecution.js')
|
||||
let tradingExecutionModule = TRADING_ENGINE_EXECUTION.newTradingExecution(processIndex, bot, logger, tradingEngineModule)
|
||||
let tradingExecutionModule = TRADING_ENGINE_EXECUTION.newTradingExecution(processIndex, logger, tradingEngineModule)
|
||||
|
||||
const ANNOUNCEMENTS_MODULE = require('./Announcements.js')
|
||||
let announcementsModule = ANNOUNCEMENTS_MODULE.newAnnouncements(processIndex, bot, logger)
|
||||
let announcementsModule = ANNOUNCEMENTS_MODULE.newAnnouncements(processIndex, logger)
|
||||
|
||||
const SNAPSHOTS_MODULE = require('./Snapshots.js')
|
||||
let snapshotsModule = SNAPSHOTS_MODULE.newSnapshots(processIndex, bot, logger)
|
||||
let snapshotsModule = SNAPSHOTS_MODULE.newSnapshots(processIndex, logger)
|
||||
|
||||
const TRADING_EPISODE_MODULE = require('./TradingEpisode.js')
|
||||
let tradingEpisodeModule = TRADING_EPISODE_MODULE.newTradingEpisode(processIndex, bot, logger)
|
||||
let tradingEpisodeModule = TRADING_EPISODE_MODULE.newTradingEpisode(processIndex, logger)
|
||||
|
||||
let tradingEngine
|
||||
let tradingSystem
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingStrategy = function (processIndex, bot, logger, tradingEngineModule) {
|
||||
exports.newTradingStrategy = function (processIndex, logger, tradingEngineModule) {
|
||||
/*
|
||||
This module packages all functions related to Strategies.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
exports.newTradingSystem = function (processIndex, bot, logger, tradingEngineModule) {
|
||||
exports.newTradingSystem = function (processIndex, logger, tradingEngineModule) {
|
||||
/*
|
||||
The Trading System is the user defined set of rules compliant with the Trading Protocol that
|
||||
defines the trading logic to be applied during each cycle of the Simulation.
|
||||
@@ -20,7 +20,7 @@ exports.newTradingSystem = function (processIndex, bot, logger, tradingEngineMod
|
||||
let dynamicIndicators
|
||||
|
||||
const TRADING_STAGES_MODULE = require('./TradingStages.js')
|
||||
let tradingStagesModule = TRADING_STAGES_MODULE.newTradingStages(processIndex, bot, logger, tradingEngineModule)
|
||||
let tradingStagesModule = TRADING_STAGES_MODULE.newTradingStages(processIndex, logger, tradingEngineModule)
|
||||
|
||||
|
||||
return thisObject
|
||||
|
||||
Reference in new issue
Block a user