From 4cdf5db8fe7e38a29d654b17ff1c3ed57efa46c9 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 25 Jan 2021 14:38:02 +0100 Subject: [PATCH] Reference to Phase Node Missing Error handlling Improved / Integrated with Docs --- .../Schemas/Docs-Concepts/lf-trading-bot.json | 13 ++++++++++++ ...error-reference-to-phase-node-missing.json | 20 +++++++++++++++++++ .../Low-Frequency-Trading/TradingStages.js | 20 +++++++++++++++++-- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Concepts/lf-trading-bot.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-errors-004-ts-lf-trading-bot-error-reference-to-phase-node-missing.json diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/lf-trading-bot.json b/Projects/Superalgos/Schemas/Docs-Concepts/lf-trading-bot.json new file mode 100644 index 000000000..a3e905525 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Concepts/lf-trading-bot.json @@ -0,0 +1,13 @@ +{ + "type": "LF Trading Bot", + "definition": { + "text": "The Low Frequency Trading Bot is an implementation of at the Masters Trading Mine of a Trading Bot specialized in executing strategies for time frames of 1 minute and above. ", + "updated": 1611581184850 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-errors-004-ts-lf-trading-bot-error-reference-to-phase-node-missing.json b/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-errors-004-ts-lf-trading-bot-error-reference-to-phase-node-missing.json new file mode 100644 index 000000000..286b7007e --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-errors-004-ts-lf-trading-bot-error-reference-to-phase-node-missing.json @@ -0,0 +1,20 @@ +{ + "topic": "TS LF Trading Bot Errors", + "pageNumber": "4", + "type": "TS LF Trading Bot Error - Reference to Phase Node Missing", + "definition": { + "text": "The Move To Phase Event Node where this error poped up is expected to reference a Phase Node so that when all conditions are met, the LF Trading Bot can swith to the referenced Phase.", + "updated": 1611581788332 + }, + "paragraphs": [ + { + "style": "Text", + "text": "This error happens when the conditions to switch phases are met but the LF Trading Bot cannot find a reference to the Phase where it should switch to.", + "updated": 1611581092289 + }, + { + "style": "Success", + "text": "To fix this, simply establish a reference from this Node to a Phase node." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js index b4460fa57..144aa6ffa 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js @@ -601,7 +601,15 @@ exports.newSuperalgosBotModulesTradingStages = function (processIndex) { } } } else { - tradingSystem.errors.push([moveToPhaseEvent.id, 'This Node needs to reference a Phase.']) + + let docs = { + project: 'Superalgos', + category: 'Topic', + type: 'TS LF Trading Bot Error - Reference to Phase Node Missing', + placeholder: {} + } + + tradingSystem.errors.push([moveToPhaseEvent.id, 'This Node needs to reference a Phase.', docs]) continue } @@ -700,7 +708,15 @@ exports.newSuperalgosBotModulesTradingStages = function (processIndex) { } } } else { - tradingSystem.errors.push([moveToPhaseEvent.id, 'This Node needs to reference a Phase.']) + + let docs = { + project: 'Superalgos', + category: 'Topic', + type: 'TS LF Trading Bot Error - Reference to Phase Node Missing', + placeholder: {} + } + + tradingSystem.errors.push([moveToPhaseEvent.id, 'This Node needs to reference a Phase.', docs]) continue }