Trading Stages Moduule

This commit is contained in:
Luis Fernando Molina committed 2020-08-04 11:32:08 +02:00
1 parent 983bb10567
commit 9fecfc8c87
7 files changed
+1250 -1124

No files matched your search

+1
View File
@@ -71,6 +71,7 @@ exports.newTradingPosition = function newTradingPosition(bot, logger, tradingEng
function closePosition() {
tradingEngine.current.position.status.value = 'Closed'
tradingEngine.current.position.end.value = tradingEngine.current.candle.end.value
tradingEngine.current.position.endRate.value = tradingEngine.current.candle.close.value
/*
Now that the position is closed, it is the right time to move this position from current to last at the Trading Engine data structure.
*/