diff --git a/ChartsSpace/TimeMachine.js b/ChartsSpace/TimeMachine.js index 38ba6ac2b..02c872aed 100644 --- a/ChartsSpace/TimeMachine.js +++ b/ChartsSpace/TimeMachine.js @@ -384,7 +384,6 @@ function newTimeMachine () { function physics () { saveFrame(thisObject.payload, thisObject.container.frame) if (thisObject.container.frame.isInViewPort()) { - thisObjectPhysics() childrenPhysics() syncWithDesigner() } @@ -490,19 +489,6 @@ function newTimeMachine () { } } - function thisObjectPhysics () { - /* Screen Corner Date Calculation */ - - let point = { - x: 0, - y: 0 - } - - let cornerDate = getDateFromPoint(point, thisObject.container, timeMachineCoordinateSystem) - cornerDate = new Date(cornerDate) - window.localStorage.setItem('Date @ Screen Corner', cornerDate.toUTCString()) - } - function childrenPhysics () { if (thisObject.timeScale !== undefined) { thisObject.timeScale.physics() diff --git a/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js b/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js index 5892c001a..fe40011be 100644 --- a/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js +++ b/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js @@ -58,28 +58,10 @@ function newSessionFunctions () { /* Raise event to run the session */ let event = { session: JSON.stringify(session), - tradingSystem: JSON.stringify(tradingSystem), - uiCurrentValues: getUICurrentValues() + tradingSystem: JSON.stringify(tradingSystem) } systemEventHandler.raiseEvent(key, 'Run Session', event) - - function getUICurrentValues () { - let dateAtScreenCorner = new Date(window.localStorage.getItem('Date @ Screen Corner')) - let currentTimeFrame = JSON.parse(window.localStorage.getItem('Current Time Frame')) - - let timeFramesMasterArray = [marketFilesPeriods, dailyFilePeriods] - let timeFrameArray = timeFramesMasterArray[currentTimeFrame.filePeriodIndex] - let timeFrame = timeFrameArray[currentTimeFrame.timeFrameIndex][1] - - let uiCurrentValues = { - initialDatetime: dateAtScreenCorner, - timeFrame: timeFrame, - timestamp: (new Date()).valueOf() - } - - return uiCurrentValues - } } function stopSession (node, functionLibraryProtocolNode, callBackFunction) { diff --git a/Scales/TimeFrameScale.js b/Scales/TimeFrameScale.js index 444a2c6e5..0f684274f 100644 --- a/Scales/TimeFrameScale.js +++ b/Scales/TimeFrameScale.js @@ -299,7 +299,6 @@ function newTimeFrameScale () { let event = {} event.timeFrame = thisObject.timeFrame thisObject.container.eventHandler.raiseEvent('Time Frame Value Changed', event) - window.localStorage.setItem('Current Time Frame', JSON.stringify({filePeriodIndex: filePeriodIndex, timeFrameIndex: timeFrameIndex})) } function draw () {