From e55e075b34a99362b32ddc3a89b3c6576f46faa4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Jan 2020 14:44:15 +0100 Subject: [PATCH] Bug fixed from refactoring --- SimulationExecutionPanel.js | 4 ++-- TradingSimulationPanel.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SimulationExecutionPanel.js b/SimulationExecutionPanel.js index 85d929006..37f05d7b4 100644 --- a/SimulationExecutionPanel.js +++ b/SimulationExecutionPanel.js @@ -5,7 +5,7 @@ function newAAMastersPlottersTradingSimulationSimulationExecutionSimulationExecu let thisObject = { fitFunction: undefined, container: undefined, - onEventRaised: onEventRaised, + onRecordChange: onRecordChange, draw: draw, getContainer: getContainer, initialize: initialize @@ -60,7 +60,7 @@ function newAAMastersPlottersTradingSimulationSimulationExecutionSimulationExecu } - function onEventRaised(lastCurrentCandle) { + function onRecordChange(lastCurrentCandle) { currentRecord = lastCurrentCandle; diff --git a/TradingSimulationPanel.js b/TradingSimulationPanel.js index 36e65a70d..e60c48c73 100644 --- a/TradingSimulationPanel.js +++ b/TradingSimulationPanel.js @@ -3,7 +3,7 @@ function newAAMastersPlottersTradingSimulationTradingSimulationTradingSimulation let thisObject = { fitFunction: undefined, - onEventRaised: onEventRaised, + onRecordChange: onRecordChange, container: undefined, session: undefined, draw: draw, @@ -30,7 +30,7 @@ function newAAMastersPlottersTradingSimulationTradingSimulationTradingSimulation thisObject.container.frame.width = UI_PANEL.WIDTH.NORMAL * 1; thisObject.container.frame.height = UI_PANEL.HEIGHT.NORMAL * 2.5; - thisObject.container.frame.position.x = canvas.chartSpace.viewport.visibleArea.topLeft.x + thisObject.container.frame.width * 3; + thisObject.container.frame.position.x = canvas.chartSpace.viewport.visibleArea.topRight.x - thisObject.container.frame.width * 1; thisObject.container.frame.position.y = canvas.chartSpace.viewport.visibleArea.topRight.y; panelTabButton = newPanelTabButton() @@ -47,7 +47,7 @@ function newAAMastersPlottersTradingSimulationTradingSimulationTradingSimulation thisObject.container.finalize() thisObject.container = undefined thisObject.fitFunction = undefined - thisObject.onEventRaised = undefined + thisObject.onRecordChange = undefined currentRecord = undefined lastRecord = undefined @@ -77,7 +77,7 @@ function newAAMastersPlottersTradingSimulationTradingSimulationTradingSimulation } - function onEventRaised(records) { + function onRecordChange(records) { currentRecord = records.currentRecord; lastRecord = records.lastRecord