diff --git a/ChartsSpace/TimeMachine.js b/ChartsSpace/TimeMachine.js index 6ab58e459..393e15bb0 100644 --- a/ChartsSpace/TimeMachine.js +++ b/ChartsSpace/TimeMachine.js @@ -459,7 +459,7 @@ function newTimeMachine () { function drawBackground () { if (thisObject.container.frame.isInViewPort()) { for (let i = 0; i < thisObject.timelineCharts.length; i++) { - let timelineChart = thisObject.timelineCharts[i] + let timelineChart = thisObject.timelineCharts[thisObject.timelineCharts.length - i - 1] timelineChart.drawBackground() } } @@ -468,7 +468,7 @@ function newTimeMachine () { function draw () { if (thisObject.container.frame.isInViewPort()) { for (let i = 0; i < thisObject.timelineCharts.length; i++) { - let timelineChart = thisObject.timelineCharts[i] + let timelineChart = thisObject.timelineCharts[thisObject.timelineCharts.length - i - 1] timelineChart.draw() } @@ -506,7 +506,7 @@ function newTimeMachine () { function drawForeground () { if (thisObject.container.frame.isInViewPort()) { for (let i = 0; i < thisObject.timelineCharts.length; i++) { - let timelineChart = thisObject.timelineCharts[i] + let timelineChart = thisObject.timelineCharts[thisObject.timelineCharts.length - i - 1] timelineChart.drawForeground() } diff --git a/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js b/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js index 1bd5f9c19..ac3abaa43 100644 --- a/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js +++ b/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js @@ -33,7 +33,7 @@ function newSessionFunctions () { let lightingPath = '' + 'Trading System->' + 'Parameters->' + - 'Base Asset->Time Range->Time Frame->Slippage->Fee Structure->Exchange Account Key->' + + 'Base Asset->Time Range->Time Frame->Slippage->Fee Structure->Key Instance->Exchange Account Key->' + 'Strategy->' + 'Trigger Stage->Trigger On Event->Trigger Off Event->Take Position Event->' + 'Announcement->Telegram Bot->' + @@ -48,9 +48,16 @@ function newSessionFunctions () { let tradingSystem = functionLibraryProtocolNode.getProtocolNode(node.payload.referenceParent, false, true, true, false, false, lightingPath) + lightingPath = '' + + 'Backtesting Session->Paper Trading Session->Fordward Testing Session->Live Trading Session->' + + 'Parameters->' + + 'Base Asset->Time Range->Time Frame->Slippage->Fee Structure->Key Instance->Exchange Account Key->' + + let session = functionLibraryProtocolNode.getProtocolNode(node, false, true, true, false, false, lightingPath) + /* Raise event to run the session */ let event = { - session: JSON.stringify(functionLibraryProtocolNode.getProtocolNode(node, false, true, true)), + session: JSON.stringify(session), tradingSystem: JSON.stringify(tradingSystem), uiCurrentValues: getUICurrentValues() }