Async Await implementation at Trading Process
This commit is contained in:
1 parent
ea047363af
commit
fdbffef52e
17 files changed
+902
-905
No files matched your search
@@ -7,6 +7,7 @@ exports.newTradingStages = function newTradingStages(bot, logger, tradingEngineM
|
||||
updateChart: updateChart,
|
||||
mantain: mantain,
|
||||
reset: reset,
|
||||
calculateStatistics: calculateStatistics,
|
||||
runTriggerStage: runTriggerStage,
|
||||
runOpenStage: runOpenStage,
|
||||
runManageStage: runManageStage,
|
||||
@@ -101,6 +102,11 @@ exports.newTradingStages = function newTradingStages(bot, logger, tradingEngineM
|
||||
resetTradingEngineDataStructure()
|
||||
}
|
||||
|
||||
function calculateStatistics() {
|
||||
tradingEpisodeModule.calculateStatistics()
|
||||
tradingPositionModule.calculateStatistics()
|
||||
}
|
||||
|
||||
function runTriggerStage() {
|
||||
/*
|
||||
We check if we will be triggering on, off or taking position.
|
||||
@@ -870,9 +876,6 @@ exports.newTradingStages = function newTradingStages(bot, logger, tradingEngineM
|
||||
/* Close the Position */
|
||||
tradingPositionModule.closePosition()
|
||||
|
||||
tradingEpisodeModule.calculateResults()
|
||||
tradingEpisodeModule.calculateStatistics()
|
||||
|
||||
/* Close the Strategy */
|
||||
tradingStrategyModule.closeStrategy('Position Closed')
|
||||
|
||||
|
||||
Reference in new issue
Block a user