Session Resume

This commit is contained in:
Luis Fernando Molina committed 2020-09-29 15:45:14 +02:00
1 parent 3da75d372b
commit 0ca2daf064
4 files changed
+13 -9

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ function newCoordinateSystem() {
autoMinYScale: true,
autoMaxYScale: true,
HORIZONTAL_MARGIN_FACTOR: 1,
VERTICAL_MARGIN_FACTOR: 1,
VERTICAL_MARGIN_FACTOR: 0.9,
HORIZONTAL_MARGIN_INVERSE_FACTOR: 0,
VERTICAL_MARGIN_INVERSE_FACTOR: 0,
physics: physics,
+2 -2
View File
@@ -9,7 +9,7 @@ function newViewport() {
let ANIMATION_STEPS = 5
let TOP_MARGIN = 40 + TOP_SPACE_HEIGHT
let BOTTOM_MARGIN = 42 + COCKPIT_SPACE_HEIGHT
let BOTTOM_MARGIN = 10 + 2 + COCKPIT_SPACE_HEIGHT
let LEFT_MARGIN = 0
let RIGHT_MARGIN = 0
let MARGINS = {
@@ -99,7 +99,7 @@ function newViewport() {
function resize() {
TOP_MARGIN = 40 + TOP_SPACE_HEIGHT
BOTTOM_MARGIN = 42 + browserCanvas.height - COCKPIT_SPACE_POSITION
BOTTOM_MARGIN = 10 + 2 + browserCanvas.height - COCKPIT_SPACE_POSITION
LEFT_MARGIN = 0
RIGHT_MARGIN = 0
MARGINS = {
@@ -135,7 +135,11 @@ function newSessionFunctions() {
resume: resume
}
eventsServerClient.raiseEvent(key, 'Run Session', event)
if (resume !== true) {
eventsServerClient.raiseEvent(key, 'Run Session', event)
} else {
eventsServerClient.raiseEvent(key, 'Resume Session', event)
}
if (node.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode === undefined) {
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
@@ -116,7 +116,7 @@
Here is the point where we sync one and the other.
*/
let tradingProcessDate = global.REMOVE_TIME(bot.simulationState.tradingEngine.current.episode.processDate.value)
console.log("1 tradingProcessDate ", tradingProcessDate)
await processSingleFiles()
await processMarketFiles()
@@ -147,10 +147,6 @@
/* We are processing Daily Files */
do {
global.EMIT_SESSION_STATUS (bot.SESSION_STATUS, bot.sessionKey)
if (checkStopTaskGracefully() === false) { break }
if (checkStopProcessing() === false) { break }
/*
We update the Trading Process Date with the date calculated at the simulation.
We will use this date to load indicator and output files. After that we will
@@ -158,6 +154,10 @@
the date calculated by the Simulation is applied at the Trading Process Level.
*/
tradingProcessDate = global.REMOVE_TIME(bot.simulationState.tradingEngine.current.episode.processDate.value)
console.log("2 tradingProcessDate ", tradingProcessDate)
if (checkStopTaskGracefully() === false) { break }
if (checkStopProcessing() === false) { break }
await processDailyFiles()
/*
With all the indicators data files loaded, we will build the chart object