diff --git a/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-infos-001-ts-lf-trading-bot-info-candle-and-cycle.json b/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-infos-001-ts-lf-trading-bot-info-candle-and-cycle.json index 90169b2a2..4c454ca72 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-infos-001-ts-lf-trading-bot-info-candle-and-cycle.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-infos-001-ts-lf-trading-bot-info-candle-and-cycle.json @@ -11,6 +11,18 @@ "style": "Note", "text": "Candle And Cycle", "updated": 1611919730247 + }, + { + "style": "Title", + "text": "Context Info" + }, + { + "style": "Text", + "text": "The following is the information preserved at the moment this Info Message was generated:" + }, + { + "style": "Placeholder", + "text": "contextInfo" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js index 32ef47941..0c941284b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js @@ -214,6 +214,13 @@ exports.newSuperalgosBotModulesTradingSimulation = function (processIndex) { type: 'TS LF Trading Bot Info - Candle And Cycle', placeholder: {} } + + contextInfo = { + candleIndex: tradingEngine.current.episode.candle.index.value, + cycle: tradingEngine.current.episode.cycle.value + } + TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo) + tradingSystem.addInfo([tradingSystem.id, infoMessage, docs]) await tradingSystemModuleObject.run()