Merge pull request #1844 from Ferrox85/develop

Minor Tweak to snapshot
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-09-22 14:25:10 -04:00
commit 8db9598060
1 file changed
+5 -4
@@ -63,9 +63,10 @@ exports.newFoundationsBotModulesSnapshots = function(processIndex) {
function finalize() {
//trigger exits added for extra save moment for datapreserve
strategyExit()
positionExit()
if (tradingEngine.tradingCurrent.strategy.begin.value > 0) {
strategyExit()
positionExit()
}
writeSnapshotFiles()
tradingEngine = undefined
tradingSystem = undefined
@@ -449,7 +450,7 @@ exports.newFoundationsBotModulesSnapshots = function(processIndex) {
function onFileReceived(err, text) {
if (err.result === TS.projects.foundations.globals.standardResponses.DEFAULT_OK_RESPONSE.result) {
try {
// remove the last linebreak and seperator wich is introduced extra during save
// remove the last linebreak and seperator which is introduced extra during save
text = text.replace(/\n$/, '')
text = text.replace(/\r\n$/, '')
writeOutput(text)