Concept of current values removed
This commit is contained in:
1 parent
b55c22d8bb
commit
2f4de2d497
3 files changed
+1
-34
No files matched your search
@@ -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()
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in new issue
Block a user