diff --git a/CanvasApp/Animation.js b/CanvasApp/Animation.js index 53fd737a7..4042960c6 100644 --- a/CanvasApp/Animation.js +++ b/CanvasApp/Animation.js @@ -73,8 +73,9 @@ function newAnimation () { let mustExecute // console.clear() - + let row = 0 for (const [key, callBackFunction] of callBackFunctions.entries()) { + row++ switch (key) { case 'Floating Space Physics': chanceToExecute = 50 @@ -86,14 +87,13 @@ function newAnimation () { } } + let timeConsumed = 0 if (mustExecute === true) { let t0 = performance.now() callBackFunction() let t1 = performance.now() - let timeConsumed = t1 - t0 + timeConsumed = t1 - t0 if (key === 'Chart Space Draw') { - // console.log(key, (totalConsumption / totalCounter).toFixed(1)) - if (Math.random() * 100 > 99) { totalConsumption = 0 totalCounter = 0 @@ -109,11 +109,15 @@ function newAnimation () { } /* Performance Check */ - - for (const [key, timeConsumed] of performanceMap.entries()) { - let percentage = timeConsumed * 100 / totalTimeConsumed - if (key === 'Chart Space Draw') { - // console.log(key, percentage.toFixed(0)) + if (SHOW_ANIMATION_PERFORMACE === true) { + row = 0 + for (const [key, timeConsumed] of performanceMap.entries()) { + row++ + labelToPrint = key + ' ' + timeConsumed.toFixed(4) + printLabel(labelToPrint, 10, 100 + row * 30, 1, 20, UI_COLOR.RED) + let percentage = timeConsumed * 100 / totalTimeConsumed + labelToPrint = key + ' ' + percentage.toFixed(1) + '%' + printLabel(labelToPrint, 300, 100 + row * 30, 1, 20, UI_COLOR.RED) } } } else { diff --git a/CanvasApp/Canvas.js b/CanvasApp/Canvas.js index d3e67e5d1..d74198e6a 100644 --- a/CanvasApp/Canvas.js +++ b/CanvasApp/Canvas.js @@ -123,7 +123,7 @@ function newCanvas () { animation.addCallBackFunction('CockpitSpace Physics', thisObject.cockpitSpace.physics) animation.addCallBackFunction('Floating Space Physics', thisObject.floatingSpace.physics) animation.addCallBackFunction('Chart Space Physics', thisObject.chartSpace.physics) - animation.addCallBackFunction('Strategy Space Physics', thisObject.designerSpace.physics) + animation.addCallBackFunction('Designer Space Physics', thisObject.designerSpace.physics) animation.addCallBackFunction('Panels Space Physics', thisObject.panelsSpace.physics) /* Spcaces Drawing */ @@ -267,12 +267,21 @@ function newCanvas () { } } - if ((event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowUp') { + if ((event.ctrlKey === true || event.metaKey === true) && event.altKey === true && event.shiftKey === true && event.keyCode === 122) { // Dev Tool when used with F11 + if (SHOW_ANIMATION_PERFORMACE === false) { + SHOW_ANIMATION_PERFORMACE = true + } else { + SHOW_ANIMATION_PERFORMACE = false + } + return + } + + if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowUp') { thisObject.cockpitSpace.toTop() return } - if ((event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowDown') { + if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowDown') { thisObject.cockpitSpace.toBottom() return } @@ -461,7 +470,7 @@ function newCanvas () { let container - /* We check if the mouse is over an element of the Strategy Space / */ + /* We check if the mouse is over an element of the Designer Space / */ container = thisObject.designerSpace.getContainer(point) @@ -566,7 +575,7 @@ function newCanvas () { let container - /* We check if the mouse is over an element of the Strategy Space / */ + /* We check if the mouse is over an element of the Designer Space / */ container = thisObject.designerSpace.getContainer(point) @@ -875,36 +884,45 @@ function newCanvas () { y: dragVector.upY - dragVector.downY } - if (viewPortBeingDragged) { - canvas.chartSpace.viewport.displace(displaceVector) - } + canvas.chartSpace.viewport.displace(displaceVector) } if (containerDragStarted) { if (containerBeingDragged !== undefined) { - let downCopy = { - x: dragVector.downX, - y: dragVector.downY - } + if (containerBeingDragged.space === 'Charting Space') { + let downCopy = { + x: dragVector.downX, + y: dragVector.downY + } - let downNoZoom - downNoZoom = canvas.chartSpace.viewport.unTransformThisPoint(downCopy) + let downNoZoom + downNoZoom = canvas.chartSpace.viewport.unTransformThisPoint(downCopy) - let upCopy = { - x: dragVector.upX, - y: dragVector.upY - } + let upCopy = { + x: dragVector.upX, + y: dragVector.upY + } - let upNoZoom - upNoZoom = canvas.chartSpace.viewport.unTransformThisPoint(upCopy) + let upNoZoom + upNoZoom = canvas.chartSpace.viewport.unTransformThisPoint(upCopy) - displaceVector = { - x: upNoZoom.x - downNoZoom.x, - y: upNoZoom.y - downNoZoom.y - } + displaceVector = { + x: upNoZoom.x - downNoZoom.x, + y: upNoZoom.y - downNoZoom.y + } - let moveSucceed = containerBeingDragged.displace(displaceVector) - if (moveSucceed === false) { - deactivateDragging(event) + let moveSucceed = containerBeingDragged.displace(displaceVector) + if (moveSucceed === false) { + deactivateDragging(event) + } + } else { + let displaceVector = { + x: dragVector.upX - dragVector.downX, + y: dragVector.upY - dragVector.downY + } + let moveSucceed = containerBeingDragged.displace(displaceVector) + if (moveSucceed === false) { + deactivateDragging(event) + } } } } diff --git a/CanvasApp/ChartsSpace/CoordinateSystem.js b/CanvasApp/ChartsSpace/CoordinateSystem.js index 6edfffcab..2652cbf0f 100644 --- a/CanvasApp/ChartsSpace/CoordinateSystem.js +++ b/CanvasApp/ChartsSpace/CoordinateSystem.js @@ -15,6 +15,8 @@ function newCoordinateSystem () { maxWidth: undefined, scale: undefined, eventHandler: undefined, + zoomX: zoomX, + zoomY: zoomY, recalculateScale: recalculateScale, transformThisPoint: transformThisPoint, transformThisPoint2: transformThisPoint2, @@ -63,6 +65,36 @@ function newCoordinateSystem () { recalculateScale() } + function zoomX (factor, mousePosition, container) { + let mouseAtCointainer = unTransformThisPoint(mousePosition, container) + let leftDistance = mouseAtCointainer.x + let rightDistance = container.frame.width - mouseAtCointainer.x + let diff = thisObject.max.x - thisObject.min.x + let min = thisObject.min.x + diff * factor * leftDistance / (container.frame.width / 2) + let max = thisObject.max.x - diff * factor * rightDistance / (container.frame.width / 2) + + if (min < max) { + thisObject.min.x = min + thisObject.max.x = max + thisObject.recalculateScale() + } + } + + function zoomY (factor, mousePosition, container) { + let mouseAtCointainer = unTransformThisPoint(mousePosition, container) + let topDistance = mouseAtCointainer.y + let bottomDistance = container.frame.height - mouseAtCointainer.y + let diff = thisObject.max.y - thisObject.min.y + let min = thisObject.min.y + diff * factor * bottomDistance / (container.frame.height / 2) + let max = thisObject.max.y - diff * factor * topDistance / (container.frame.height / 2) + + if (min < max) { + thisObject.min.y = min + thisObject.max.y = max + thisObject.recalculateScale() + } + } + function recalculateScale () { /* Defines the initial Zoom level at center position. */ thisObject.scale.x = thisObject.maxWidth / (thisObject.max.x - thisObject.min.x) diff --git a/CanvasApp/ChartsSpace/EdgeEditor.js b/CanvasApp/ChartsSpace/EdgeEditor.js index e402404ec..ea72c3213 100644 --- a/CanvasApp/ChartsSpace/EdgeEditor.js +++ b/CanvasApp/ChartsSpace/EdgeEditor.js @@ -134,50 +134,6 @@ function newEdgeEditor () { y: thisObject.container.frame.position.y } - /* Calculating the Direct Position, that will be needed to manipulate the coordinate system */ - thisObject.container.frame.position.x = 0 + dragVector.x - thisObject.container.frame.position.y = 0 + dragVector.y - - let directPositionA = { - x: thisObject.container.frame.position.x, - y: thisObject.container.frame.position.y - } - - directPositionA = transformThisPoint(directPositionA, thisObject.container) - - thisObject.container.frame.position.x = 0 + dragVector.x / 2 - thisObject.container.frame.position.y = 0 + dragVector.y / 2 - - let directPositionB = { - x: thisObject.container.frame.position.x, - y: thisObject.container.frame.position.y - } - - directPositionB = transformThisPoint(directPositionB, thisObject.container) - - /* Calculating the Inverted Position, that will be needed to manipulate the coordinate system */ - thisObject.container.frame.position.x = 0 - dragVector.x - thisObject.container.frame.position.y = 0 - dragVector.y - - let invertedPositionA = { - x: thisObject.container.frame.position.x, - y: thisObject.container.frame.position.y - } - - invertedPositionA = transformThisPoint(invertedPositionA, thisObject.container) - - /* Calculating the Inverted Position, that will be needed to manipulate the coordinate system */ - thisObject.container.frame.position.x = 0 - dragVector.x / 2 - thisObject.container.frame.position.y = 0 - dragVector.y / 2 - - let invertedPositionB = { - x: thisObject.container.frame.position.x, - y: thisObject.container.frame.position.y - } - - invertedPositionB = transformThisPoint(invertedPositionB, thisObject.container) - - /* Finally we reset this */ thisObject.container.frame.position.x = 0 thisObject.container.frame.position.y = 0 @@ -194,8 +150,12 @@ function newEdgeEditor () { break } case 'right mouse button': { - let newMinDate = getDateFromPoint(invertedPositionB, thisObject.container.parentContainer, coordinateSystem) - let newMaxRate = getRateFromPoint(invertedPositionB, thisObject.container.parentContainer, coordinateSystem) + let point = { + x: -dragVector.x, + y: -dragVector.y + } + let newMinDate = getDateFromPointAtContainer(point, thisObject.container.parentContainer, coordinateSystem) + let newMaxRate = getRateFromPointAtContainer(point, thisObject.container.parentContainer, coordinateSystem) let xDifferenceMaxMin = coordinateSystem.max.x - coordinateSystem.min.x let yDifferenceMaxMin = coordinateSystem.max.y - coordinateSystem.min.y coordinateSystem.min.x = newMinDate.valueOf() @@ -209,16 +169,21 @@ function newEdgeEditor () { break } case 'top' : { - if (thisObject.container.parentContainer.frame.height - dragVector.y < MIN_HEIGHT) { + if (thisObject.container.parentContainer.frame.height - dragVector.y < MIN_HEIGHT && dragVector.y > 0) { return } + + let point = { + x: dragVector.x, + y: dragVector.y + } + let newMaxRate = getRateFromPointAtContainer(point, thisObject.container.parentContainer, coordinateSystem) + thisObject.container.parentContainer.frame.position.y = thisObject.container.parentContainer.frame.position.y + dragVector.y thisObject.container.parentContainer.frame.height = thisObject.container.parentContainer.frame.height - dragVector.y - thisObject.container.parentContainer.eventHandler.raiseEvent('Dimmensions Changed', event) switch (buttonUsedForDragging) { case 'left mouse button': { - let newMaxRate = getRateFromPoint(directPositionB, thisObject.container.parentContainer, coordinateSystem) coordinateSystem.max.y = newMaxRate coordinateSystem.maxHeight = thisObject.container.parentContainer.frame.height coordinateSystem.recalculateScale() @@ -230,19 +195,25 @@ function newEdgeEditor () { break } } + thisObject.container.parentContainer.eventHandler.raiseEvent('Dimmensions Changed', event) break } case 'bottom' : { - if (thisObject.container.parentContainer.frame.height + dragVector.y < MIN_HEIGHT) { + if (thisObject.container.parentContainer.frame.height + dragVector.y < MIN_HEIGHT && dragVector.y < 0) { return } + + let point = { + x: dragVector.x, + y: dragVector.y + thisObject.container.frame.height + } + let newMinRate = getRateFromPointAtContainer(point, thisObject.container.parentContainer, coordinateSystem) + thisObject.container.parentContainer.frame.height = thisObject.container.parentContainer.frame.height + dragVector.y - thisObject.container.parentContainer.eventHandler.raiseEvent('Dimmensions Changed', event) switch (buttonUsedForDragging) { case 'left mouse button': { - let newMaxRate = getRateFromPoint(directPositionA, thisObject.container.parentContainer, coordinateSystem) - coordinateSystem.min.y = coordinateSystem.min.y - (coordinateSystem.max.y - newMaxRate) + coordinateSystem.min.y = newMinRate coordinateSystem.maxHeight = thisObject.container.parentContainer.frame.height coordinateSystem.recalculateScale() break @@ -253,47 +224,54 @@ function newEdgeEditor () { break } } + thisObject.container.parentContainer.eventHandler.raiseEvent('Dimmensions Changed', event) break } case 'left' : { - if (thisObject.container.parentContainer.frame.width - dragVector.x < MIN_WIDTH) { + if (thisObject.container.parentContainer.frame.width - dragVector.x < MIN_WIDTH && dragVector.x > 0) { return } + let point = { + x: dragVector.x, + y: dragVector.y + } + let newMinDate = getDateFromPointAtContainer(point, thisObject.container.parentContainer, coordinateSystem) + thisObject.container.parentContainer.frame.position.x = thisObject.container.parentContainer.frame.position.x + dragVector.x thisObject.container.parentContainer.frame.width = thisObject.container.parentContainer.frame.width - dragVector.x - thisObject.container.parentContainer.eventHandler.raiseEvent('Dimmensions Changed', event) switch (buttonUsedForDragging) { case 'left mouse button': { - let newMinDate = getDateFromPoint(directPositionA, thisObject.container.parentContainer, coordinateSystem) coordinateSystem.min.x = newMinDate.valueOf() coordinateSystem.maxWidth = thisObject.container.parentContainer.frame.width coordinateSystem.recalculateScale() break } case 'right mouse button': { - let newMinDate = getDateFromPoint(directPositionB, thisObject.container.parentContainer, coordinateSystem) - coordinateSystem.min.x = newMinDate.valueOf() coordinateSystem.maxWidth = thisObject.container.parentContainer.frame.width coordinateSystem.recalculateScale() break } } + thisObject.container.parentContainer.eventHandler.raiseEvent('Dimmensions Changed', event) break } case 'right' : { - if (thisObject.container.parentContainer.frame.width + dragVector.x < MIN_WIDTH) { + if (thisObject.container.parentContainer.frame.width + dragVector.x < MIN_WIDTH && dragVector.x < 0) { return } - thisObject.container.parentContainer.frame.width = thisObject.container.parentContainer.frame.width + dragVector.x - thisObject.container.parentContainer.eventHandler.raiseEvent('Dimmensions Changed', event) + let point = { + x: dragVector.x + thisObject.container.frame.width, + y: dragVector.y + } + let newMaxDate = getDateFromPointAtContainer(point, thisObject.container.parentContainer, coordinateSystem) + + thisObject.container.parentContainer.frame.width = thisObject.container.parentContainer.frame.width + dragVector.x switch (buttonUsedForDragging) { case 'left mouse button': { - let newMinDate = getDateFromPoint(invertedPositionB, thisObject.container.parentContainer, coordinateSystem) - let xDifferenceMaxMin = coordinateSystem.min.x - newMinDate.valueOf() - coordinateSystem.max.x = coordinateSystem.max.x + xDifferenceMaxMin + coordinateSystem.max.x = newMaxDate.valueOf() coordinateSystem.maxWidth = thisObject.container.parentContainer.frame.width coordinateSystem.recalculateScale() break @@ -304,6 +282,7 @@ function newEdgeEditor () { break } } + thisObject.container.parentContainer.eventHandler.raiseEvent('Dimmensions Changed', event) break } } @@ -414,6 +393,16 @@ function newEdgeEditor () { y: pointB4.y + edgeSize } + pointA1 = canvas.chartSpace.viewport.fitIntoViewport(pointA1) + pointA2 = canvas.chartSpace.viewport.fitIntoViewport(pointA2) + pointA3 = canvas.chartSpace.viewport.fitIntoViewport(pointA3) + pointA4 = canvas.chartSpace.viewport.fitIntoViewport(pointA4) + + pointB1 = canvas.chartSpace.viewport.fitIntoViewport(pointB1) + pointB2 = canvas.chartSpace.viewport.fitIntoViewport(pointB2) + pointB3 = canvas.chartSpace.viewport.fitIntoViewport(pointB3) + pointB4 = canvas.chartSpace.viewport.fitIntoViewport(pointB4) + browserCanvasContext.setLineDash([0, 0]) browserCanvasContext.beginPath() diff --git a/CanvasApp/ChartsSpace/TimeMachine.js b/CanvasApp/ChartsSpace/TimeMachine.js index 1c7767c10..89c59aa18 100644 --- a/CanvasApp/ChartsSpace/TimeMachine.js +++ b/CanvasApp/ChartsSpace/TimeMachine.js @@ -50,9 +50,7 @@ function newTimeMachine () { let onViewportZoomChangedEventSuscriptionId let onMouseOverEventSuscriptionId let onMouseNotOverEventSuscriptionId - let timeScaleValueEventSuscriptionId let timeScaleMouseOverEventSuscriptionId - let rateScaleValueEventSuscriptionId let rateScaleMouseOverEventSuscriptionId let timeFrameScaleEventSuscriptionId let timeFrameScaleMouseOverEventSuscriptionId @@ -114,7 +112,6 @@ function newTimeMachine () { function finalizeTimeScale () { if (thisObject.timeScale === undefined) { return } - thisObject.timeScale.container.eventHandler.stopListening(timeScaleValueEventSuscriptionId) thisObject.timeScale.container.eventHandler.stopListening(timeScaleMouseOverEventSuscriptionId) thisObject.timeScale.finalize() thisObject.timeScale = undefined @@ -123,7 +120,6 @@ function newTimeMachine () { function finalizeRateScale () { if (thisObject.rateScale === undefined) { return } - thisObject.rateScale.container.eventHandler.stopListening(rateScaleValueEventSuscriptionId) thisObject.rateScale.container.eventHandler.stopListening(rateScaleMouseOverEventSuscriptionId) thisObject.rateScale.finalize() thisObject.rateScale = undefined @@ -142,6 +138,9 @@ function newTimeMachine () { timeFrame = INITIAL_TIME_PERIOD loadFrame(thisObject.payload, thisObject.container.frame) + // thisObject.container.frame.position.x = 0 + // thisObject.container.frame.position.y = 0 + recalculateCoordinateSystem() recalculateCurrentDatetime() @@ -194,23 +193,9 @@ function newTimeMachine () { thisObject.timeScale.fitFunction = thisObject.fitFunction thisObject.timeScale.payload = thisObject.payload.node.timeScale.payload - timeScaleValueEventSuscriptionId = thisObject.timeScale.container.eventHandler.listenToEvent('Time Scale Value Changed', timeScaleValueChanged) timeScaleMouseOverEventSuscriptionId = thisObject.timeScale.container.eventHandler.listenToEvent('onMouseOverScale', timeScaleMouseOver) thisObject.timeScale.initialize(timeMachineCoordinateSystem, thisObject.container) - function timeScaleValueChanged (event) { - if (event.isUserAction === true) { - let currentDate = getDateFromPoint(event.mousePosition, thisObject.container, timeMachineCoordinateSystem) - let currentRate = getRateFromPoint(event.mousePosition, thisObject.container, timeMachineCoordinateSystem) - // thisObject.container.frame.width = TIME_MACHINE_WIDTH + TIME_MACHINE_WIDTH * event.scale - recalculateCoordinateSystem() - moveToUserPosition(thisObject.container, currentDate, currentRate, timeMachineCoordinateSystem, false, true, event.mousePosition) - } else { - // thisObject.container.frame.width = TIME_MACHINE_WIDTH + TIME_MACHINE_WIDTH * event.scale - recalculateCoordinateSystem() - } - thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event) - } function timeScaleMouseOver (event) { thisObject.container.eventHandler.raiseEvent('onMouseOver', event) } @@ -221,25 +206,9 @@ function newTimeMachine () { thisObject.rateScale.fitFunction = thisObject.fitFunction thisObject.rateScale.payload = thisObject.payload.node.rateScale.payload - rateScaleValueEventSuscriptionId = thisObject.rateScale.container.eventHandler.listenToEvent('Rate Scale Value Changed', rateScaleValueChanged) rateScaleMouseOverEventSuscriptionId = thisObject.rateScale.container.eventHandler.listenToEvent('onMouseOverScale', rateScaleMouseOver) thisObject.rateScale.initialize(timeMachineCoordinateSystem, thisObject.container, thisObject.container) - function rateScaleValueChanged (event) { - if (event.isUserAction === true) { - let currentDate = getDateFromPoint(event.mousePosition, thisObject.container, timeMachineCoordinateSystem) - let currentRate = getRateFromPoint(event.mousePosition, thisObject.container, timeMachineCoordinateSystem) - - // thisObject.container.frame.height = TIME_MACHINE_HEIGHT + TIME_MACHINE_HEIGHT * event.scale - recalculateCoordinateSystem() - moveToUserPosition(thisObject.container, currentDate, currentRate, timeMachineCoordinateSystem, true, false, event.mousePosition) - } else { - // thisObject.container.frame.height = TIME_MACHINE_HEIGHT + TIME_MACHINE_HEIGHT * event.scale - recalculateCoordinateSystem() - } - thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event) - thisObject.container.eventHandler.raiseEvent('Upstream Rate Scale Value Changed', event) - } function rateScaleMouseOver (event) { thisObject.container.eventHandler.raiseEvent('onMouseOver', event) } @@ -627,16 +596,6 @@ function newTimeMachine () { y: nextPorwerOf10(MAX_DEFAULT_RATE_SCALE_VALUE) / 4 } - if (thisObject.timeScale !== undefined) { - minValue.x = thisObject.timeScale.fromDate - maxValue.x = thisObject.timeScale.toDate - } - - if (thisObject.rateScale !== undefined) { - minValue.y = thisObject.rateScale.minValue - maxValue.y = thisObject.rateScale.maxValue - } - timeMachineCoordinateSystem.initialize( minValue, maxValue, diff --git a/CanvasApp/ChartsSpace/TimelineChart.js b/CanvasApp/ChartsSpace/TimelineChart.js index fa6b444aa..5bed029e2 100644 --- a/CanvasApp/ChartsSpace/TimelineChart.js +++ b/CanvasApp/ChartsSpace/TimelineChart.js @@ -38,11 +38,9 @@ function newTimelineChart () { let onMouseOverEventSuscriptionId let onMouseNotOverEventSuscriptionId - let rateScaleValueEventSuscriptionId let rateScaleUpstreamEventSuscriptionId let rateScaleMouseOverEventSuscriptionId let rateScaleOffsetEventSuscriptionId - let rateScaleUpstreamDimensionsEventSuscriptionId let timeFrameScaleEventSuscriptionId let timeFrameScaleMouseOverEventSuscriptionId let scaleChangedEventSubscriptionId @@ -125,10 +123,8 @@ function newTimelineChart () { if (thisObject.rateScale === undefined) { return } thisObject.rateScale.container.eventHandler.stopListening(rateScaleOffsetEventSuscriptionId) - thisObject.rateScale.container.eventHandler.stopListening(rateScaleValueEventSuscriptionId) thisObject.rateScale.container.eventHandler.stopListening(rateScaleMouseOverEventSuscriptionId) thisObject.container.parentContainer.eventHandler.stopListening(rateScaleUpstreamEventSuscriptionId) - thisObject.container.parentContainer.eventHandler.stopListening(rateScaleUpstreamDimensionsEventSuscriptionId) thisObject.rateScale.finalize() thisObject.rateScale = undefined @@ -182,22 +178,9 @@ function newTimelineChart () { thisObject.rateScale.payload = thisObject.payload.node.rateScale.payload rateScaleOffsetEventSuscriptionId = thisObject.rateScale.container.eventHandler.listenToEvent('Rate Scale Offset Changed', rateScaleOffsetChanged) - rateScaleValueEventSuscriptionId = thisObject.rateScale.container.eventHandler.listenToEvent('Rate Scale Value Changed', rateScaleValueChanged) rateScaleMouseOverEventSuscriptionId = thisObject.rateScale.container.eventHandler.listenToEvent('onMouseOverScale', rateScaleMouseOver) - rateScaleUpstreamEventSuscriptionId = thisObject.container.parentContainer.eventHandler.listenToEvent('Upstream Rate Scale Value Changed', rateScaleUpstreamChanged) - rateScaleUpstreamDimensionsEventSuscriptionId = thisObject.container.parentContainer.eventHandler.listenToEvent('Dimmensions Changed', rateScaleUpstreamDimensioinsChanged) thisObject.rateScale.initialize(timelineChartCoordinateSystem, thisObject.container.parentContainer, thisObject.container) - function rateScaleUpstreamDimensioinsChanged () { - thisObject.container.frame.height = TIME_MACHINE_HEIGHT + TIME_MACHINE_HEIGHT * thisObject.rateScale.scale - recalculateCoordinateSystem() - thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event) - } - - function rateScaleUpstreamChanged (event) { - // thisObject.rateScale.setScale(event.scale) - } - function rateScaleOffsetChanged (event) { if (thisObject.container.frame.offset.y !== event.offset) { thisObject.container.frame.offset.y = event.offset @@ -205,12 +188,6 @@ function newTimelineChart () { } } - function rateScaleValueChanged (event) { - thisObject.container.frame.height = TIME_MACHINE_HEIGHT + TIME_MACHINE_HEIGHT * event.scale - recalculateCoordinateSystem() - thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event) - } - function rateScaleMouseOver (event) { thisObject.container.eventHandler.raiseEvent('onChildrenMouseOver', event) } diff --git a/CanvasApp/ChartsSpace/Viewport.js b/CanvasApp/ChartsSpace/Viewport.js index 77c7063b0..2a054191c 100644 --- a/CanvasApp/ChartsSpace/Viewport.js +++ b/CanvasApp/ChartsSpace/Viewport.js @@ -34,7 +34,9 @@ function newViewport () { transformThisPoint: transformThisPoint, unTransformThisPoint: unTransformThisPoint, isThisPointVisible: isThisPointVisible, + isThisPointInViewport: isThisPointInViewport, fitIntoVisibleArea: fitIntoVisibleArea, + fitIntoViewport: fitIntoViewport, displace: displace, physics: physics, raiseEvents: raiseEvents, @@ -220,25 +222,40 @@ function newViewport () { } function fitIntoVisibleArea (point) { - /* Here we check the boundaries of the resulting points, so they dont go out of the visible area. */ - - if (point.x > thisObject.visibleArea.bottomRight.x + 1) { - point.x = thisObject.visibleArea.bottomRight.x + 1 + let pointCopy = { + x: point.x, + y: point.y } - if (point.x < thisObject.visibleArea.topLeft.x - 1) { - point.x = thisObject.visibleArea.topLeft.x - 1 + /* Here we check the boundaries of the resulting points, so they dont go out of the visible area. */ + if (pointCopy.x > thisObject.visibleArea.bottomRight.x + 1) { + pointCopy.x = thisObject.visibleArea.bottomRight.x + 1 } - if (point.y > thisObject.visibleArea.bottomRight.y + 1) { - point.y = thisObject.visibleArea.bottomRight.y + 1 + if (pointCopy.x < thisObject.visibleArea.topLeft.x - 1) { + pointCopy.x = thisObject.visibleArea.topLeft.x - 1 } - if (point.y < thisObject.visibleArea.topLeft.y - 1) { - point.y = thisObject.visibleArea.topLeft.y - 1 + if (pointCopy.y > thisObject.visibleArea.bottomRight.y + 1) { + pointCopy.y = thisObject.visibleArea.bottomRight.y + 1 } - return point + if (pointCopy.y < thisObject.visibleArea.topLeft.y - 1) { + pointCopy.y = thisObject.visibleArea.topLeft.y - 1 + } + + return pointCopy + } + + function fitIntoViewport (point) { + let pointCopy = { + x: point.x, + y: point.y + } + if (pointCopy.y > COCKPIT_SPACE_POSITION) { + pointCopy.y = COCKPIT_SPACE_POSITION + } + return pointCopy } function displace (displaceVector, recalculate) { @@ -311,11 +328,15 @@ function newViewport () { } function isThisPointVisible (point) { - if (visibleArea === undefined) { - getVisibleArea() + if (point.x < thisObject.visibleArea.topLeft.x || point.x > thisObject.visibleArea.bottomRight.x || point.y < thisObject.visibleArea.topLeft.y || point.y > thisObject.visibleArea.bottomRight.y) { + return false + } else { + return true } + } - if (point.x < visibleArea.topLeft.x || point.x > visibleArea.bottomRight.x || point.y < visibleArea.topLeft.y || point.y > visibleArea.bottomRight.y) { + function isThisPointInViewport (point) { + if (point.y > COCKPIT_SPACE_POSITION) { return false } else { return true diff --git a/CanvasApp/DesignerSpace/Workspace/Workspace.js b/CanvasApp/DesignerSpace/Workspace/Workspace.js index 657b55f13..f5d85214d 100644 --- a/CanvasApp/DesignerSpace/Workspace/Workspace.js +++ b/CanvasApp/DesignerSpace/Workspace/Workspace.js @@ -87,6 +87,8 @@ function newWorkspace () { } functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode) thisObject.enabled = true + + setInterval(saveWorkspace, 5000) } catch (err) { if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = ' + err.stack) } } @@ -108,11 +110,13 @@ function newWorkspace () { functionLibraryReferenceAttachDetach.referenceAttachNode(node, attachToNode, thisObject.workspaceNode.rootNodes) } - function physics () { - if (thisObject.enabled !== true) { return } - + function saveWorkspace () { let textToSave = stringifyWorkspace() window.localStorage.setItem(CANVAS_APP_NAME + '.' + 'Workspace', textToSave) + } + + function physics () { + if (thisObject.enabled !== true) { return } if (workingAtTask > 0) { circularProgressBar.physics() diff --git a/CanvasApp/Globals.js b/CanvasApp/Globals.js index a8204598e..771fecd62 100644 --- a/CanvasApp/Globals.js +++ b/CanvasApp/Globals.js @@ -119,7 +119,7 @@ let dailyFilePeriods = dailyFilePeriods = JSON.parse(dailyFilePeriods); -window.AT_BREAKPOINT = false; +SHOW_ANIMATION_PERFORMACE = false; let testUser = window.localStorage.getItem("test_user") let LOGGED_IN_USER_LOCAL_STORAGE_KEY diff --git a/CanvasApp/Plotter.js b/CanvasApp/Plotter.js index 97b818a28..0f90ee3c5 100644 --- a/CanvasApp/Plotter.js +++ b/CanvasApp/Plotter.js @@ -146,7 +146,7 @@ function newPlotter () { } function onMouseOver (event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -374,8 +374,8 @@ function newPlotter () { let daysOnSides = getSideDays(timeFrame) - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem) - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem) + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem) + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem) let dateDiff = rightDate.valueOf() - leftDate.valueOf() @@ -427,8 +427,8 @@ function newPlotter () { let daysOnSides = getSideDays(timeFrame) - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem) - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem) + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem) + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem) let dateDiff = rightDate.valueOf() - leftDate.valueOf() diff --git a/CanvasApp/Scales/RateScale.js b/CanvasApp/Scales/RateScale.js index 9536a0b82..dfecbec10 100644 --- a/CanvasApp/Scales/RateScale.js +++ b/CanvasApp/Scales/RateScale.js @@ -6,13 +6,11 @@ function newRateScale () { rate: undefined, fitFunction: undefined, payload: undefined, - scale: undefined, offset: undefined, minValue: undefined, maxValue: undefined, isVisible: true, layersOn: undefined, - setScale: setScale, onMouseOverSomeTimeMachineContainer: onMouseOverSomeTimeMachineContainer, physics: physics, draw: draw, @@ -22,12 +20,6 @@ function newRateScale () { finalize: finalize } - const DEFAULT_SCALE = 50 - const STEP_SCALE = 1 - const MIN_SCALE = 0 - const MAX_SCALE = 100 - const SNAP_THRESHOLD_SCALE = 1 - const DEFAULT_OFFSET = 0 const STEP_OFFSET = 1 const MIN_OFFSET = -1000 @@ -53,6 +45,7 @@ function newRateScale () { let onMouseWheelEventSubscriptionId let onMouseOverEventSubscriptionId let onMouseNotOverEventSubscriptionId + let onScaleChangedEventSubscriptionId let coordinateSystem let limitingContainer @@ -66,13 +59,13 @@ function newRateScale () { } let offsetTimer = 0 - let scaleTimer = 0 return thisObject function finalize () { thisObject.container.eventHandler.stopListening(onMouseWheelEventSubscriptionId) thisObject.container.eventHandler.stopListening(onMouseOverEventSubscriptionId) thisObject.container.eventHandler.stopListening(onMouseNotOverEventSubscriptionId) + coordinateSystem.eventHandler.stopListening(onScaleChangedEventSubscriptionId) thisObject.container.finalize() thisObject.container = undefined @@ -96,13 +89,9 @@ function newRateScale () { onMouseWheelEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel) onMouseOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseOver', onMouseOver) onMouseNotOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseNotOver', onMouseNotOver) + onScaleChangedEventSubscriptionId = coordinateSystem.eventHandler.listenToEvent('Scale Changed', onScaleChanged) - thisObject.scale = DEFAULT_SCALE readObjectState() - - let event = {} - event.scale = thisObject.scale - thisObject.container.eventHandler.raiseEvent('Rate Scale Value Changed', event) } function onMouseOverSomeTimeMachineContainer (event) { @@ -125,6 +114,10 @@ function newRateScale () { } } + function onScaleChanged () { + saveObjectState() + } + function onMouseOver (event) { isMouseOver = true event.containerId = thisObject.container.id @@ -134,16 +127,13 @@ function newRateScale () { function onMouseNotOver () { isMouseOver = false offsetTimer = 0 - scaleTimer = 0 } function onMouseWheel (event) { - let morePower = 1 - let delta - if (event.shiftKey === true) { + let morePower = 1 if (event.buttons === 4) { morePower = 10 } // Mouse wheel pressed. - delta = event.wheelDelta + let delta = event.wheelDelta if (delta < 0) { thisObject.offset = thisObject.offset - STEP_OFFSET * morePower if (thisObject.offset < MIN_OFFSET) { thisObject.offset = STEP_OFFSET } @@ -166,45 +156,22 @@ function newRateScale () { saveObjectState() offsetTimer = 100 - scaleTimer = 0 } else { - if (event.buttons === 4) { morePower = 5 } // Mouse wheel pressed. - delta = event.wheelDelta + let factor + let morePower = 10 + if (event.buttons === 4) { morePower = 1 } // Mouse wheel pressed. + + let delta = event.wheelDelta if (delta < 0) { - thisObject.scale = thisObject.scale - STEP_SCALE * morePower - if (thisObject.scale < MIN_SCALE) { thisObject.scale = MIN_SCALE } + factor = -0.01 * morePower } else { - thisObject.scale = thisObject.scale + STEP_SCALE * morePower - if (thisObject.scale > MAX_SCALE) { thisObject.scale = MAX_SCALE } + factor = 0.01 * morePower } - finishScaleChange(event) + coordinateSystem.zoomY(factor, event, limitingContainer) } } - function setScale (scale) { - thisObject.scale = scale - let event = {} - finishScaleChange(event) - } - - function finishScaleChange (event) { - if ( - thisObject.scale <= DEFAULT_SCALE + SNAP_THRESHOLD_SCALE && - thisObject.scale >= DEFAULT_SCALE - SNAP_THRESHOLD_SCALE - ) { - event.scale = DEFAULT_SCALE - } else { - event.scale = thisObject.scale - } - event.isUserAction = true - thisObject.container.eventHandler.raiseEvent('Rate Scale Value Changed', event) - - saveObjectState() - offsetTimer = 0 - scaleTimer = 100 - } - function getContainer (point) { if (thisObject.container.frame.isThisPointHere(point, true) === true) { return thisObject.container @@ -214,11 +181,9 @@ function newRateScale () { function saveObjectState () { try { let code = JSON.parse(thisObject.payload.node.code) - code.scale = thisObject.scale / MAX_SCALE * 100 - code.scale = code.scale.toFixed(0) code.offset = thisObject.offset - code.minValue = thisObject.minValue - code.maxValue = thisObject.maxValue + code.minValue = coordinateSystem.min.y + code.maxValue = coordinateSystem.max.y thisObject.payload.node.code = JSON.stringify(code, null, 4) } catch (err) { // we ignore errors here since most likely they will be parsing errors. @@ -229,28 +194,6 @@ function newRateScale () { try { let code = JSON.parse(thisObject.payload.node.code) - if (isNaN(code.scale) || code.scale === null || code.scale === undefined) { - // not using this value - } else { - code.scale = code.scale / 100 * MAX_SCALE - if (code.scale < MIN_SCALE) { code.scale = MIN_SCALE } - if (code.scale > MAX_SCALE) { code.scale = MAX_SCALE } - - if (code.scale !== thisObject.scale) { - thisObject.scale = code.scale - let event = {} - if ( - thisObject.scale <= DEFAULT_SCALE + SNAP_THRESHOLD_SCALE && - thisObject.scale >= DEFAULT_SCALE - SNAP_THRESHOLD_SCALE - ) { - event.scale = DEFAULT_SCALE - } else { - event.scale = thisObject.scale - } - thisObject.container.eventHandler.raiseEvent('Rate Scale Value Changed', event) - } - } - if (isNaN(code.offset) || code.offset === null || code.offset === undefined) { // not using this value } else { @@ -294,7 +237,6 @@ function newRateScale () { function physics () { offsetTimer-- - scaleTimer-- readObjectState() positioningPhysics() } @@ -350,7 +292,7 @@ function newRateScale () { y: mouse.position.y + thisObject.offset } - thisObject.rate = getRateFromPoint(ratePoint, rateCalculationsContainer, coordinateSystem) + thisObject.rate = getRateFromPointAtBrowserCanvas(ratePoint, rateCalculationsContainer, coordinateSystem) /* rateScale Positioning */ ratePoint = { @@ -395,7 +337,6 @@ function newRateScale () { function drawForeground () { if (isMouseOver === true) { drawScaleBox() - drawArrows() } } @@ -427,112 +368,6 @@ function newRateScale () { label3 = 'OFFSET' } - if (scaleTimer > 0) { - label2 = (thisObject.scale / MAX_SCALE * 100).toFixed(0) - label3 = 'SCALE' - } - drawScaleDisplay(label1, label2, label3, 0, 0, 0, icon1, icon2, thisObject.container, backgroundColor) } - - function drawArrows () { - if (visible === false || thisObject.rate === undefined) { return } - - const X_OFFSET = thisObject.container.frame.width / 2 - const Y_OFFSET = thisObject.container.frame.height / 2 - const HEIGHT = 6 - const WIDTH = 18 - const LINE_WIDTH = 3 - const OPACITY = 0.2 - const DISTANCE_BETWEEN_ARROWS = 10 - const MIN_DISTANCE_FROM_CENTER = 30 - const CURRENT_SCALE_DISTANCE = MIN_DISTANCE_FROM_CENTER + thisObject.scale - const MAX_DISTANCE_FROM_CENTER = MIN_DISTANCE_FROM_CENTER + 215 + DISTANCE_BETWEEN_ARROWS - - let ARROW_DIRECTION = 0 - - ARROW_DIRECTION = -1 - drawTwoArrows() - ARROW_DIRECTION = 1 - drawTwoArrows() - - function drawTwoArrows () { - point1 = { - x: X_OFFSET - WIDTH / 2, - y: Y_OFFSET + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION - } - - point2 = { - x: X_OFFSET, - y: Y_OFFSET + HEIGHT * ARROW_DIRECTION + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION - } - - point3 = { - x: X_OFFSET + WIDTH / 2, - y: Y_OFFSET + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION - } - - point1 = thisObject.container.frame.frameThisPoint(point1) - point2 = thisObject.container.frame.frameThisPoint(point2) - point3 = thisObject.container.frame.frameThisPoint(point3) - - point4 = { - x: X_OFFSET - WIDTH / 2, - y: Y_OFFSET - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION - } - - point5 = { - x: X_OFFSET, - y: Y_OFFSET + HEIGHT * ARROW_DIRECTION - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION - } - - point6 = { - x: X_OFFSET + WIDTH / 2, - y: Y_OFFSET - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION - } - - point4 = thisObject.container.frame.frameThisPoint(point4) - point5 = thisObject.container.frame.frameThisPoint(point5) - point6 = thisObject.container.frame.frameThisPoint(point6) - - point7 = { - x: X_OFFSET - WIDTH / 2, - y: Y_OFFSET - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + MAX_DISTANCE_FROM_CENTER * ARROW_DIRECTION - } - - point8 = { - x: X_OFFSET, - y: Y_OFFSET - HEIGHT * ARROW_DIRECTION - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + MAX_DISTANCE_FROM_CENTER * ARROW_DIRECTION - } - - point9 = { - x: X_OFFSET + WIDTH / 2, - y: Y_OFFSET - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + MAX_DISTANCE_FROM_CENTER * ARROW_DIRECTION - } - - point7 = thisObject.container.frame.frameThisPoint(point7) - point8 = thisObject.container.frame.frameThisPoint(point8) - point9 = thisObject.container.frame.frameThisPoint(point9) - - browserCanvasContext.setLineDash([0, 0]) - - browserCanvasContext.beginPath() - - browserCanvasContext.moveTo(point1.x, point1.y) - browserCanvasContext.lineTo(point2.x, point2.y) - browserCanvasContext.lineTo(point3.x, point3.y) - - browserCanvasContext.moveTo(point4.x, point4.y) - browserCanvasContext.lineTo(point5.x, point5.y) - browserCanvasContext.lineTo(point6.x, point6.y) - - browserCanvasContext.moveTo(point7.x, point7.y) - browserCanvasContext.lineTo(point8.x, point8.y) - browserCanvasContext.lineTo(point9.x, point9.y) - - browserCanvasContext.lineWidth = LINE_WIDTH - browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.DARK + ', ' + OPACITY + ')' - browserCanvasContext.stroke() - } - } } diff --git a/CanvasApp/Scales/TimeScale.js b/CanvasApp/Scales/TimeScale.js index 881061cca..3a4ef74ad 100644 --- a/CanvasApp/Scales/TimeScale.js +++ b/CanvasApp/Scales/TimeScale.js @@ -2,7 +2,6 @@ function newTimeScale () { const MODULE_NAME = 'Time Scale' let thisObject = { - scale: undefined, container: undefined, date: undefined, fitFunction: undefined, @@ -19,12 +18,6 @@ function newTimeScale () { finalize: finalize } - const DEFAULT_SCALE = 0 - const STEP_SCALE = 2.5 - const MIN_SCALE = 0 - const MAX_SCALE = 250 - const SNAP_THRESHOLD_SCALE = 0 - thisObject.container = newContainer() thisObject.container.initialize(MODULE_NAME) @@ -42,6 +35,7 @@ function newTimeScale () { let onMouseWheelEventSubscriptionId let onMouseOverEventSubscriptionId let onMouseNotOverEventSubscriptionId + let onScaleChangedEventSubscriptionId let coordinateSystem let limitingContainer @@ -52,13 +46,14 @@ function newTimeScale () { y: 0 } } - let scaleTimer = 0 + return thisObject function finalize () { thisObject.container.eventHandler.stopListening(onMouseWheelEventSubscriptionId) thisObject.container.eventHandler.stopListening(onMouseOverEventSubscriptionId) thisObject.container.eventHandler.stopListening(onMouseNotOverEventSubscriptionId) + coordinateSystem.eventHandler.stopListening(onScaleChangedEventSubscriptionId) thisObject.container.finalize() thisObject.container = undefined @@ -74,19 +69,12 @@ function newTimeScale () { coordinateSystem = pCoordinateSystem limitingContainer = pLimitingContainer - thisObject.fromDate = coordinateSystem.min.x - thisObject.toDate = coordinateSystem.max.x - onMouseWheelEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel) onMouseOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseOver', onMouseOver) onMouseNotOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseNotOver', onMouseNotOver) + onScaleChangedEventSubscriptionId = coordinateSystem.eventHandler.listenToEvent('Scale Changed', onScaleChanged) - thisObject.scale = DEFAULT_SCALE readObjectState() - - let event = {} - event.scale = thisObject.scale - thisObject.container.eventHandler.raiseEvent('Time Scale Value Changed', event) } function onMouseOverSomeTimeMachineContainer (event) { @@ -117,36 +105,25 @@ function newTimeScale () { function onMouseNotOver () { isMouseOver = false - scaleTimer = 0 } function onMouseWheel (event) { - let morePower = 1 - if (event.buttons === 4) { morePower = 5 } // Mouse wheel pressed. + let factor + let morePower = 10 + if (event.buttons === 4) { morePower = 1 } // Mouse wheel pressed. - delta = event.wheelDelta + let delta = event.wheelDelta if (delta < 0) { - thisObject.scale = thisObject.scale - STEP_SCALE * morePower - if (thisObject.scale < MIN_SCALE) { thisObject.scale = MIN_SCALE } + factor = -0.01 * morePower } else { - thisObject.scale = thisObject.scale + STEP_SCALE * morePower - if (thisObject.scale > MAX_SCALE) { thisObject.scale = MAX_SCALE } + factor = 0.01 * morePower } - if ( - thisObject.scale <= DEFAULT_SCALE + SNAP_THRESHOLD_SCALE && - thisObject.scale >= DEFAULT_SCALE - SNAP_THRESHOLD_SCALE - ) { - event.scale = DEFAULT_SCALE - } else { - event.scale = thisObject.scale - } - - event.isUserAction = true - thisObject.container.eventHandler.raiseEvent('Time Scale Value Changed', event) + coordinateSystem.zoomX(factor, event, limitingContainer, MODULE_NAME) + } + function onScaleChanged () { saveObjectState() - scaleTimer = 100 } function getContainer (point) { @@ -158,10 +135,8 @@ function newTimeScale () { function saveObjectState () { try { let code = JSON.parse(thisObject.payload.node.code) - code.scale = thisObject.scale / MAX_SCALE * 100 - code.scale = code.scale.toFixed(0) - code.fromDate = (new Date(thisObject.fromDate)).toISOString() - code.toDate = (new Date(thisObject.toDate)).toISOString() + code.fromDate = (new Date(coordinateSystem.min.x)).toISOString() + code.toDate = (new Date(coordinateSystem.max.x)).toISOString() thisObject.payload.node.code = JSON.stringify(code, null, 4) } catch (err) { // we ignore errors here since most likely they will be parsing errors. @@ -172,28 +147,6 @@ function newTimeScale () { try { let code = JSON.parse(thisObject.payload.node.code) - if (isNaN(code.scale) || code.scale === null || code.scale === undefined) { - // not using this value - } else { - code.scale = code.scale / 100 * MAX_SCALE - if (code.scale < MIN_SCALE) { code.scale = MIN_SCALE } - if (code.scale > MAX_SCALE) { code.scale = MAX_SCALE } - - if (code.scale !== thisObject.scale) { - thisObject.scale = code.scale - let event = {} - if ( - thisObject.scale <= DEFAULT_SCALE + SNAP_THRESHOLD_SCALE && - thisObject.scale >= DEFAULT_SCALE - SNAP_THRESHOLD_SCALE - ) { - event.scale = DEFAULT_SCALE - } else { - event.scale = thisObject.scale - } - thisObject.container.eventHandler.raiseEvent('Time Scale Value Changed', event) - } - } - if ( (isNaN(Date.parse(code.fromDate)) || code.fromDate === null || code.fromDate === undefined) || (isNaN(Date.parse(code.toDate)) || code.toDate === null || code.toDate === undefined) @@ -215,7 +168,6 @@ function newTimeScale () { } function physics () { - scaleTimer-- readObjectState() positioningPhysics() } @@ -245,7 +197,7 @@ function newTimeScale () { y: 0 } - let mouseDate = getDateFromPoint(timePoint, limitingContainer, coordinateSystem) + let mouseDate = getDateFromPointAtBrowserCanvas(timePoint, limitingContainer, coordinateSystem) thisObject.date = new Date(mouseDate) @@ -285,7 +237,6 @@ function newTimeScale () { function drawForeground () { if (isMouseOver === true) { drawScaleBox() - drawArrows() } } @@ -303,114 +254,6 @@ function newTimeScale () { let backgroundColor = UI_COLOR.BLACK - if (scaleTimer > 0) { - label2 = (thisObject.scale / MAX_SCALE * 100).toFixed(0) - label3 = 'SCALE' - } - drawScaleDisplay(label1, label2, label3, 0, 0, 0, icon1, icon2, thisObject.container, backgroundColor) } - - function drawArrows () { - if (visible === false || thisObject.date === undefined) { return } - - const X_OFFSET = thisObject.container.frame.width / 2 - const Y_OFFSET = thisObject.container.frame.height / 2 - 10 - const HEIGHT = 18 - const WIDTH = 6 - const LINE_WIDTH = 3 - const OPACITY = 0.2 - const DISTANCE_BETWEEN_ARROWS = 10 - const MIN_DISTANCE_FROM_CENTER = 110 - const CURRENT_SCALE_DISTANCE = MIN_DISTANCE_FROM_CENTER + thisObject.scale - const MAX_DISTANCE_FROM_CENTER = MIN_DISTANCE_FROM_CENTER + MAX_SCALE + DISTANCE_BETWEEN_ARROWS - - let ARROW_DIRECTION = 0 - - ARROW_DIRECTION = -1 - drawTwoArrows() - ARROW_DIRECTION = 1 - drawTwoArrows() - - function drawTwoArrows () { - point1 = { - x: X_OFFSET - WIDTH / 2 * ARROW_DIRECTION + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION, - y: Y_OFFSET - 0 - } - - point2 = { - x: X_OFFSET + WIDTH / 2 * ARROW_DIRECTION + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION, - y: Y_OFFSET + HEIGHT / 2 - } - - point3 = { - x: X_OFFSET - WIDTH / 2 * ARROW_DIRECTION + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION, - y: Y_OFFSET + HEIGHT - } - - point1 = thisObject.container.frame.frameThisPoint(point1) - point2 = thisObject.container.frame.frameThisPoint(point2) - point3 = thisObject.container.frame.frameThisPoint(point3) - - point4 = { - x: X_OFFSET - WIDTH / 2 * ARROW_DIRECTION - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION, - y: Y_OFFSET - 0 - } - - point5 = { - x: X_OFFSET + WIDTH / 2 * ARROW_DIRECTION - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION, - y: Y_OFFSET + HEIGHT / 2 - } - - point6 = { - x: X_OFFSET - WIDTH / 2 * ARROW_DIRECTION - DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + CURRENT_SCALE_DISTANCE * ARROW_DIRECTION, - y: Y_OFFSET + HEIGHT - } - - point4 = thisObject.container.frame.frameThisPoint(point4) - point5 = thisObject.container.frame.frameThisPoint(point5) - point6 = thisObject.container.frame.frameThisPoint(point6) - - point7 = { - x: X_OFFSET + WIDTH / 2 * ARROW_DIRECTION + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + MAX_DISTANCE_FROM_CENTER * ARROW_DIRECTION, - y: Y_OFFSET - 0 - } - - point8 = { - x: X_OFFSET - WIDTH / 2 * ARROW_DIRECTION + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + MAX_DISTANCE_FROM_CENTER * ARROW_DIRECTION, - y: Y_OFFSET + HEIGHT / 2 - } - - point9 = { - x: X_OFFSET + WIDTH / 2 * ARROW_DIRECTION + DISTANCE_BETWEEN_ARROWS / 2 * ARROW_DIRECTION + MAX_DISTANCE_FROM_CENTER * ARROW_DIRECTION, - y: Y_OFFSET + HEIGHT - } - - point7 = thisObject.container.frame.frameThisPoint(point7) - point8 = thisObject.container.frame.frameThisPoint(point8) - point9 = thisObject.container.frame.frameThisPoint(point9) - - browserCanvasContext.setLineDash([0, 0]) - - browserCanvasContext.beginPath() - - browserCanvasContext.moveTo(point1.x, point1.y) - browserCanvasContext.lineTo(point2.x, point2.y) - browserCanvasContext.lineTo(point3.x, point3.y) - - browserCanvasContext.moveTo(point4.x, point4.y) - browserCanvasContext.lineTo(point5.x, point5.y) - browserCanvasContext.lineTo(point6.x, point6.y) - - browserCanvasContext.moveTo(point7.x, point7.y) - browserCanvasContext.lineTo(point8.x, point8.y) - browserCanvasContext.lineTo(point9.x, point9.y) - - browserCanvasContext.closePath() - - browserCanvasContext.lineWidth = LINE_WIDTH - browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.DARK + ', ' + OPACITY + ')' - browserCanvasContext.stroke() - } - } } diff --git a/CanvasApp/Spaces/ChartSpace.js b/CanvasApp/Spaces/ChartSpace.js index 333b98fc5..3636bd1bc 100644 --- a/CanvasApp/Spaces/ChartSpace.js +++ b/CanvasApp/Spaces/ChartSpace.js @@ -112,6 +112,7 @@ function newChartSpace () { function getContainer (point, purpose) { if (thisObject.visible !== true) { return } + if (thisObject.viewport.isThisPointInViewport(point) === false) { return } let container @@ -141,9 +142,13 @@ function newChartSpace () { } } } - if (containerFound !== undefined) { return containerFound } + if (containerFound !== undefined) { + containerFound.space = 'Charting Space' + return containerFound + } if (thisObject.container.frame.isThisPointHere(point, true) === true) { + thisObject.container.space = 'Charting Space' return thisObject.container } else { return undefined diff --git a/CanvasApp/Spaces/CockpitSpace.js b/CanvasApp/Spaces/CockpitSpace.js index e7ac6a068..e866d859d 100644 --- a/CanvasApp/Spaces/CockpitSpace.js +++ b/CanvasApp/Spaces/CockpitSpace.js @@ -173,6 +173,7 @@ // if (container !== undefined) { return container } if (thisObject.container.frame.isThisPointHere(point, true) === true) { + thisObject.container.space = 'Cockpit Space' return thisObject.container } else { return undefined diff --git a/CanvasApp/Spaces/DesignerSpace.js b/CanvasApp/Spaces/DesignerSpace.js index add5dd2f2..bf6a78ee5 100644 --- a/CanvasApp/Spaces/DesignerSpace.js +++ b/CanvasApp/Spaces/DesignerSpace.js @@ -280,7 +280,10 @@ function newDesignerSpace () { if (thisObject.sidePanel !== undefined) { container = thisObject.sidePanel.getContainer(point) - if (container !== undefined) { return container } + if (container !== undefined) { + container.space = 'Designer Space' + return container + } } return diff --git a/CanvasApp/Spaces/FloatingSpace.js b/CanvasApp/Spaces/FloatingSpace.js index 0737e8ed0..bd84fd983 100644 --- a/CanvasApp/Spaces/FloatingSpace.js +++ b/CanvasApp/Spaces/FloatingSpace.js @@ -237,9 +237,13 @@ function newFloatingSpace () { let container container = thisObject.floatingLayer.getContainer(point) - if (container !== undefined) { return container } + if (container !== undefined) { + container.space = 'Floating Space' + return container + } if (visible === true) { + thisObject.container.space = 'Floating Space' return thisObject.container } } diff --git a/CanvasApp/Spaces/PanelsSpace.js b/CanvasApp/Spaces/PanelsSpace.js index efe7e03b9..6efa86a7a 100644 --- a/CanvasApp/Spaces/PanelsSpace.js +++ b/CanvasApp/Spaces/PanelsSpace.js @@ -343,9 +343,11 @@ function newPanelsSpace () { } } if (container !== undefined) { + container.space = 'Panels Space' return container } } + thisObject.container.space = 'Panels Space' return thisObject.container } } diff --git a/CanvasApp/Spaces/TopSpace.js b/CanvasApp/Spaces/TopSpace.js index 8ed4149c4..ff1b7786f 100644 --- a/CanvasApp/Spaces/TopSpace.js +++ b/CanvasApp/Spaces/TopSpace.js @@ -50,18 +50,7 @@ function newTopSpace () { } function getContainer (point) { - let container - return - container = thisObject.currentEvent.getContainer(point) - if (container !== undefined) { return container } - - container = thisObject.login.getContainer(point) - if (container !== undefined) { return container } - - /* The point does not belong to any inner container, so we return the current container. */ - - return thisObject.container } function draw () { diff --git a/CanvasApp/SplashScreen.js b/CanvasApp/SplashScreen.js index b81e8352a..5fe6da376 100644 --- a/CanvasApp/SplashScreen.js +++ b/CanvasApp/SplashScreen.js @@ -97,7 +97,7 @@ function newSplashScreen () { /* Second the % of Advance. */ let label = '' + Math.trunc(stepsInitializationCounter) + ' %' - stepsInitializationCounter = stepsInitializationCounter + 2.0 + stepsInitializationCounter = stepsInitializationCounter + 5.0 if (stepsInitializationCounter > 99) { splashScreenNeeded = false diff --git a/CanvasApp/Utilities.js b/CanvasApp/Utilities.js index ddf1f302a..8079fe872 100644 --- a/CanvasApp/Utilities.js +++ b/CanvasApp/Utilities.js @@ -85,7 +85,7 @@ function convertTimeFrameToName (pTimeFrame) { function downloadText (filename, text) { let element = document.createElement('a') element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)) - element.setAttribute('downloadText', filename) + element.setAttribute('download', filename) element.style.display = 'none' document.body.appendChild(element) element.click() @@ -141,7 +141,7 @@ function pad (str, max) { return str.length < max ? pad('0' + str, max) : str } -function getDateFromPoint (point, container, coordinateSystem) { +function getDateFromPointAtBrowserCanvas (point, container, coordinateSystem) { point = unTransformThisPoint(point, container) point = coordinateSystem.unInverseTransform(point, container.frame.height) @@ -150,13 +150,43 @@ function getDateFromPoint (point, container, coordinateSystem) { return date } -function getRateFromPoint (point, container, coordinateSystem) { +function getDateFromPointAtChartsSpace (point, container, coordinateSystem) { + point = container.frame.unframeThisPoint(point) + point = coordinateSystem.unInverseTransform(point, container.frame.height) + + let date = new Date(point.x) + + return date +} + +function getDateFromPointAtContainer (point, container, coordinateSystem) { + point = coordinateSystem.unInverseTransform(point, container.frame.height) + + let date = new Date(point.x) + + return date +} + +function getRateFromPointAtBrowserCanvas (point, container, coordinateSystem) { point = unTransformThisPoint(point, container) point = coordinateSystem.unInverseTransform(point, container.frame.height) return point.y } +function getRateFromPointAtChartSpace (point, container, coordinateSystem) { + point = container.frame.unframeThisPoint(point) + point = coordinateSystem.unInverseTransform(point, container.frame.height) + + return point.y +} + +function getRateFromPointAtContainer (point, container, coordinateSystem) { + point = coordinateSystem.unInverseTransform(point, container.frame.height) + + return point.y +} + function getMilisecondsFromPoint (point, container, coordinateSystem) { point = unTransformThisPoint(point, container) point = coordinateSystem.unInverseTransform(point, container.frame.height) @@ -198,16 +228,14 @@ function removeTime (datetime) { return dateOnly } -function printLabel (labelToPrint, x, y, opacity, fontSize) { +function printLabel (labelToPrint, x, y, opacity, fontSize, color) { let labelPoint + if (color === undefined) { color = UI_COLOR.DARK } browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY - let label = '' + labelToPrint - let xOffset = label.length / 2 * fontSize * FONT_ASPECT_RATIO - - browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', ' + opacity + ')' + browserCanvasContext.fillStyle = 'rgba(' + color + ', ' + opacity + ')' browserCanvasContext.fillText(label, x, y) } diff --git a/Inter-Process-Files/AppSchema.json b/Inter-Process-Files/AppSchema.json index 4a4e1a016..fb51cfb53 100644 --- a/Inter-Process-Files/AppSchema.json +++ b/Inter-Process-Files/AppSchema.json @@ -4965,7 +4965,7 @@ } ], "initialValues": { - "code": "{ \n\"scale\": \"0.00\",\n\"fromDate\": \"2018-01-01\",\n\"toDate\": \"2020-12-31\"\n}" + "code": "{ \n\"fromDate\": \"2018-01-01\",\n\"toDate\": \"2020-12-31\"\n}" }, "addLeftIcons": true, "editors": { @@ -5000,7 +5000,7 @@ } ], "initialValues": { - "code": "{ \n\"scale\": \"50.00\",\n\"offset\": \"0\",\n\"minValue\": 0,\n\"maxValue\": 25000\n}" + "code": "{ \n\"offset\": \"0\",\n\"minValue\": 0,\n\"maxValue\": 25000\n}" }, "addLeftIcons": true, "editors": { diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Bollinger-Bands/BollingerBands.js b/Legacy-Code/AAMasters/plotters/Plotters-Bollinger-Bands/BollingerBands.js index b233d428e..f2209d248 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Bollinger-Bands/BollingerBands.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Bollinger-Bands/BollingerBands.js @@ -157,7 +157,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -320,8 +320,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -408,8 +408,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Bollinger-Bands/PercentageBandwidth.js b/Legacy-Code/AAMasters/plotters/Plotters-Bollinger-Bands/PercentageBandwidth.js index 34bf52b9f..50d0c7ace 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Bollinger-Bands/PercentageBandwidth.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Bollinger-Bands/PercentageBandwidth.js @@ -301,8 +301,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, plotAreaFrame); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, plotAreaFrame); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, plotAreaFrame); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, plotAreaFrame); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -386,8 +386,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, plotAreaFrame); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, plotAreaFrame); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, plotAreaFrame); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, plotAreaFrame); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Candles-Volumes/Candles.js b/Legacy-Code/AAMasters/plotters/Plotters-Candles-Volumes/Candles.js index 8d7838387..71af87418 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Candles-Volumes/Candles.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Candles-Volumes/Candles.js @@ -146,7 +146,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -303,8 +303,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -393,8 +393,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Candles-Volumes/Volumes.js b/Legacy-Code/AAMasters/plotters/Plotters-Candles-Volumes/Volumes.js index 1ecb4f859..18d564740 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Candles-Volumes/Volumes.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Candles-Volumes/Volumes.js @@ -154,7 +154,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -298,8 +298,8 @@ if (fileCursor.files.size === 0) { return; } // We need to wait until there are files in the cursor - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -382,8 +382,8 @@ if (marketFile === undefined) { return; } // Initialization not complete yet. - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Stairs-Patterns/CandleStairs.js b/Legacy-Code/AAMasters/plotters/Plotters-Stairs-Patterns/CandleStairs.js index 50903218f..49dc21ab2 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Stairs-Patterns/CandleStairs.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Stairs-Patterns/CandleStairs.js @@ -158,7 +158,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -328,8 +328,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -434,8 +434,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Stairs-Patterns/VolumeStairs.js b/Legacy-Code/AAMasters/plotters/Plotters-Stairs-Patterns/VolumeStairs.js index 0427497ff..4780831d9 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Stairs-Patterns/VolumeStairs.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Stairs-Patterns/VolumeStairs.js @@ -156,7 +156,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -324,8 +324,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -418,8 +418,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Conditions.js b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Conditions.js index c95c14967..53c535088 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Conditions.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Conditions.js @@ -308,8 +308,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -390,8 +390,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/SimulationExecution.js b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/SimulationExecution.js index 2164905d7..e937af57d 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/SimulationExecution.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/SimulationExecution.js @@ -119,7 +119,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Strategies.js b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Strategies.js index e28e54e06..4da8a543c 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Strategies.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Strategies.js @@ -171,7 +171,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -344,8 +344,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -427,8 +427,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Trades.js b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Trades.js index f920f748e..cf8d612ce 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Trades.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/Trades.js @@ -164,7 +164,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -337,8 +337,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -414,8 +414,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/TradingSimulation.js b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/TradingSimulation.js index 856a22f61..3e0604399 100644 --- a/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/TradingSimulation.js +++ b/Legacy-Code/AAMasters/plotters/Plotters-Trading-Simulation/TradingSimulation.js @@ -174,7 +174,7 @@ } function onMouseOver(event) { - let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem) + let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem) userPositionDate = userPosition.valueOf() } @@ -327,8 +327,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); @@ -428,8 +428,8 @@ let daysOnSides = getSideDays(timeFrame); - let leftDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); - let rightDate = getDateFromPoint(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); + let leftDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topLeft, thisObject.container, coordinateSystem); + let rightDate = getDateFromPointAtBrowserCanvas(canvas.chartSpace.viewport.visibleArea.topRight, thisObject.container, coordinateSystem); let dateDiff = rightDate.valueOf() - leftDate.valueOf(); diff --git a/docs/_data/concepts.md b/docs/_data/concepts.md index c79070b0d..d7bb14c59 100644 --- a/docs/_data/concepts.md +++ b/docs/_data/concepts.md @@ -1,16 +1,16 @@ -designer: "The designer is the portion of the system the controls all the information available and that enables to user to exert control over the whole system." +design_space: "The design space is the visual environment that features all the information available and that enables users to exert control over the whole system. You may think of the design space as your desktop." -workspace: "The workspace refers to the visual environment that contains all information managed by the system. You may think of the workspace as your desktop." +workspace: "The workspace refers to the body of information managed by the system. Every data structure in the form of strategies, the configuration of different parts of the system, operational settings, and the relationships among them live within the workspace." -node: "A node is a small data structure containing information which may be related to markets information, trading intelligence, the operation of the system or other concepts. They are visually represented by icons on the workspace." +node: "A node is a small data structure containing information which may be related to market information, trading intelligence, the operation of the system or other concepts. They are visually represented by icons on the workspace." -structure_of_nodes: "Nodes may be linked together forming structures of nodes. In every structure of nodes, there is a parent node with offprings. That is, a structure of nodes is a data structure composed of any node and its offspring." +structure_of_nodes: "Nodes may be chained together forming structures of nodes. In every structure of nodes, there is a parent node with offsprings. That is, a structure of nodes is a data structure composed of any node and its offspring." -parent-offspring_relationships: "Nodes in structures of nodes are chained to each other by so-called parent-offspring relationships, which are visually represented by orange dotted lines, which may turn yellow or blue depending on certain visualization properties that the user may control. When nodes are chained together they form structures of nodes." +parent-offspring_relationships: "Nodes in structures of nodes are chained to each other by so-called parent-offspring relationships. These relationships are visually represented by orange dotted lines, which may turn yellow or blue depending on certain visualization properties that the user may control. When nodes are chained together they form structures of nodes." chain: "Nodes in the workspace may be unchained or detached from its parent, carrying all offspring with it. When a node is left unchained, it is no longer taken into account in the logic of the hierarchy, as it no longer belongs to it. When a node is chained back or reattached to the hierarchy, it goes back to being functional." -hierarchy: "A hierarchy is the representation of an overarching, top-level concept resulting in a long chain of nodes, usually with many ramifications. Currently, the system manages five different types of hierarchies: Charting Space, Crypto Ecosystem, Trading Systems, Network, and Data Mines." +hierarchy: "A hierarchy is the representation of an overarching, top-level concept resulting in a long chain of nodes, usually with many ramifications. Currently, the system manages five different types of hierarchies: the crypto ecosystem, the charting space, trading systems, the network, and data mines." reference: "A reference is a mechanism by which information in a node is related to, or accessed by, other nodes. The ability of a node to establish a reference with another node enables the first to access the information or features entailed in the second one." @@ -22,6 +22,9 @@ indicator_bot: "An indicator bot processes data to produce more elaborate datase trading_bot: "Based on datasets exposed as products by other bots (counting sensors, indicators and even other trading bots), a trading bot applies the trading logic defined on a trading system to, on one side, generate a complete trading simulation (outputting datasets that include trades, the action of strategies, validation of conditions, etc.), and on the other side, manage the execution of orders when on a forward testing or live trading session." -superalgos_protocol: "In conceptual terms, the Superalgos Protocol determines the structure in which the information decribing a trading system is stored and provides guidance on how traders shall create and automate strategies. In practical terms, the protocol results in a file with a specific format capable of holding all the information concerning any number and variety of strategies. In its current early version, the protocol is the description of a JSON object which defines the desired automation." +superalgos_protocol: "In conceptual terms, the Superalgos Protocol determines the structure in which the information describing a trading system is stored and guides how traders shall create and automate strategies. In practical terms, the protocol results in a file with a specific format capable of holding all the information concerning any number and variety of strategies. In its current early version, the protocol is the description of a JSON object which defines the desired automation." + +hierarchies_directory: "The hierarchies directory is the part of the documentation that features a description of the complete catalog of nodes of each hierachy" + +pending: "balanceAssetA, balanceAssetB, overfitting, supported assets, supported exchanges, supported markets" -pending: "balanceAssetA, balanceAssetB, overfitting, supported assets, supported exchanges, supported markets" \ No newline at end of file diff --git a/docs/_data/concepts.yml b/docs/_data/concepts.yml index 1e817f5b6..d7bb14c59 100644 --- a/docs/_data/concepts.yml +++ b/docs/_data/concepts.yml @@ -1,16 +1,16 @@ -designer: "The designer is the portion of the system the controls all the information available and that enables to user to exert control over the whole system." +design_space: "The design space is the visual environment that features all the information available and that enables users to exert control over the whole system. You may think of the design space as your desktop." -workspace: "The workspace refers to the visual environment that contains all information managed by the system. You may think of the workspace as your desktop." +workspace: "The workspace refers to the body of information managed by the system. Every data structure in the form of strategies, the configuration of different parts of the system, operational settings, and the relationships among them live within the workspace." -node: "A node is a small data structure containing information which may be related to markets information, trading intelligence, the operation of the system or other concepts. They are visually represented by icons on the workspace." +node: "A node is a small data structure containing information which may be related to market information, trading intelligence, the operation of the system or other concepts. They are visually represented by icons on the workspace." -structure_of_nodes: "Nodes may be linked together forming structures of nodes. In every structure of nodes, there is a parent node with offprings. That is, a structure of nodes is a data structure composed of any node and its offspring." +structure_of_nodes: "Nodes may be chained together forming structures of nodes. In every structure of nodes, there is a parent node with offsprings. That is, a structure of nodes is a data structure composed of any node and its offspring." -parent-offspring_relationships: "Nodes in structures of nodes are chained to each other by so-called parent-offspring relationships, which are visually represented by orange dotted lines, which may turn yellow or blue depending on certain visualization properties that the user may control. When nodes are chained together they form structures of nodes." +parent-offspring_relationships: "Nodes in structures of nodes are chained to each other by so-called parent-offspring relationships. These relationships are visually represented by orange dotted lines, which may turn yellow or blue depending on certain visualization properties that the user may control. When nodes are chained together they form structures of nodes." chain: "Nodes in the workspace may be unchained or detached from its parent, carrying all offspring with it. When a node is left unchained, it is no longer taken into account in the logic of the hierarchy, as it no longer belongs to it. When a node is chained back or reattached to the hierarchy, it goes back to being functional." -hierarchy: "A hierarchy is the representation of an overarching, top-level concept resulting in a long chain of nodes, usually with many ramifications. Currently, the system manages five different types of hierarchies: Charting Space, Crypto Ecosystem, Trading Systems, Network, and Data Mines." +hierarchy: "A hierarchy is the representation of an overarching, top-level concept resulting in a long chain of nodes, usually with many ramifications. Currently, the system manages five different types of hierarchies: the crypto ecosystem, the charting space, trading systems, the network, and data mines." reference: "A reference is a mechanism by which information in a node is related to, or accessed by, other nodes. The ability of a node to establish a reference with another node enables the first to access the information or features entailed in the second one." @@ -22,4 +22,9 @@ indicator_bot: "An indicator bot processes data to produce more elaborate datase trading_bot: "Based on datasets exposed as products by other bots (counting sensors, indicators and even other trading bots), a trading bot applies the trading logic defined on a trading system to, on one side, generate a complete trading simulation (outputting datasets that include trades, the action of strategies, validation of conditions, etc.), and on the other side, manage the execution of orders when on a forward testing or live trading session." -pending: "balanceAssetA, balanceAssetB, overfitting, supported assets, supported exchanges, supported markets" \ No newline at end of file +superalgos_protocol: "In conceptual terms, the Superalgos Protocol determines the structure in which the information describing a trading system is stored and guides how traders shall create and automate strategies. In practical terms, the protocol results in a file with a specific format capable of holding all the information concerning any number and variety of strategies. In its current early version, the protocol is the description of a JSON object which defines the desired automation." + +hierarchies_directory: "The hierarchies directory is the part of the documentation that features a description of the complete catalog of nodes of each hierachy" + +pending: "balanceAssetA, balanceAssetB, overfitting, supported assets, supported exchanges, supported markets" + diff --git a/docs/_data/definitions.yml b/docs/_data/definitions.yml index 1bb31771f..f29f39277 100644 --- a/docs/_data/definitions.yml +++ b/docs/_data/definitions.yml @@ -8,5 +8,5 @@ football: "No doubt the most fun sport to watch, football also manages to accrue soccer: "If there's one sport that dominates the world landscape, it's soccer. However, US soccer fans are few and far between. Apart from the popularity of soccer during the World Cup, most people don't even know the name of the professional soccer organization in their area." -workspace: "The workspace is a concept that refers to the visual environment that contains all hierarchies with all of their nodes, nodes that may be floating around detached from hierarchies, and the information regarding the physical position and status of all nodes within the Designer, even those detached from the hierarchies. You may think of the workspace as your desktop. It is not part of any of the hierarchies; instead, it contains them." +workspace: "The workspace is a concept that refers to the visual environment that contains all hierarchies with all of their nodes, nodes that may be floating around detached from hierarchies, and the information regarding the physical position and status of all nodes within the design space, even those detached from the hierarchies. You may think of the workspace as your desktop. It is not part of any of the hierarchies; instead, it contains them." diff --git a/docs/_data/sidebars/suite_sidebar.yml b/docs/_data/sidebars/suite_sidebar.yml index 3fc20a851..587d99a37 100644 --- a/docs/_data/sidebars/suite_sidebar.yml +++ b/docs/_data/sidebars/suite_sidebar.yml @@ -2,7 +2,7 @@ entries: - title: sidebar - product: Superalgos Suite + product: Superalgos version: 0.0.6 folders: @@ -85,43 +85,43 @@ entries: # url: /suite-layers-panel.html # output: web -# - title: Designer -# output: web -# folderitems: - -# - title: Intro, workspace and data structures -# url: /suite-designer-workspace-and-data-structures.html -# output: web - -# - title: Hierarchies -# url: /suite-hierarchies.html -# output: web - -# - title: Interface -# url: /suite-designer-interface.html -# output: web - -# - title: Atachment and detachment of nodes -# url: /suite-detachment-and-attachment-of-nodes.html -# output: web - -# - title: References -# url: /suite-references.html -# output: web - - - title: Trading Concepts + - title: Design space output: web folderitems: - - title: Defining a Trading System - url: /suite-defining-a-trading-system.html + - title: Design space, workspace, and nodes + url: /suite-design-space-workspace-and-data-structures.html output: web - - title: Defining a Strategy - url: /suite-defining-a-trading-strategy.html + - title: Hierarchies + url: /suite-hierarchies.html output: web - - title: Trading Sessions + - title: References + url: /suite-references.html + output: web + + - title: Interface + url: /suite-design-space-interface.html + output: web + + - title: Trading concepts + output: web + folderitems: + + - title: Trading systems + url: /suite-trading-systems.html + output: web + + - title: Strategies + url: /suite-strategies.html + output: web + + - title: Situations, conditions and formulas + url: /suite-situations-conditions-formulas.html + output: web + + - title: Trading sessions url: /suite-trading-sessions.html output: web @@ -129,25 +129,25 @@ entries: url: /suite-parameters.html output: web -# - title: Conditions & Formulas -# output: web -# folderitems: + - title: Writing conditions & formulas + output: web + folderitems: -# - title: Syntax Overview -# url: /suite-sysntax-overview.html -# output: web + - title: Syntax overview + url: /suite-sysntax-overview.html + output: web -# - title: Internal variables -# url: /suite-internal-variables.html -# output: web + - title: Internal variables + url: /suite-internal-variables.html + output: web -# - title: Indicators included in the data release -# url: /suite-indicators-included-in-the-data-release.html -# output: web + - title: Masters indicators + url: /suite-masters-indicators.html + output: web -# - title: Indicators not included in the release -# url: /suite-indicators-not-included-in-the-data-release.html -# output: web + - title: Sparta indicators + url: /suite-sparta-indicators.html + output: web # - title: Using non-included indicators # url: /suite-using-non-included-indicators.html @@ -273,7 +273,7 @@ entries: # url: /suite-telegram-announcements.html # output: web - - title: Hierarchies Directory + - title: Hierarchies directory output: web folderitems: diff --git a/docs/_data/trading_system.md b/docs/_data/trading_system.md index 513f6670d..1d322eacd 100644 --- a/docs/_data/trading_system.md +++ b/docs/_data/trading_system.md @@ -61,3 +61,5 @@ close_stage: "Close stage is not developed yet. In the future, it will deal with close_execution: "Close execution is the node that will eventually hold the information regarding the execution of the closing orders." event: "An event is an action triggered by predefined market situations." + +javascript_code: "The JavaScript code node may hold any snippet of valid JavaScript." \ No newline at end of file diff --git a/docs/_data/trading_system.yml b/docs/_data/trading_system.yml index 513f6670d..1d322eacd 100644 --- a/docs/_data/trading_system.yml +++ b/docs/_data/trading_system.yml @@ -61,3 +61,5 @@ close_stage: "Close stage is not developed yet. In the future, it will deal with close_execution: "Close execution is the node that will eventually hold the information regarding the execution of the closing orders." event: "An event is an action triggered by predefined market situations." + +javascript_code: "The JavaScript code node may hold any snippet of valid JavaScript." \ No newline at end of file diff --git a/docs/_includes/charting_space/--------------------------------------------template.md b/docs/_includes/charting_space/--------------------------------------------template.md index 92c5393b5..85b51a682 100644 --- a/docs/_includes/charting_space/--------------------------------------------template.md +++ b/docs/_includes/charting_space/--------------------------------------------template.md @@ -73,7 +73,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/charting_space/charting-space.md b/docs/_includes/charting_space/charting-space.md index bc0b1f6bf..a1199b8aa 100644 --- a/docs/_includes/charting_space/charting-space.md +++ b/docs/_includes/charting_space/charting-space.md @@ -48,7 +48,7 @@ -There is only one Charting Space hierarchy, thus all charts are configured here. As is common throughout the system, different concepts and elements of the charts such as the scales, data layers and so on, are represented by nodes in the hierarchy. The system allows great flexibility on how to visualize information over the charts by adding, configuring, and arranging these nodes. +There is only one charting space hierarchy, thus all charts are configured here. As is common throughout the system, different concepts and elements of the charts such as the scales, data layers and so on, are represented by nodes in the hierarchy. The system allows great flexibility on how to visualize information over the charts by adding, configuring, and arranging these nodes. @@ -61,7 +61,7 @@ There is only one Charting Space hierarchy, thus all charts are configured here. {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/charting_space/layer.md b/docs/_includes/charting_space/layer.md index 5a616ba01..daa5c0822 100644 --- a/docs/_includes/charting_space/layer.md +++ b/docs/_includes/charting_space/layer.md @@ -73,7 +73,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/charting_space/layers-manager.md b/docs/_includes/charting_space/layers-manager.md index 636601eed..bd2ad9c31 100644 --- a/docs/_includes/charting_space/layers-manager.md +++ b/docs/_includes/charting_space/layers-manager.md @@ -73,7 +73,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/charting_space/rate-scale.md b/docs/_includes/charting_space/rate-scale.md index 54888aa6f..13b9fd1bf 100644 --- a/docs/_includes/charting_space/rate-scale.md +++ b/docs/_includes/charting_space/rate-scale.md @@ -83,7 +83,7 @@ You may set a scale value from within the charts by placing the mouse pointer ov {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node @@ -118,7 +118,7 @@ Select *Configure Rate Scale* on the menu to access the configuration. * ```offset``` is a numerical value which may be positive or negative, with no specific minimum or maximum. -{% include note.html content="The values for scale and offset may be entered via the designer and the charts. Both input methods are synchronized and the resulting values are stored in the node." %} +{% include note.html content="The values for scale and offset may be entered via the design space and the charts. Both input methods are synchronized and the resulting values are stored in the node." %} diff --git a/docs/_includes/charting_space/time-frame-scale.md b/docs/_includes/charting_space/time-frame-scale.md index a20f972c1..d100dc971 100644 --- a/docs/_includes/charting_space/time-frame-scale.md +++ b/docs/_includes/charting_space/time-frame-scale.md @@ -73,7 +73,7 @@ You may set a time frame value from within the charts by placing the mouse point {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node @@ -103,7 +103,7 @@ Select *Configure Frame Scale* on the menu to access the configuration. * ```01-hs```, ```02-hs```, ```03-hs```, ```04-hs```, ```06-hs```, ```08-hs```, ```12-hs```, and ```24-hs```. - {% include note.html content="The values entered via the designer and the charts are synchronized and stored in the node." %} + {% include note.html content="The values entered via the design space and the charts are synchronized and stored in the node." %} diff --git a/docs/_includes/charting_space/time-machine.md b/docs/_includes/charting_space/time-machine.md index 004d41c54..74368b202 100644 --- a/docs/_includes/charting_space/time-machine.md +++ b/docs/_includes/charting_space/time-machine.md @@ -63,7 +63,7 @@ On the other hand, when you arrange charts on different time machines, they are {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/charting_space/time-scale.md b/docs/_includes/charting_space/time-scale.md index f48f48426..8feaaa644 100644 --- a/docs/_includes/charting_space/time-scale.md +++ b/docs/_includes/charting_space/time-scale.md @@ -75,7 +75,7 @@ You may set a scale value from within the charts by placing the mouse pointer ov {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node @@ -101,7 +101,7 @@ Select *Configure Time Scale* on the menu to access the configuration. * ```scale``` is a numerical value between 0 and 100. -{% include note.html content="The value may be entered via the designer and the charts. Both input methods are synchronized and the resulting values are stored in the node." %} +{% include note.html content="The value may be entered via the design space and the charts. Both input methods are synchronized and the resulting values are stored in the node." %} diff --git a/docs/_includes/charting_space/timeline-chart.md b/docs/_includes/charting_space/timeline-chart.md index 694b53bbf..baad0fd44 100644 --- a/docs/_includes/charting_space/timeline-chart.md +++ b/docs/_includes/charting_space/timeline-chart.md @@ -77,7 +77,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/charting_space/viewport.md b/docs/_includes/charting_space/viewport.md index f124390ef..7f278e59e 100644 --- a/docs/_includes/charting_space/viewport.md +++ b/docs/_includes/charting_space/viewport.md @@ -67,7 +67,7 @@ The concept of the viewport allows having multiple charts configured all at once {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/asset.md b/docs/_includes/crypto_ecosystem/asset.md index b467fa38f..f866c3d76 100644 --- a/docs/_includes/crypto_ecosystem/asset.md +++ b/docs/_includes/crypto_ecosystem/asset.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/crypto-ecosystem.md b/docs/_includes/crypto_ecosystem/crypto-ecosystem.md index 68c15ef23..7ca749247 100644 --- a/docs/_includes/crypto_ecosystem/crypto-ecosystem.md +++ b/docs/_includes/crypto_ecosystem/crypto-ecosystem.md @@ -2,7 +2,7 @@ {% assign title = "Crypto Ecosystem" %} {% assign definition = site.data.crypto_ecosystem.crypto_ecosystem %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "s" %} @@ -48,8 +48,6 @@ -The crypto ecosystem is a hierarchy that contains definitions regarding information obtained from third-parties, including exchanges and their markets, as well as accounts of users with those third parties. - There is only one crypto ecosystem hierarchy. You will use it to define which exchanges and which markets you wish to work with, as well as the details of your accounts with those exchanges. @@ -63,7 +61,7 @@ There is only one crypto ecosystem hierarchy. You will use it to define which ex {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/crypto-exchange.md b/docs/_includes/crypto_ecosystem/crypto-exchange.md index 21563b1a5..be5f70ffe 100644 --- a/docs/_includes/crypto_ecosystem/crypto-exchange.md +++ b/docs/_includes/crypto_ecosystem/crypto-exchange.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/crypto-exchanges.md b/docs/_includes/crypto_ecosystem/crypto-exchanges.md index d249e3b60..547b8fbfa 100644 --- a/docs/_includes/crypto_ecosystem/crypto-exchanges.md +++ b/docs/_includes/crypto_ecosystem/crypto-exchanges.md @@ -2,7 +2,7 @@ {% assign title = "Crypto Exchanges" %} {% assign definition = site.data.crypto_ecosystem.crypto_exchanges %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "" %} @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/exchange-account-asset.md b/docs/_includes/crypto_ecosystem/exchange-account-asset.md index 8e259a32d..1a5515e64 100644 --- a/docs/_includes/crypto_ecosystem/exchange-account-asset.md +++ b/docs/_includes/crypto_ecosystem/exchange-account-asset.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/exchange-account-key.md b/docs/_includes/crypto_ecosystem/exchange-account-key.md index d6f51329d..2357a442a 100644 --- a/docs/_includes/crypto_ecosystem/exchange-account-key.md +++ b/docs/_includes/crypto_ecosystem/exchange-account-key.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/exchange-accounts.md b/docs/_includes/crypto_ecosystem/exchange-accounts.md index 4eee695ab..79119db33 100644 --- a/docs/_includes/crypto_ecosystem/exchange-accounts.md +++ b/docs/_includes/crypto_ecosystem/exchange-accounts.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/exchange-assets.md b/docs/_includes/crypto_ecosystem/exchange-assets.md index bddeb5933..8201b354e 100644 --- a/docs/_includes/crypto_ecosystem/exchange-assets.md +++ b/docs/_includes/crypto_ecosystem/exchange-assets.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/exchange-markets.md b/docs/_includes/crypto_ecosystem/exchange-markets.md index 5c6993198..d7d5655b6 100644 --- a/docs/_includes/crypto_ecosystem/exchange-markets.md +++ b/docs/_includes/crypto_ecosystem/exchange-markets.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/market-base-asset.md b/docs/_includes/crypto_ecosystem/market-base-asset.md index cfe6db2e5..6636283f9 100644 --- a/docs/_includes/crypto_ecosystem/market-base-asset.md +++ b/docs/_includes/crypto_ecosystem/market-base-asset.md @@ -61,7 +61,7 @@ A market base asset must reference an asset defined under the exchange assets no {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/market-quoted-asset.md b/docs/_includes/crypto_ecosystem/market-quoted-asset.md index 3e98b6160..69b7d64d8 100644 --- a/docs/_includes/crypto_ecosystem/market-quoted-asset.md +++ b/docs/_includes/crypto_ecosystem/market-quoted-asset.md @@ -61,7 +61,7 @@ A market quoted asset must reference an asset defined under the exchange assets {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/market.md b/docs/_includes/crypto_ecosystem/market.md index 047b51839..34e568cc9 100644 --- a/docs/_includes/crypto_ecosystem/market.md +++ b/docs/_includes/crypto_ecosystem/market.md @@ -61,7 +61,7 @@ {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/user-account.md b/docs/_includes/crypto_ecosystem/user-account.md index 9814c4d58..be691cad9 100644 --- a/docs/_includes/crypto_ecosystem/user-account.md +++ b/docs/_includes/crypto_ecosystem/user-account.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/user-assets.md b/docs/_includes/crypto_ecosystem/user-assets.md index 33aaeb5e0..72121356e 100644 --- a/docs/_includes/crypto_ecosystem/user-assets.md +++ b/docs/_includes/crypto_ecosystem/user-assets.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/crypto_ecosystem/user-keys.md b/docs/_includes/crypto_ecosystem/user-keys.md index 57292b1de..6c4e347af 100644 --- a/docs/_includes/crypto_ecosystem/user-keys.md +++ b/docs/_includes/crypto_ecosystem/user-keys.md @@ -2,7 +2,7 @@ {% assign title = "User Keys" %} {% assign definition = site.data.crypto_ecosystem.user_keys %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "s" %} @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/data_mine/--------------------------------------------template.md b/docs/_includes/data_mine/--------------------------------------------template.md new file mode 100644 index 000000000..1763d5472 --- /dev/null +++ b/docs/_includes/data_mine/--------------------------------------------template.md @@ -0,0 +1,100 @@ + + +{% assign title = "XXXXXXXXXXXXXXXX" %} +{% assign definition = site.data.data_mine.XXXXXXXXXXXXXXXX %} +{% assign preposition = "XXXXXXXXXXXXXXXX" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/calculations-procedure.md b/docs/_includes/data_mine/calculations-procedure.md new file mode 100644 index 000000000..0ae5ba882 --- /dev/null +++ b/docs/_includes/data_mine/calculations-procedure.md @@ -0,0 +1,106 @@ + + +{% assign title = "Calculations Procedure" %} +{% assign definition = site.data.data_mine.calculation_procedure %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +Bots store data in the minimized array format as a strategy to build the lightest possible datasets. For the same reason, a bot may choose not to store easily calculable information. + +For example, imagine an indicator that stores buy and sell volumes... does it *need* to store the total volume? Given that it is so easy to calculate, the answer is *probably* no. IT is up to the developer to decide, but it is certainly not required. + +{% include note.html content="It may not be worthy to store information that can be easily calculated at a later stage." %} + +The calculations procedure calculates the properties that the developer chose not to store in the dataset. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a calculations procedure, select *Add Missing Items* on the product definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/chart-points.md b/docs/_includes/data_mine/chart-points.md new file mode 100644 index 000000000..957ef50ec --- /dev/null +++ b/docs/_includes/data_mine/chart-points.md @@ -0,0 +1,100 @@ + + +{% assign title = "Chart Points" %} +{% assign definition = site.data.data_mine.chart_points %} +{% assign preposition = "a" %} +{% assign plural = "" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +The definition of a point consists of the name of the point and the corresponding values for the ```x``` and ```y``` coordinates. To create such definitions, point and point formulas are used. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a chart points node, select *Add Chart Points* on the shapes menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/data-building-procedure.md b/docs/_includes/data_mine/data-building-procedure.md new file mode 100644 index 000000000..e5b106c22 --- /dev/null +++ b/docs/_includes/data_mine/data-building-procedure.md @@ -0,0 +1,100 @@ + + +{% assign title = "Data Building Procedure" %} +{% assign definition = site.data.data_mine.data_building_procedure %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +This procedure holds the core logic of the bot, as it features the code that performs the calculations required to produce the new data set. The code is split between a procedure initialization and a procedure loop. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a data buildings procedure, select *Add Missing Items* on the product definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/data-dependency.md b/docs/_includes/data_mine/data-dependency.md new file mode 100644 index 000000000..6112835f9 --- /dev/null +++ b/docs/_includes/data_mine/data-dependency.md @@ -0,0 +1,106 @@ + + +{% assign title = "Data Dependency" %} +{% assign definition = site.data.data_mine.data_dependency %} +{% assign preposition = "a" %} +{% assign plural = "" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about data dependencies + +{% endif %} + +{% if include.content != "no" %} + + + +Most bots consume data other bots have produced. Because bots need the data as input for their calculations, processes establish a data dependency with the dataset definitions of other bots. The reference provides the process with all the information needed to decode the dataset, enabling it to perform the required calculations. + +[![Indicators-Process-Dependencies-02](https://user-images.githubusercontent.com/13994516/68993034-7840df00-0873-11ea-804d-d24e88ce25f7.gif)](https://user-images.githubusercontent.com/13994516/68993034-7840df00-0873-11ea-804d-d24e88ce25f7.gif) + +The image above shows data dependencies in one bot referencing dataset definitions of another bot. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about data dependencies + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a data dependency, select *Add Data Dependency* on the process dependencies node menu. + +{% include tip.html content="Remember that a data dependency must establish a reference to the appropriate dataset definition." %} + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/data-formula.md b/docs/_includes/data_mine/data-formula.md new file mode 100644 index 000000000..2ee4a14d7 --- /dev/null +++ b/docs/_includes/data_mine/data-formula.md @@ -0,0 +1,100 @@ + + +{% assign title = "Data Formula" %} +{% assign definition = site.data.data_mine.data_formula %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a data formula, select *Add Data Formula* on the plotter panel menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/data-mine.md b/docs/_includes/data_mine/data-mine.md new file mode 100644 index 000000000..71e639fb4 --- /dev/null +++ b/docs/_includes/data_mine/data-mine.md @@ -0,0 +1,110 @@ + + +{% assign title = "Data Mine" %} +{% assign definition = site.data.data_mine.data_mine %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +In a way, data mines are catalogs of bots that anyone may create. This hierarchy provides all the tools required to create sensors, indicators, and plotters, with minimal coding required. + +Because the hierarchy provides definitions, it does not intervene in the execution of bots. Instead, the definitions in data mines are instantiated from the Network hierarchy by bot instances. Bot instances and process instances are the ones running the code according to the definitions in the corresponding data mine. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a data mine, select *Add Data Mine* on the workspace node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Data Mine* on the menu to access the configuration. + +```json +{ +"codeName": "Supermine" +} +``` + +* ```codeName``` is the name of the data mine as used within the code of the system. + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/dataset-definition.md b/docs/_includes/data_mine/dataset-definition.md new file mode 100644 index 000000000..84d12bb94 --- /dev/null +++ b/docs/_includes/data_mine/dataset-definition.md @@ -0,0 +1,139 @@ + + +{% assign title = "Dataset Definition" %} +{% assign definition = site.data.data_mine.dataset_definition %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +A good part of what makes datasets easy to consume by other bots is the fact that they are standardized in terms of their structure. It is that structure that is specified in the dataset definitions. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a dataset definition, select *Add Dataset Definition* on the bot's node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Definition* on the menu to access the configuration. + +**Multi-Period-Market:** + +```json +{ + "codeName": "Multi-Period-Market", + "type": "Market Files", + "validPeriods": [ "24-hs", "12-hs", "08-hs", "06-hs", "04-hs", "03-hs", "02-hs", "01-hs" ], + "filePath": "Data-Mine-Name/Bot-Name/@Exchange/Output/Product-Name/Multi-Period-Market/@Period", + "fileName": "@BaseAsset_@QuotedAsset.json" +} +``` + +**Multi-Period-Daily:** + +```json +{ + "codeName": "Multi-Period-Daily", + "type": "Daily Files", + "validPeriods": [ "45-min", "40-min", "30-min", "20-min", "15-min", "10-min", "05-min", "04-min", "03-min", "02-min", "01-min" ], + "filePath": "Data-Mine-Name/Bot-Name/@Exchange/Output/Product-Name/Multi-Period-Daily/@Period/@Year/@Month/@Day", + "fileName": "@BaseAsset_@QuotedAsset.json", + "dataRange": { + "filePath": "Data-Mine-Name/Bot-Name/@Exchange/Output/Product-Name/Multi-Period-Daily", + "fileName": "Data.Range.@BaseAsset_@QuotedAsset.json" + } +} +``` + + +* ```codeName``` is the name of the dataset as used within the code. + +* ```type``` refers to the type of dataset; possible values are ```Market Files``` and ```Daily Files```. + +* ```validPeriods``` refers to the time frames handled by the dataset. + +* ```filePath``` sets the path on which files are stored; the proper name of the data mine, the bot and the product need to be entered. + +* ```fileName``` sets the name of the files that constitute the dataset. + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/execution-finished-event.md b/docs/_includes/data_mine/execution-finished-event.md new file mode 100644 index 000000000..f21628cb3 --- /dev/null +++ b/docs/_includes/data_mine/execution-finished-event.md @@ -0,0 +1,104 @@ + + +{% assign title = "Execution Finished Event" %} +{% assign definition = site.data.data_mine.execution_finished_event %} +{% assign preposition = "an" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +The execution finished event is responsible for triggering the execution of every process that depends on the data a bot produces. If bot Alice depends on bot Bob, Alice listens to the execution finished event of Bob so that it may start a new execution cycle as soon as Bob finishes its cycle. Alice listens to Bob's execution finished event by establishing a reference from its execution started event. + +[![Indicators-Process-Execution-Started-Finished-Events-01](https://user-images.githubusercontent.com/13994516/68993254-39605880-0876-11ea-9ee7-9f49976bd2dc.gif)](https://user-images.githubusercontent.com/13994516/68993254-39605880-0876-11ea-9ee7-9f49976bd2dc.gif) + +The image above shows a reference established from the execution started event of a process to the execution finished event of another process. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add an execution finished event, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/execution-started-event.md b/docs/_includes/data_mine/execution-started-event.md new file mode 100644 index 000000000..ad5832b64 --- /dev/null +++ b/docs/_includes/data_mine/execution-started-event.md @@ -0,0 +1,104 @@ + + +{% assign title = "Execution Started Event" %} +{% assign definition = site.data.data_mine.execution_started_event %} +{% assign preposition = "an" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +These references determine when a process is due for another run. By listening to the execution finished event of the process it depends on, it may wake up just in time to process the new batch of data the dependency has just delivered. + +Bots form a sort of multi-branched execution sequence with an indeterminate number of dependencies. Every time the bot further down the tree of dependencies finishes a cycle, it triggers the execution of multiple bots listening to its execution finished event. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add an execution started event, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. + +{% include tip.html content="Remember that an execution started event must establish a reference to the appropriate execution finished event." %} + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/formula.md b/docs/_includes/data_mine/formula.md new file mode 100644 index 000000000..38c519204 --- /dev/null +++ b/docs/_includes/data_mine/formula.md @@ -0,0 +1,104 @@ + + +{% assign title = "Formula" %} +{% assign definition = site.data.data_mine.formula %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +A formula may act in slightly different ways depending on the ```isCaculated``` attribute in the record property configuration: + +* When a property is calculated (```"isCalculated": true```), the formula assigns to the property a value that is calculated in the calculations procedure. Even if the property is not stored in the dataset, it is made available as a *calculated property* to other bots that may have the dataset as input. + +* When a property is not calculated (```"isCalculated": false``` or the attribute is not defined in the configuration) the formula is applied in the data building procedure. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a formula, select *Add Formula* on the record property menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/indicator-bot.md b/docs/_includes/data_mine/indicator-bot.md new file mode 100644 index 000000000..42dd1cd07 --- /dev/null +++ b/docs/_includes/data_mine/indicator-bot.md @@ -0,0 +1,109 @@ + + +{% assign title = "Indicator Bot" %} +{% assign definition = site.data.data_mine.indicator_bot %} +{% assign preposition = "an" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +The indicator bot node holds all definitions required for an indicator bot to function. Definitions are split between the definition of processes and products. Processes are algorithms that go through an input dataset, perform certain calculations, and produce an output. Part of that output is the data products the bot creates. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add an indicator bot, select *Add Indicator Bot* on the data mine node menu. An indicator bot is created along with the basic structure of nodes required to define it. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Bot* on the menu to access the configuration. + +```json +{ +"codeName": "Super", +"repo": "Super-Indicator-Bot" +} +``` + +* ```codeName``` is the name of the bot as used within the code of the system. + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/javascript-code.md b/docs/_includes/data_mine/javascript-code.md new file mode 100644 index 000000000..de3b5a1f4 --- /dev/null +++ b/docs/_includes/data_mine/javascript-code.md @@ -0,0 +1,102 @@ + + +{% assign title = "JavaScript Code" %} +{% assign definition = site.data.data_mine.javascript_code %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +The platform allows developers great flexibility as all valid JavaScript code is allowed. + +{% include important.html content="Until a robust JavaScript editor is implemented on the UI, it is recommended to write code on an external editor and paste it in the UI code bubble to ensure consistency." %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a JavaScript code node, select *Add Code* on the corresponding parent node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/output-dataset.md b/docs/_includes/data_mine/output-dataset.md new file mode 100644 index 000000000..0b0fbd49e --- /dev/null +++ b/docs/_includes/data_mine/output-dataset.md @@ -0,0 +1,110 @@ + + +{% assign title = "Output Dataset" %} +{% assign definition = site.data.data_mine.output_dataset %} +{% assign preposition = "an" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +There are other effects of establishing a reference from the output dataset to a product dataset definition. Upon execution, every time a process finishes a processing cycle, it triggers an event that may be consumed by other entities. This event indicates that the datasets impacted by the process have been updated. + +An example of other entities that may be listening to such events is that of plotters. Plotters read datasets and create graphical representations of this data over the charts. Charts are constantly updating the information in the form of candles and indicators in realtime, synchronized with the data being extracted from the exchange by the sensor bot. That kind of automatism is possible thanks to the events that processes trigger every time an execution cycle is finished, signaling to everyone listening that new data is available on each of the impacted datasets. + +[![Indicators-Process-Output-01](https://user-images.githubusercontent.com/13994516/68976798-f01cf400-07f6-11ea-9ffb-198b5853a220.gif)](https://user-images.githubusercontent.com/13994516/68976798-f01cf400-07f6-11ea-9ffb-198b5853a220.gif) + +The image above shows the typical references from output datasets to datasets definitions. + +{% include note.html content="An output dataset must reference a dataset definition." %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add an output dataset, select *Add Output Dataset* on the process output node menu. + +{% include tip.html content="Remember that an output dataset must reference a valid dataset definition after creating the output dataset." %} + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/panel-data.md b/docs/_includes/data_mine/panel-data.md new file mode 100644 index 000000000..111dd794c --- /dev/null +++ b/docs/_includes/data_mine/panel-data.md @@ -0,0 +1,121 @@ + + +{% assign title = "Panel Data" %} +{% assign definition = site.data.data_mine.panel_data %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +The system renders a panel featuring a centered, single-column vertical arrangement of data, with a label and a data field right below it. The label of each data field on the panel is given—by default—by the label set for each panel data node. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a panel data node, select *Add Panel Data* on the plotter panel menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Panel Data* on the menu to access the configuration. + +```json +{ + "valueDecimals": 2 +} +``` + +* ```valueDecimals``` sets the number of decimals to be shown on the corresponding data field. + +To override the default manner in which the data is assembled on the panel, the following properties may be included and defined: + +```json +{ + "labelText": "The Label", + "labelPosition": 15, + "valuePosition": 20, + "valueDecimals": 2 +} +``` + +* ```labelPosition``` and ```valuePosition``` represent the vertical distance of the corresponding fields to the top margin of the panel. + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/plotter-module.md b/docs/_includes/data_mine/plotter-module.md new file mode 100644 index 000000000..a61ead2c0 --- /dev/null +++ b/docs/_includes/data_mine/plotter-module.md @@ -0,0 +1,138 @@ + + +{% assign title = "Plotter Module" %} +{% assign definition = site.data.data_mine.plotter_module %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +A single plotter may have several modules. Different modules may be used to plot each product of the bot, or as best suits the expected use-pattern. + +[![Plotter-Module-01](https://user-images.githubusercontent.com/13994516/71016077-eab41180-20f4-11ea-87e7-7262ff10a1ab.gif)](https://user-images.githubusercontent.com/13994516/71016077-eab41180-20f4-11ea-87e7-7262ff10a1ab.gif) + +{% include important.html content="For a bot to use a plotter, the corresponding product definition must establish a reference with the plotter module built to interpret the dataset." %} + +[![Plotter-Module-02-Product-Link](https://user-images.githubusercontent.com/13994516/71016079-eab41180-20f4-11ea-8afb-96321f9c68d8.gif)](https://user-images.githubusercontent.com/13994516/71016079-eab41180-20f4-11ea-8afb-96321f9c68d8.gif) + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a plotter module, select *Add Plotter Module* on the plotter node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Plotter Module* on the menu to access the configuration. + +```json +{ + "codeName": "Module Name", + "isLegacy": true, + "icon": "histogram" +} +``` + +* ```codeName``` is the name used in the code to refer to the module. + +* ```isLegacy``` is ```true``` for plotters modules developed entirely in JavaScript, and is ```false``` or doesn't show in the configuration for plotters built with the tools featured in the data mine hierarchy. + +* ```icon``` is the name of the image that illustrates the corresponding layer in the Layers Panel. In case the banner is not specified, the *default banner* is used. Current possible values are: + + +| Value | Image| +| :---: | :---: | +| ```Default``` | ![Default-Banner](https://user-images.githubusercontent.com/13994516/70896073-5bbdd100-1ff0-11ea-84e3-5bd90475976f.png) | +| ```Histogram``` | ![Histogram-Banner](https://user-images.githubusercontent.com/13994516/70896074-5bbdd100-1ff0-11ea-8dad-ccc6cfe64beb.png) | +| ```Band``` | ![Bands-Banner](https://user-images.githubusercontent.com/13994516/70896072-5bbdd100-1ff0-11ea-8626-61c36bd22a3c.png) | +| ```Moving Average``` | ![Moving-Average-Banner](https://user-images.githubusercontent.com/13994516/70896075-5bbdd100-1ff0-11ea-9909-dae33e57f65f.png) | +| ```Oscillator``` | ![Oscillator-Banner](https://user-images.githubusercontent.com/13994516/70896076-5c566780-1ff0-11ea-8a5b-20077257c560.png) | +| ```Trend``` | ![trends-banner](https://user-images.githubusercontent.com/13994516/70989177-744aeb80-20c3-11ea-88f5-d10473fa79b9.png) | + +Custom images may be added too. To do that: + +1. name the image in the following format: ```The-Image-Name-Icon.png```; + +1. place images in the ```WebServer\Images\``` folder; + +1. in the configuration of the module, use the name without the *-Icon* ending (e.g.: ```"icon": "The-Image-Name"```) + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/plotter-panel.md b/docs/_includes/data_mine/plotter-panel.md new file mode 100644 index 000000000..f4f8c054e --- /dev/null +++ b/docs/_includes/data_mine/plotter-panel.md @@ -0,0 +1,100 @@ + + +{% assign title = "Plotter Panel" %} +{% assign definition = site.data.data_mine.plotter_panel %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +Beyond the graphic representation of data over the charts, plotters may also feature a *data panel*, that is, a numerical representation of the data showing the exact figures corresponding to the column or period that is in focus (the point of the charts where the mouse pointer is at any point). + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a plotter panel, select *Add Plotter Panel* on the plotter module node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/plotter.md b/docs/_includes/data_mine/plotter.md new file mode 100644 index 000000000..1df991753 --- /dev/null +++ b/docs/_includes/data_mine/plotter.md @@ -0,0 +1,110 @@ + + +{% assign title = "Plotter" %} +{% assign definition = site.data.data_mine.plotter %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +Plotters usually have a one-to-one relationship with bots, as they are often created as a customized solution. However, in practice, there is no constraint to creating any number of plotters for a single bot or a single plotter for multiple bots. + +The overall workflow of a plotter, while reading a dataset, consists in: + +* Applying a set of rules to identify certain data points; + +* Use those points to form lines and polygons; + +* Apply graphical styles to those lines and polygons. + +Those actions are performed recursively for each record, and the graphics are plotted on the charts in real-time as data is processed. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/point-formula.md b/docs/_includes/data_mine/point-formula.md new file mode 100644 index 000000000..c32a35034 --- /dev/null +++ b/docs/_includes/data_mine/point-formula.md @@ -0,0 +1,168 @@ + + +{% assign title = "Point Formula" %} +{% assign definition = site.data.data_mine.point_formula %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +To represent some form of variation of the price or a price derivative over time, a typical point formula consists of the following two coordinates: ```x = datetime``` and ```y = rate```. + +For example: + +**Point *SMA 20 Begin*** +```js +x = record.begin +y = record.previous.sma20 +``` + +The example above shows the definition of the first of two points necessary to draw the segment of the 20-periods SMA curve for any particular period or candle. In this case, ```x = record.begin``` is the starting datetime of the period and ```y = record.previous.sma20``` is the rate of the 20-periods SMA of the previous period. + +{% include note.html content="The above variables are constructed with information originating at the product definition that references the corresponding plotter module." %} + +To complete the line segment corresponding to a single period, the closing datetime of the period and the closing rate for the 20-periods SMA are required: + +**Point *SMA 20 End*** +```js +x = record.end +y = record.sma20 +``` + +The above system works very well for plotting all sorts of information over the candles, on the charts. + +An oscillator like RSI too needs the definition of the starting and ending datetime of the period as the value for the *x-axis*. However, the value for *axis y* fits a different scale. + +Anyway, the points definition is just as straight forward, for example: + +**Point *RSI Begin*** +```js +x = record.begin +y = record.previous.value +``` + +**Point *RSI End*** +```js +x = record.end +y = record.value +``` + +Points do not necessarily need to refer to values on the dataset produced by the corresponding data product. For example, absolute values for the *y-axis* may be used to describe fixed graphical elements, for instance, a horizontal line, or a box. + +**Point *Begin 20*** +```js +x = record.begin +y = 20 +``` + +**Point *End 20*** +```js +x = record.end +y = 20 +``` + +**Point *Begin 30*** +```js +x = record.begin +y = 30 +``` + +**Point *End 30*** +```js +x = record.end +y = 30 +``` + +The above four points are used to paint the background of the 20 to 30 value range of the RSI chart. The first two points are also used to draw the dotted line signaling the 20-value mark, and the last two are used for the dotted line indicating the 30-value mark. + +{% include note.html content="The reason from separating the definition of points from the definition of polygons is that any point may be used by one or more polygons." %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a point formula, select *Add Point Formula* on the point node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/point.md b/docs/_includes/data_mine/point.md new file mode 100644 index 000000000..724000085 --- /dev/null +++ b/docs/_includes/data_mine/point.md @@ -0,0 +1,102 @@ + + +{% assign title = "Point" %} +{% assign definition = site.data.data_mine.point %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +These coordinate points are used to define polygons. Values for ```[x,y]```coordinates are entered with a point formula. + +{% include tip.html content="Each point should be given a significant name so that it is easier to identify them at the time of establishing references with polygon vertices." %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a point, select *Add Point* on the chart points node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/polygon-body.md b/docs/_includes/data_mine/polygon-body.md new file mode 100644 index 000000000..30ded72ee --- /dev/null +++ b/docs/_includes/data_mine/polygon-body.md @@ -0,0 +1,100 @@ + + +{% assign title = "Polygon Body" %} +{% assign definition = site.data.data_mine.polygon_body %} +{% assign preposition = "a" %} +{% assign plural = "" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about polygon bodies + +{% endif %} + +{% if include.content != "no" %} + + + +A polygon body needs at least three vertices to be defined. A body serves to create a *fill* for the outlines of any sort of polygon, either closed or open, by giving it a style. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about polygon bodies + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a polygon body, select *Add Polygon Body* on the polygon node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/polygon-border.md b/docs/_includes/data_mine/polygon-border.md new file mode 100644 index 000000000..eccb28b8d --- /dev/null +++ b/docs/_includes/data_mine/polygon-border.md @@ -0,0 +1,100 @@ + + +{% assign title = "Polygon Border" %} +{% assign definition = site.data.data_mine.polygon_border %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +A polygon border needs at least two vertices to be defined. A border serves to create a *stroke* for the outlines of any sort of polygon, either closed or open, by giving it a style. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a polygon border, select *Add Polygon Border* on the polygon node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/polygon-vertex.md b/docs/_includes/data_mine/polygon-vertex.md new file mode 100644 index 000000000..0346bd64d --- /dev/null +++ b/docs/_includes/data_mine/polygon-vertex.md @@ -0,0 +1,108 @@ + + +{% assign title = "Polygon Vertex" %} +{% assign definition = site.data.data_mine.polygon_vertex %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +Vertices are the main element defining polygons. Once created, each vertex must establish a reference to the corresponding point in the charts point. + +[![Vertex-01-add-and-link](https://user-images.githubusercontent.com/13994516/71016081-eb4ca800-20f4-11ea-8fee-4d38ecfb0596.gif)](https://user-images.githubusercontent.com/13994516/71016081-eb4ca800-20f4-11ea-8fee-4d38ecfb0596.gif) + +Drawing curves requires two vertices. Painting areas, such as the background of a chart, likely requires four vertices. Note that vertices are not capable of featuring a style. Instead, styles are applied to polygon borders and polygon bodies. + +{% include important.html content="Bear in mind that the order in which vertices in a polygon are arranged around the parent polygon node when their *rotational symmetry* property is selected, is the order in which the plotter computes the points. This means that points need to be in the correct order, for example, when drawing a box. Imagine drawing a box on a piece of paper without lifting the pencil... that is how the plotter does it." %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a polygon vertex, select *Add Polygon Vertex* on the polygon node menu. + +{% include tip.html content="Remember that a vertex must establish a reference to a point in the charts point to be properly defined" %} + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/polygon.md b/docs/_includes/data_mine/polygon.md new file mode 100644 index 000000000..f14872236 --- /dev/null +++ b/docs/_includes/data_mine/polygon.md @@ -0,0 +1,102 @@ + + +{% assign title = "Polygon" %} +{% assign definition = site.data.data_mine.polygon %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +Polygons are defined by two or more vertices, which map points in a charts point. The graphic representation of polygons originates in styles applied to either or both polygon bodies and polygon borders. + +{% include note.html content="The order in which polygons are ordered around the parent shapes node determines the order in which they are drawn on the screen. In cases on which polygons intersect, those drawn last are drawn on top of those drawn first." %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a polygon, select *Add Polygon* on the shapes node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/procedure-initialization.md b/docs/_includes/data_mine/procedure-initialization.md new file mode 100644 index 000000000..d4ccd6312 --- /dev/null +++ b/docs/_includes/data_mine/procedure-initialization.md @@ -0,0 +1,105 @@ + + +{% assign title = "Procedure Initialization" %} +{% assign definition = site.data.data_mine.procedure_initialization %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +This is an example of a procedure loop code snippet, in particular, the code that initializes the array used in the calculation of the Popular SMAs product of the Simple Moving Average (SMA) indicator. + +```js +/* Initialization Code. */ +variable.last200 = [] +``` + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a procedure initialization, select *Add Procedure Initialization* on the corresponding procedure node menu. A procedure initialization node is created along with the corresponding JavaScript node. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/procedure-loop.md b/docs/_includes/data_mine/procedure-loop.md new file mode 100644 index 000000000..79f7fcc03 --- /dev/null +++ b/docs/_includes/data_mine/procedure-loop.md @@ -0,0 +1,130 @@ + + +{% assign title = "Procedure Loop" %} +{% assign definition = site.data.data_mine.procedure_loop %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +This is an example of a procedure loop code snippet, in particular, the code that calculates the Popular SMAs product of the Simple Moving Average (SMA) indicator. + +{% include important.html content="Calculation procedures may only access data up to 48 hours in the past counting from the datetime of the record being processed. For that reason, the calculation of a moving average requires temporarily storing data in an array." %} + +```js +/* Loop Code. */ + +let candle = record.current // Our main dependencies are candles +variable.last200.push(candle.close) // Add the current close value to the last 200 array. + +if (variable.last200.length > 200) { + variable.last200.splice(0, 1) // Remove the first element of the array to keep it at a maximun of 200 elements. +} + +variable.sma20 = calculateSMA(20) +variable.sma50 = calculateSMA(50) +variable.sma100 = calculateSMA(100) +variable.sma200 = calculateSMA(200) + +function calculateSMA(periods) { // Having a function saves us from duplicating code. + /* We check we have enough values to make the calculation */ + if (variable.last200.length < periods) { return 0 } // If we dont, we define the value is zero. + + let sum = 0 // Initialize sum variable. + for (let i = variable.last200.length - periods; i < variable.last200.length; i++) { // Iterate through the last periods + sum = sum + variable.last200[i] + } + let sma = sum / periods + return sma +} +``` + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a procedure loop, select *Add Procedure loop* on the corresponding procedure node menu. A procedure loop node is created along with the corresponding JavaScript node. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/process-definition.md b/docs/_includes/data_mine/process-definition.md new file mode 100644 index 000000000..d1905fcb4 --- /dev/null +++ b/docs/_includes/data_mine/process-definition.md @@ -0,0 +1,188 @@ + + +{% assign title = "Process Definition" %} +{% assign definition = site.data.data_mine.process_definition %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +As hinted above, most bots, in particular indicators, have two different processes. The reason is that different data structures need to be handled in different manners. The Multi-Period-Daily process handles daily files, while the Multi-Period-Market process handles market files. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a process definition, select *Add Process Definition* on the bot's menu. A process definition node is created along with the basic structure of nodes comprising the definition. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Process* on the menu to access the configuration. + +**Multi-Period-Market:** + +```json +{ + "codeName": "Multi-Period-Market", + "description": "Brief description of what the bot does.", + "startMode": { + "allMonths": { + "run": "false", + "minYear": "", + "maxYear": "" + }, + "oneMonth": { + "run": "false", + "year": "", + "month": "" + }, + "noTime": { + "run": "true" + }, + "fixedInterval": { + "run": "false", + "interval": 0 + } + }, + "deadWaitTime": 0, + "normalWaitTime": 0, + "retryWaitTime": 10000, + "sleepWaitTime": 3600000, + "comaWaitTime": 86400000, + "framework": { + "name": "Multi-Period-Market", + "startDate": { + }, + "endDate": { + } + } +} +``` + +**Multi-Period-Daily:** + +```json +{ + "codeName": "Multi-Period-Daily", + "description": "Brief description of what the bot does.", + "startMode": { + "allMonths": { + "run": "false", + "minYear": "", + "maxYear": "" + }, + "oneMonth": { + "run": "false", + "year": "", + "month": "" + }, + "noTime": { + "run": "true" + }, + "fixedInterval": { + "run": "false", + "interval": 0 + } + }, + "deadWaitTime": 0, + "normalWaitTime": 0, + "retryWaitTime": 10000, + "sleepWaitTime": 3600000, + "comaWaitTime": 86400000, + "framework": { + "name": "Multi-Period-Daily", + "startDate": { + "takeItFromStatusDependency": 0 + }, + "endDate": { + "takeItFromStatusDependency": 1 + } + } +} +``` + +Both configurations deal with certain aspects of the internal workings of these kinds of processes. These are the ones to be adjusted when creating a new bot: + +* ```codeName``` is the name of the process as used within the code of the system; for consistency, always use ```Multi-Period-Market``` and ```Multi-Period-Daily``` accordingly. + +* ```description``` is a short description of what the bot does. + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/process-dependencies.md b/docs/_includes/data_mine/process-dependencies.md new file mode 100644 index 000000000..1527afe44 --- /dev/null +++ b/docs/_includes/data_mine/process-dependencies.md @@ -0,0 +1,100 @@ + + +{% assign title = "Process Dependencies" %} +{% assign definition = site.data.data_mine.process_depedencies %} +{% assign preposition = "a" %} +{% assign plural = "" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +While processes run autonomously, most processes participate in a value-adding chain by which a process produces a data product that other processes may consume as an input to be processed further. This means that bots—while autonomous in their particular jobs—do depend both on other bots and on the data other bots produce. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a process dependencies node, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/process-output.md b/docs/_includes/data_mine/process-output.md new file mode 100644 index 000000000..6d7e58518 --- /dev/null +++ b/docs/_includes/data_mine/process-output.md @@ -0,0 +1,100 @@ + + +{% assign title = "Process Output" %} +{% assign definition = site.data.data_mine.process_output %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a process output node, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/product-definition.md b/docs/_includes/data_mine/product-definition.md new file mode 100644 index 000000000..17ec54229 --- /dev/null +++ b/docs/_includes/data_mine/product-definition.md @@ -0,0 +1,116 @@ + + +{% assign title = "Product Definition" %} +{% assign definition = site.data.data_mine.product_definition %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +A bot may feature multiple products, thus, there may be multiple product definitions. Three main aspects need to be defined in terms of products: the characteristics of the dataset, the composition of each record, and the way records are calculated. + +{% include note.html content="A product definition usually references a plotter module, which provides a graphic representation of the underlying dataset" %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a product definition, select *Add Product Definition* on the bot's node menu. A product definition is created along with the basic structure of nodes required to make up a product. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Product* on the menu to access the configuration. + +```json +{ + "codeName": "New-Product-Name", + "singularVariableName": "newProductName", + "pluralVariableName": "newProductNames" +} +``` + +* ```codeName``` is the name of the product as it is used within the bot's code. + +* ```singularVariableName``` is the singular form of the name of the variable representing the product, as is used on strategies (*i.e.:* ```bollingerChannel.direction```, where *bollingerChannel* is the name of the product as defined in its configuration and *direction* is the name of the property. + +* ```pluralVariableName``` is the plural form of the variable. + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/record-definition.md b/docs/_includes/data_mine/record-definition.md new file mode 100644 index 000000000..030fe72d3 --- /dev/null +++ b/docs/_includes/data_mine/record-definition.md @@ -0,0 +1,108 @@ + + +{% assign title = "Record Definition" %} +{% assign definition = site.data.data_mine.record_definition %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +Bots store data in the form of arrays of records, in a minimized plain text file and the standard JSON format, although not as objects with named properties, but as arrays. + +[![image](https://user-images.githubusercontent.com/13994516/68998023-303eae00-08ad-11ea-9baa-ddea801c7d6d.png)](https://user-images.githubusercontent.com/13994516/68998023-303eae00-08ad-11ea-9baa-ddea801c7d6d.png) + +The choice of plain text for storage of large volumes of information has benefits in terms of not requiring any sophisticated technology to store and serve the data (*i.e.:* no database is required). + +Best practice indicates that there needs to be a balance between the amount of data that is stored and calculations that may be performed at runtime. + +Storing objects with named properties in the JSON format would be inappropriate as labels would repeat over and over, creating a ridiculous amount of unnecessary information. However, storing arrays in the JSON standard facilitates the handling of files in the context of JavaScript and Node.JS. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a record definition node, select *Add Record Definition* on the product definition node menu. A record definition node is created along with the first record property. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/record-property.md b/docs/_includes/data_mine/record-property.md new file mode 100644 index 000000000..59ea56521 --- /dev/null +++ b/docs/_includes/data_mine/record-property.md @@ -0,0 +1,122 @@ + + +{% assign title = "Record Property" %} +{% assign definition = site.data.data_mine.record_property %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about record properties + +{% endif %} + +{% if include.content != "no" %} + + + +Records may have as many properties as required. + +{% include important.html content="The order in which record properties are defined around the parent record definition node is the order in which they are stored in the actual record." %} + +{% include tip.html content="The first two records are usually the *begin* and *end* records, featuring the corresponding datetimes that indicate when the record starts and ends." %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about record properties + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a record property, select *Add Record Property* on the bot's node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Property* on the menu to access the configuration. + +```js +{ + "codeName": "record-name", + "isString": false, + "isCalculated": true +} +``` + +* ```codeName``` is the name of the record as it is used in the bot's code. + +* ```isString``` determines if the field is a text string or if, in turn, is a numeric field. Dates are stored in the *epoch* format, which is numeric. The reason why this configuration is important is that fields that are strings need to be stored between "double quotes". + +* ```isCalculated``` determines if the field is stored in the dataset or if, instead, is calculated at a later stage. A value *true* means that the record is not stored. In the case ```isCaculated``` is not defined in the configuration, it is assumed to be false. + +[![Indicators-Record-Definitions-01](https://user-images.githubusercontent.com/13994516/69139160-3ce72000-0ac0-11ea-9566-a259c9ea6194.gif)](https://user-images.githubusercontent.com/13994516/69139160-3ce72000-0ac0-11ea-9566-a259c9ea6194.gif) + +The image above shows a record definition with four record properties. + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/shapes.md b/docs/_includes/data_mine/shapes.md new file mode 100644 index 000000000..be2ff8f79 --- /dev/null +++ b/docs/_includes/data_mine/shapes.md @@ -0,0 +1,109 @@ + + +{% assign title = "Shapes" %} +{% assign definition = site.data.data_mine.shapes %} +{% assign preposition = "a" %} +{% assign plural = "" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +A plotter recursively renders graphics for each period or candle. This means that a definition of what shapes need to be drawn for a single period is required. The plotter does the same thing for every period or candle that is visible on the screen at any point in time, for any time frame, as long as the corresponding data is available. + +[![Shapes-01-show-off](https://user-images.githubusercontent.com/13994516/71016080-eab41180-20f4-11ea-84c6-a514b87d568f.gif)](https://user-images.githubusercontent.com/13994516/71016080-eab41180-20f4-11ea-84c6-a514b87d568f.gif) + +In general terms, the process of defining what is going to be rendered on the screen consist of the following four steps: + + 1. Identifying points defined by ```[x,y]``` coordinates + 2. Defining polygons + 3. Defining default styles + 4. Defining conditional styles + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a shapes node, select *Add Shapes* on the plotter module menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/status-dependency.md b/docs/_includes/data_mine/status-dependency.md new file mode 100644 index 000000000..3b2f7639e --- /dev/null +++ b/docs/_includes/data_mine/status-dependency.md @@ -0,0 +1,122 @@ + + +{% assign title = "Status Dependency" %} +{% assign definition = site.data.data_mine.status_dependency %} +{% assign preposition = "a" %} +{% assign plural = "" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about status dependencies + +{% endif %} + +{% if include.content != "no" %} + + + +The reference is established to acquire the information relative to what the target process is doing. For example, by reading a status report a process may learn when was the last time the referenced process ran, and what was the last file processed. + +The status report referenced may belong to the same process— which is called a self-reference. In such a case, the process is learning what it did the last time it ran. Also, the status report referenced may belong to another process—another bot. In that case, the dependency may be of the Market Starting Point or Market Ending Point types. + +* **Self Reference** is mandatory, as a process needs to read it's own status report every time it wakes up. + +* **Market Starting Point** is a status dependency existing on Multi-Period-Daily processes so that the process establishing the reference learns the datetime of the start of the market. Usually, the reference is established with the sensor's Historic-Trades process status report. Multi-Period-Market processes do not have this type of status dependency as the date of the start of the market is implied in their dataset (a single file with all market data). + +* **Market Ending Point** is a status dependency existing both in Multi-Period-Market and Multi-Period-Daily processes so that the process establishing the reference knows the datetime of the end of the market. + +[![Indicators-Process-Dependencies-01](https://user-images.githubusercontent.com/13994516/68991956-dfa36280-0864-11ea-87ec-f0e4e3b7bf0f.gif)](https://user-images.githubusercontent.com/13994516/68991956-dfa36280-0864-11ea-87ec-f0e4e3b7bf0f.gif) + +The image above shows a case of a self-reference status dependency as well as a market ending point status dependency. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about status dependencies + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a status dependency, select *Add Status Dependency* on the process dependencies node menu. + +{% include tip.html content="Remember that a status dependency must be configured, and must establish a reference to the appropriate status report." %} + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Status Dependency* on the menu to access the configuration. + +```json +{ +"mainUtility": "Self Reference|Market Starting Point|Market Ending Point" +} +``` + +* ```mainUtility``` determines the type of status dependency, with possible values being ```Self Reference```, ```Market Starting Point```, or ```Market Ending Point```. + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/status-report.md b/docs/_includes/data_mine/status-report.md new file mode 100644 index 000000000..7935a8608 --- /dev/null +++ b/docs/_includes/data_mine/status-report.md @@ -0,0 +1,102 @@ + + +{% assign title = "Status Report" %} +{% assign definition = site.data.data_mine.status_report %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +Bots do not run continuously. Instead, they run in cycles. A cycle usually lasts until there is no more data to process, and once they finish, they shut down until the next cycle is due. A status report is a file every bot writes at the end of each cycle with information about the last run, including the datetime of the run and the last record processed. + +A status report may be consumed by the same bot producing it, or by other bots. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a status report, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/style-condition.md b/docs/_includes/data_mine/style-condition.md new file mode 100644 index 000000000..e9d38a671 --- /dev/null +++ b/docs/_includes/data_mine/style-condition.md @@ -0,0 +1,128 @@ + + +{% assign title = "Style Condition" %} +{% assign definition = site.data.data_mine.style_condition %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +Style conditions offer a way to introduce additional intelligence on the visual representation of data by using styles that respond to certain conditions. + +For example, the *Percentage Bandwidth* plotter module assigns a different color to the Moving Average line when it's going up or down. + +To do that, a style condition features it's own style so that, when the condition validates true, the new style is applied. + +Style conditions me be created in a sequence so that the style may continue changing upon the validation of a series of style conditions. The system evaluates all style conditions in a sequential order determined by their position in the rotational symmetry around the parent node. Each condition that is met may modify or add up to the resulting style that is rendered on screen. That is, the final style is the result of the sequential application of the styles defined for each condition that is met, on top of the default style. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a style condition, select *Add Style Condition* on a polygon border or polygon body node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Editing a {{title}} + + + +Select *Edit Condition* on the menu to access the configuration. + +Style conditions work pretty much like conditions used on trading systems. The main difference is that the variables available are solely those provided by the bot product definition that reference the corresponding plotter module. + +To continue the example of the Percentage Bandwidth plotter, the following is the condition that determines the newly added styles: + +```js +record.previous.movingAverage > record.movingAverage +``` + +As hinted earlier, when the condition is met, the default style is modified by a second style that may be created on the menu of the style condition node. + +The definition of secondary styles is slightly different from that of the default style, as—in such cases—the ```atMousePosition``` property may no longer be defined: + +```js +{ + "opacity": 0.55, + "lineWidth": 1, + "lineDash": [0,0], + "paletteColor": "UI_COLOR.RED" +} +``` + + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/style.md b/docs/_includes/data_mine/style.md new file mode 100644 index 000000000..288a383f0 --- /dev/null +++ b/docs/_includes/data_mine/style.md @@ -0,0 +1,166 @@ + + +{% assign title = "Style" %} +{% assign definition = site.data.data_mine.style %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +A style applied to a polygon body or a polygon border node acts as the default style. + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a style, select *Add Style* on a polygon border or polygon body node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +Select *Configure Style* on the menu to access the configuration. + +A typical definition for a polygon body style looks like this: + +```json +{ + "default": { + "opacity": 0.2, + "paletteColor": "UI_COLOR.DARK_TURQUOISE" + }, + "atMousePosition": { + "opacity": 0.3, + "paletteColor": "UI_COLOR.DARK_TURQUOISE" + } +} +``` + +A typical definition for a polygon border style has a couple more properties: + +```json +{ + "default": { + "opacity": 0.2, + "lineWidth": 1, + "lineDash": [0,0], + "paletteColor": "UI_COLOR.DARK_TURQUOISE" + }, + "atMousePosition": { + "opacity": 0.3, + "lineWidth": 2, + "lineDash": [0,0], + "paletteColor": "UI_COLOR.RUSTED_RED" + } +} +``` + +The first section of the definition refers, as explicitly stated, to the default state of the style. + +The second section refers to the style assigned to the column or period on which the mouse pointer is located. This is very useful for highlighting the specific zone of interest as the user browses the charts. + +* ```opacity``` is probably self-explanatory: it may range from ```0``` for a fully transparent object to ```1``` for a solid object. + +* ```paletteColor``` sets the color for the *fill* or *stroke* in cases of polygon bodies and polygon borders respectively. Use the variable ```UI_COLOR``` followed by a ```.``` and any of the properties in the following list for a selection of currently available colors: + +| Variable Value | RGB Value | Color Sample | +| :--- | :---: | :------------------- | +| ```DARK``` | 48, 48, 54 |   | +| ```LIGHT``` | 234, 226, 222 |   | +| ```GREY``` | 150, 150, 150 |   | +| ```LIGHT_GREY``` | 247, 247, 247 |   | +| ```WHITE``` | 255, 255, 255 |   | +| ```BLACK``` | 0, 0, 0 |   | +| ```GOLDEN_ORANGE``` | 240, 162, 2 |   | +| ```RUSTED_RED``` | 204, 88, 53 |   | +| ```GREEN``` | 188, 214, 67 |   | +| ```RED``` | 223, 70, 60 |   | +| ```PATINATED_TURQUOISE``` | 27, 153, 139 |   | +| ```TITANIUM_YELLOW``` | 244, 228, 9 |   | +| ```MANGANESE_PURPLE``` | 91,80, 122 |   | +| ```TURQUOISE``` | 74, 207, 217 |   | +| ```DARK_TURQUOISE``` | 2, 149, 170 |   | + +* ```lineWidth``` is the width of the border line, which should be greater than 0. + +* ```lineDash``` is used to turn the border into a dashed-line; the first value corresponds to the length of the dash while the second value defines the length of the space. + +{% include note.html content="When using dashed lines, bear in mind that the drawing from one column or period is independent of the next. Big values for dashes and spaces may not work well for lines that span several columns." %} + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/data_mine/template.md b/docs/_includes/data_mine/template.md new file mode 100644 index 000000000..1763d5472 --- /dev/null +++ b/docs/_includes/data_mine/template.md @@ -0,0 +1,100 @@ + + +{% assign title = "XXXXXXXXXXXXXXXX" %} +{% assign definition = site.data.data_mine.XXXXXXXXXXXXXXXX %} +{% assign preposition = "XXXXXXXXXXXXXXXX" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/network/--------------------------------------------template.md b/docs/_includes/network/--------------------------------------------template.md index ff333c139..8a8d35754 100644 --- a/docs/_includes/network/--------------------------------------------template.md +++ b/docs/_includes/network/--------------------------------------------template.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/backtesting-session.md b/docs/_includes/network/backtesting-session.md index 4b6b3abad..cd44875c2 100644 --- a/docs/_includes/network/backtesting-session.md +++ b/docs/_includes/network/backtesting-session.md @@ -61,7 +61,7 @@ A backtesting session node must reference a trading system to gain access to the {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/data-mining.md b/docs/_includes/network/data-mining.md index 4ce9206e4..30366b3a0 100644 --- a/docs/_includes/network/data-mining.md +++ b/docs/_includes/network/data-mining.md @@ -2,7 +2,7 @@ {% assign title = "Data Mining" %} {% assign definition = site.data.network.data_mining %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "" %} @@ -61,7 +61,7 @@ Users may have access to several data mines. For organizational purposes, it is {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/data-product.md b/docs/_includes/network/data-product.md index e32f4b5b5..fd3ac45f5 100644 --- a/docs/_includes/network/data-product.md +++ b/docs/_includes/network/data-product.md @@ -61,7 +61,7 @@ A data product node must reference a product definition in the corresponding dat {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/data-storage.md b/docs/_includes/network/data-storage.md index b0fa11300..5b2c9b465 100644 --- a/docs/_includes/network/data-storage.md +++ b/docs/_includes/network/data-storage.md @@ -63,7 +63,7 @@ Data products generated by the bot instances you run need to be stored somewhere {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/forward-testing-session.md b/docs/_includes/network/forward-testing-session.md index bcdb1f9ca..0eb603c17 100644 --- a/docs/_includes/network/forward-testing-session.md +++ b/docs/_includes/network/forward-testing-session.md @@ -61,7 +61,7 @@ A forward testing session node must reference a trading system to gain access to {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/indicator-bot-instance.md b/docs/_includes/network/indicator-bot-instance.md index e10e13492..b92cfef9f 100644 --- a/docs/_includes/network/indicator-bot-instance.md +++ b/docs/_includes/network/indicator-bot-instance.md @@ -63,7 +63,7 @@ The indicator bot instance holds no definitions as to what the bot does. Instead {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/indicator-process-instance.md b/docs/_includes/network/indicator-process-instance.md index 581b50480..84253460e 100644 --- a/docs/_includes/network/indicator-process-instance.md +++ b/docs/_includes/network/indicator-process-instance.md @@ -63,7 +63,7 @@ Once the reference is established, the indicator process instance adopts the nam {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/key-instance.md b/docs/_includes/network/key-instance.md index 4cd074adc..ead9debc2 100644 --- a/docs/_includes/network/key-instance.md +++ b/docs/_includes/network/key-instance.md @@ -67,7 +67,7 @@ In all cases, the key instance node must reference a valid exchange account key {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/live-trading-session.md b/docs/_includes/network/live-trading-session.md index cb4a39ab9..4f709a894 100644 --- a/docs/_includes/network/live-trading-session.md +++ b/docs/_includes/network/live-trading-session.md @@ -61,7 +61,7 @@ A live trading session node must reference a trading system to gain access to th {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/market-reference.md b/docs/_includes/network/market-reference.md index 6cc8d6b14..f3736e13f 100644 --- a/docs/_includes/network/market-reference.md +++ b/docs/_includes/network/market-reference.md @@ -61,7 +61,7 @@ In other words, a market reference is the piece of information that let's the pr {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/network-node.md b/docs/_includes/network/network-node.md index 561c04316..9573cb658 100644 --- a/docs/_includes/network/network-node.md +++ b/docs/_includes/network/network-node.md @@ -63,7 +63,7 @@ In a more distant future, you will also be able to connect to and consume servic {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/network.md b/docs/_includes/network/network.md index 693fc5e94..705f60e7f 100644 --- a/docs/_includes/network/network.md +++ b/docs/_includes/network/network.md @@ -48,13 +48,15 @@ -You will use the network hierarchy for three main purposes: +You will use the network hierarchy for the following purposes: -* To control processes running sensor and indicator bots. These keep your data feeds and analysis up to date so that you may trade live with quality information. +* To control your data mining, that is, processes running sensor and indicator bots. These keep your data feeds up to date so that you may trade live with quality information. -* To control trading sessions including backtesting, paper trading, forward testing, and live trading sessios. +* To control testing environment, that is trading sessions including backtesting and paper trading. -* To administer the physical location in which the data products produced by bots reside. +* To control your production environment, that is, forward testing, and live trading sessions. + +* To control your data storage, that is, to administer the physical location in which the data products produced by bots reside. @@ -67,7 +69,7 @@ You will use the network hierarchy for three main purposes: {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/paper-trading-session.md b/docs/_includes/network/paper-trading-session.md index cc183441c..8dbc1192e 100644 --- a/docs/_includes/network/paper-trading-session.md +++ b/docs/_includes/network/paper-trading-session.md @@ -61,7 +61,7 @@ A paper trading session node must reference a trading system to gain access to t {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/production-environment.md b/docs/_includes/network/production-environment.md index 2131b84ed..8f6f8bfb2 100644 --- a/docs/_includes/network/production-environment.md +++ b/docs/_includes/network/production-environment.md @@ -61,7 +61,7 @@ If you work with multiple markets, multiple exchanges of multiple trading system {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/sensor-bot-instance.md b/docs/_includes/network/sensor-bot-instance.md index b0df040a0..cea2fb364 100644 --- a/docs/_includes/network/sensor-bot-instance.md +++ b/docs/_includes/network/sensor-bot-instance.md @@ -63,7 +63,7 @@ The sensor bot instance holds no definitions as to what the bot does. Instead, i {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/sensor-process-instance.md b/docs/_includes/network/sensor-process-instance.md index 375135837..db0d6687d 100644 --- a/docs/_includes/network/sensor-process-instance.md +++ b/docs/_includes/network/sensor-process-instance.md @@ -61,7 +61,7 @@ For example, in the case of an instance of the Masters data mine Charly sensor b {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/session-based-data.md b/docs/_includes/network/session-based-data.md index 62581784d..171c2d462 100644 --- a/docs/_includes/network/session-based-data.md +++ b/docs/_includes/network/session-based-data.md @@ -2,7 +2,7 @@ {% assign title = "Session Based Data" %} {% assign definition = site.data.network.session_based_data %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "" %} @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/session-independent-data.md b/docs/_includes/network/session-independent-data.md index 48e42ce80..be233423f 100644 --- a/docs/_includes/network/session-independent-data.md +++ b/docs/_includes/network/session-independent-data.md @@ -2,7 +2,7 @@ {% assign title = "Session Independent Data" %} {% assign definition = site.data.network.session_independent_data %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "" %} @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/session-reference.md b/docs/_includes/network/session-reference.md index 174731252..bcf15a4ba 100644 --- a/docs/_includes/network/session-reference.md +++ b/docs/_includes/network/session-reference.md @@ -61,7 +61,7 @@ A such, the session reference node must establish a reference with a session. In {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/single-market-data.md b/docs/_includes/network/single-market-data.md index d713b903a..9eb3c4139 100644 --- a/docs/_includes/network/single-market-data.md +++ b/docs/_includes/network/single-market-data.md @@ -2,7 +2,7 @@ {% assign title = "Single Market Data" %} {% assign definition = site.data.network.single_market_data %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "" %} @@ -61,7 +61,7 @@ The single market data node must establish a reference with a specific market de {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/task-manager.md b/docs/_includes/network/task-manager.md index 25a764dbf..766f01b19 100644 --- a/docs/_includes/network/task-manager.md +++ b/docs/_includes/network/task-manager.md @@ -63,7 +63,7 @@ Also, a task manager allows starting and stopping all tasks under it at once, wi {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/task.md b/docs/_includes/network/task.md index e14f7ff4a..8588f5bb8 100644 --- a/docs/_includes/network/task.md +++ b/docs/_includes/network/task.md @@ -61,7 +61,7 @@ Each task may control a single bot. A bot instance running on its own task is in {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/testing-environment.md b/docs/_includes/network/testing-environment.md index 628da1456..de88e940d 100644 --- a/docs/_includes/network/testing-environment.md +++ b/docs/_includes/network/testing-environment.md @@ -61,7 +61,7 @@ Depending on how you use the system, how many markets and exchanges you work wit {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/trading-bot-instance.md b/docs/_includes/network/trading-bot-instance.md index 0a6e57890..e39c2dbc8 100644 --- a/docs/_includes/network/trading-bot-instance.md +++ b/docs/_includes/network/trading-bot-instance.md @@ -63,7 +63,7 @@ The trading bot instance holds no definitions as to what the bot does. Instead, {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/network/trading-process-instance.md b/docs/_includes/network/trading-process-instance.md index a8286841f..02a6e2b24 100644 --- a/docs/_includes/network/trading-process-instance.md +++ b/docs/_includes/network/trading-process-instance.md @@ -61,7 +61,7 @@ The trading process instance must reference the *Multi-Period* process definitio {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/--------------------------------------------template.md b/docs/_includes/trading_system/--------------------------------------------template.md index ff333c139..8a8d35754 100644 --- a/docs/_includes/trading_system/--------------------------------------------template.md +++ b/docs/_includes/trading_system/--------------------------------------------template.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/base-asset.md b/docs/_includes/trading_system/base-asset.md index 618029a1b..ebcee23ad 100644 --- a/docs/_includes/trading_system/base-asset.md +++ b/docs/_includes/trading_system/base-asset.md @@ -61,7 +61,7 @@ The basse asset must reference an asset in a specific market of a specific excha {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/close-execution.md b/docs/_includes/trading_system/close-execution.md index e662cd338..911e3a0c9 100644 --- a/docs/_includes/trading_system/close-execution.md +++ b/docs/_includes/trading_system/close-execution.md @@ -61,7 +61,7 @@ {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/close-stage.md b/docs/_includes/trading_system/close-stage.md index 9c3d40eb0..6cdeaffbe 100644 --- a/docs/_includes/trading_system/close-stage.md +++ b/docs/_includes/trading_system/close-stage.md @@ -63,7 +63,7 @@ Also pending development is the keeping of a formal trading log. The current fun {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/condition.md b/docs/_includes/trading_system/condition.md index f9534f178..9792a74e7 100644 --- a/docs/_includes/trading_system/condition.md +++ b/docs/_includes/trading_system/condition.md @@ -73,7 +73,7 @@ In the example above, conditions A and B are comparison statements that may eval {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/fee-structure.md b/docs/_includes/trading_system/fee-structure.md index 12da5ea22..f183f283d 100644 --- a/docs/_includes/trading_system/fee-structure.md +++ b/docs/_includes/trading_system/fee-structure.md @@ -71,7 +71,7 @@ In the context of forward testing and live trading sessions, the fee structure a {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/formula.md b/docs/_includes/trading_system/formula.md index 4b971e903..56681169f 100644 --- a/docs/_includes/trading_system/formula.md +++ b/docs/_includes/trading_system/formula.md @@ -69,7 +69,7 @@ Formulas may use [internal variables](suite-internal-variables.html) made availa {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/initial-definition.md b/docs/_includes/trading_system/initial-definition.md index 786dc79de..7118714aa 100644 --- a/docs/_includes/trading_system/initial-definition.md +++ b/docs/_includes/trading_system/initial-definition.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/initial-stop.md b/docs/_includes/trading_system/initial-stop.md index 81aadbfc5..8dbedbcab 100644 --- a/docs/_includes/trading_system/initial-stop.md +++ b/docs/_includes/trading_system/initial-stop.md @@ -67,7 +67,7 @@ The initial target is set in phase 0, that is, the departing point for the manag {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/initial-take-profit.md b/docs/_includes/trading_system/initial-take-profit.md index 1dd6c12f7..5671ae9ea 100644 --- a/docs/_includes/trading_system/initial-take-profit.md +++ b/docs/_includes/trading_system/initial-take-profit.md @@ -63,7 +63,7 @@ The initial target is set in phase 0, which may shift to the following phase onc {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/javascript-code.md b/docs/_includes/trading_system/javascript-code.md new file mode 100644 index 000000000..de3b5a1f4 --- /dev/null +++ b/docs/_includes/trading_system/javascript-code.md @@ -0,0 +1,102 @@ + + +{% assign title = "JavaScript Code" %} +{% assign definition = site.data.data_mine.javascript_code %} +{% assign preposition = "a" %} +{% assign plural = "s" %} + + + +{% if include.heading != "" %} +{{include.heading}} {{title}} +{% endif %} + +{% if include.icon != "no" %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + + + +{% if include.table == "yes" and include.icon != "no" %} + +{% endif %} + +{% endif %} + +{% if include.definition == "bold" %} + +{{ definition }} + +{% else %} + +{{ definition }} + +{% endif %} + +{% if include.table == "yes" and include.icon != "no" %} +
+{% endif %} + +{% if include.more == "yes" and include.content == "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.content != "no" %} + + + +The platform allows developers great flexibility as all valid JavaScript code is allowed. + +{% include important.html content="Until a robust JavaScript editor is implemented on the UI, it is recommended to write code on an external editor and paste it in the UI code bubble to ensure consistency." %} + + + +{% endif %} + +{% if include.more == "yes" and include.content != "more" %} +
Click to learn more about {{ title | downcase }}{{plural}} + +{% endif %} + +{% if include.adding != "" %} + +{{include.adding}} Adding {{preposition}} {{title}} Node + + + +To add a JavaScript code node, select *Add Code* on the corresponding parent node menu. + + + +{% endif %} + +{% if include.configuring != "" %} + +{{include.configuring}} Configuring the {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.starting != "" %} + +{{include.starting}} Starting {{preposition}} {{title}} + + + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + + +{% endif %} + +{% if include.more == "yes" %} +
+{% endif %} \ No newline at end of file diff --git a/docs/_includes/trading_system/manage-stage.md b/docs/_includes/trading_system/manage-stage.md index 34877bf4a..0dfb9a300 100644 --- a/docs/_includes/trading_system/manage-stage.md +++ b/docs/_includes/trading_system/manage-stage.md @@ -73,7 +73,7 @@ All of these considerations should feed the dynamic analysis performed as the tr {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/next-phase-event.md b/docs/_includes/trading_system/next-phase-event.md index 3a59ea5fd..d2a9c26bb 100644 --- a/docs/_includes/trading_system/next-phase-event.md +++ b/docs/_includes/trading_system/next-phase-event.md @@ -61,7 +61,7 @@ The management of a trade is performed in sequential phases. Each phase may defi {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/open-execution.md b/docs/_includes/trading_system/open-execution.md index 316f349e8..7bbffa5f9 100644 --- a/docs/_includes/trading_system/open-execution.md +++ b/docs/_includes/trading_system/open-execution.md @@ -61,7 +61,7 @@ {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/open-stage.md b/docs/_includes/trading_system/open-stage.md index 62cd21890..142b0077f 100644 --- a/docs/_includes/trading_system/open-stage.md +++ b/docs/_includes/trading_system/open-stage.md @@ -65,7 +65,7 @@ Ideally, the open stage would also handle the parameters that define the executi {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/parameters.md b/docs/_includes/trading_system/parameters.md index 61eb0e1ee..cf7116500 100644 --- a/docs/_includes/trading_system/parameters.md +++ b/docs/_includes/trading_system/parameters.md @@ -2,7 +2,7 @@ {% assign title = "Parameters" %} {% assign definition = site.data.trading_system.parameters %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "" %} @@ -63,7 +63,7 @@ Each testing session has its own set of parameters. This allows you to configure {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/phase-0.md b/docs/_includes/trading_system/phase-0.md index f36321fb2..dbfad9887 100644 --- a/docs/_includes/trading_system/phase-0.md +++ b/docs/_includes/trading_system/phase-0.md @@ -2,7 +2,7 @@ {% assign title = "Phase 0" %} {% assign definition = site.data.trading_system.phase_0 %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "s" %} @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/phase-1.md b/docs/_includes/trading_system/phase-1.md index 6904c90d4..fa4fbcb1f 100644 --- a/docs/_includes/trading_system/phase-1.md +++ b/docs/_includes/trading_system/phase-1.md @@ -63,7 +63,7 @@ The management of phases happens in a sequence. Phase 1 comes after phase 0, whi {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/position-rate.md b/docs/_includes/trading_system/position-rate.md index da2c9593a..ac17e08fc 100644 --- a/docs/_includes/trading_system/position-rate.md +++ b/docs/_includes/trading_system/position-rate.md @@ -62,7 +62,7 @@ However, for the time being, the formula is overridden by the system as executio {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/position-size.md b/docs/_includes/trading_system/position-size.md index ed3d96de7..965fd8724 100644 --- a/docs/_includes/trading_system/position-size.md +++ b/docs/_includes/trading_system/position-size.md @@ -61,7 +61,7 @@ {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/quoted-asset.md b/docs/_includes/trading_system/quoted-asset.md index a58d32fb8..a1f527173 100644 --- a/docs/_includes/trading_system/quoted-asset.md +++ b/docs/_includes/trading_system/quoted-asset.md @@ -61,7 +61,7 @@ The quoted asset must reference the second asset in the same market of the same {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/situation.md b/docs/_includes/trading_system/situation.md index db3e3b671..59ddc2499 100644 --- a/docs/_includes/trading_system/situation.md +++ b/docs/_includes/trading_system/situation.md @@ -52,7 +52,7 @@ In other words, you define situations in which you wish a certain event to happe A situation gets validated when all conditions under it are true. -An event may have more than one situation attached to it. In such a case, when any of the situations gets validated, it triggers the event. That is, events may be triggered in different circumstances, meaning that you are free to define different situations upon which the same event would be triggered. In such a case, when any of the situations evaluate true, then the event is triggered. +An event may have more than one situation attached to it. In such a case, when any of the situations gets validated, the event gets triggered. That is, events may be triggered in different circumstances, meaning that you are free to define different situations upon which the same event would be triggered. In such a case, when any of the situations evaluate true, then the event is triggered. @@ -65,7 +65,7 @@ An event may have more than one situation attached to it. In such a case, when a {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/slippage.md b/docs/_includes/trading_system/slippage.md index 9148f9f76..dbb212f83 100644 --- a/docs/_includes/trading_system/slippage.md +++ b/docs/_includes/trading_system/slippage.md @@ -2,7 +2,7 @@ {% assign title = "Slippage" %} {% assign definition = site.data.trading_system.slippage %} -{% assign preposition = "" %} +{% assign preposition = "a" %} {% assign plural = "" %} @@ -63,7 +63,7 @@ Slippage is factored both in the session reports and in the graphic representati {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/stop.md b/docs/_includes/trading_system/stop.md index 68070e7ba..6b52bc35c 100644 --- a/docs/_includes/trading_system/stop.md +++ b/docs/_includes/trading_system/stop.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/strategy.md b/docs/_includes/trading_system/strategy.md index 7176c65a9..ff670d317 100644 --- a/docs/_includes/trading_system/strategy.md +++ b/docs/_includes/trading_system/strategy.md @@ -74,13 +74,13 @@ The definition of strategy points to the concept of *a trade*. A trade is a proc {% endif %} {% if include.more == "yes" and include.content != "more" %} -
Click to learn more about {{ title | downcase }}{{plural}} +
Click to learn more about strategies {% endif %} {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/take-position-event.md b/docs/_includes/trading_system/take-position-event.md index cee4efedc..4411e4afb 100644 --- a/docs/_includes/trading_system/take-position-event.md +++ b/docs/_includes/trading_system/take-position-event.md @@ -65,7 +65,7 @@ Once the take position event is triggered, the decision to take a position has b {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/take-profit.md b/docs/_includes/trading_system/take-profit.md index 159549d05..52c7b4a00 100644 --- a/docs/_includes/trading_system/take-profit.md +++ b/docs/_includes/trading_system/take-profit.md @@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/time-frame.md b/docs/_includes/trading_system/time-frame.md index 2d7a7311c..87358b86a 100644 --- a/docs/_includes/trading_system/time-frame.md +++ b/docs/_includes/trading_system/time-frame.md @@ -63,7 +63,7 @@ In the context of live sessions, that is, paper trading, forward testing and liv {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/time-range.md b/docs/_includes/trading_system/time-range.md index 6f24a3f30..0b1d5a3cd 100644 --- a/docs/_includes/trading_system/time-range.md +++ b/docs/_includes/trading_system/time-range.md @@ -61,7 +61,7 @@ {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/trading-system.md b/docs/_includes/trading_system/trading-system.md index 2916849c7..dadeed86c 100644 --- a/docs/_includes/trading_system/trading-system.md +++ b/docs/_includes/trading_system/trading-system.md @@ -50,7 +50,7 @@ In practical terms, a trading system is a hierarchical arrangement organizing the actionable aspects of your investment plan. The hierarchy contains definitions regarding any number of trading strategies, all sharing the same market, the same base asset, and the same initial capital. -You use a trading system to define strategies following the trading framework implemented by the Superalgos Protocol, splitting strategies into four stages: trigger, open, manage, and close. +You use a trading system to define strategies following the Superalgos Protocol, splitting strategies into four stages: trigger, open, manage, and close. The concept of describing strategies in phases is fundamental to the methodical aspect of the trading system, as it provides a framework to run every strategy with the same logic, which contributes to developing scalable trading systems that may grow to any number of strategies. @@ -65,7 +65,7 @@ The concept of describing strategies in phases is fundamental to the methodical {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/trigger-off-event.md b/docs/_includes/trading_system/trigger-off-event.md index f293b427a..1a5d78a5c 100644 --- a/docs/_includes/trading_system/trigger-off-event.md +++ b/docs/_includes/trading_system/trigger-off-event.md @@ -65,7 +65,7 @@ In the first scenario, the strategy remains *on* until the trade is closed. As t {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/trigger-on-event.md b/docs/_includes/trading_system/trigger-on-event.md index 636ba2860..b3e01f4a6 100644 --- a/docs/_includes/trading_system/trigger-on-event.md +++ b/docs/_includes/trading_system/trigger-on-event.md @@ -63,7 +63,7 @@ Once a strategy is triggered-on, the system starts evaluating the take position {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/_includes/trading_system/trigger-stage.md b/docs/_includes/trading_system/trigger-stage.md index a6894b48b..6cb5b79a5 100644 --- a/docs/_includes/trading_system/trigger-stage.md +++ b/docs/_includes/trading_system/trigger-stage.md @@ -69,7 +69,7 @@ As a corollary, if certain strategies are meant to trade under the same market s {% if include.adding != "" %} -{{include.adding}} Adding {{preposition}} {{title}} +{{include.adding}} Adding {{preposition}} {{title}} Node diff --git a/docs/css/customstyles.css b/docs/css/customstyles.css index 4debed624..5886c08cb 100644 --- a/docs/css/customstyles.css +++ b/docs/css/customstyles.css @@ -152,7 +152,7 @@ th { text-align: left; } table { - max-width: 90%; + max-width: 100%; margin-bottom: 20px; margin-top: 20px; border: 1px solid #dedede; diff --git a/docs/images/icons/150-backup.png b/docs/images/icons/150-backup.png new file mode 100644 index 000000000..6fba2bc99 Binary files /dev/null and b/docs/images/icons/150-backup.png differ diff --git a/docs/images/icons/150-clone.png b/docs/images/icons/150-clone.png new file mode 100644 index 000000000..034e944b6 Binary files /dev/null and b/docs/images/icons/150-clone.png differ diff --git a/docs/images/icons/150-collapse.png b/docs/images/icons/150-collapse.png new file mode 100644 index 000000000..face29e40 Binary files /dev/null and b/docs/images/icons/150-collapse.png differ diff --git a/docs/images/icons/150-delete.png b/docs/images/icons/150-delete.png new file mode 100644 index 000000000..079a36df5 Binary files /dev/null and b/docs/images/icons/150-delete.png differ diff --git a/docs/images/icons/150-expand.png b/docs/images/icons/150-expand.png new file mode 100644 index 000000000..017d070b2 Binary files /dev/null and b/docs/images/icons/150-expand.png differ diff --git a/docs/images/icons/150-freeze.png b/docs/images/icons/150-freeze.png new file mode 100644 index 000000000..2d45d2308 Binary files /dev/null and b/docs/images/icons/150-freeze.png differ diff --git a/docs/images/icons/150-pinned.png b/docs/images/icons/150-pinned.png new file mode 100644 index 000000000..0fc1c23f5 Binary files /dev/null and b/docs/images/icons/150-pinned.png differ diff --git a/docs/images/icons/150-share.png b/docs/images/icons/150-share.png new file mode 100644 index 000000000..5319bff88 Binary files /dev/null and b/docs/images/icons/150-share.png differ diff --git a/docs/images/icons/150-unfreeze.png b/docs/images/icons/150-unfreeze.png new file mode 100644 index 000000000..de9455d33 Binary files /dev/null and b/docs/images/icons/150-unfreeze.png differ diff --git a/docs/images/icons/150-unpinned.png b/docs/images/icons/150-unpinned.png new file mode 100644 index 000000000..ab23f0931 Binary files /dev/null and b/docs/images/icons/150-unpinned.png differ diff --git a/docs/images/icons/backup.png b/docs/images/icons/backup.png new file mode 100644 index 000000000..d56bd44ee Binary files /dev/null and b/docs/images/icons/backup.png differ diff --git a/docs/images/icons/clone.png b/docs/images/icons/clone.png new file mode 100644 index 000000000..090e31213 Binary files /dev/null and b/docs/images/icons/clone.png differ diff --git a/docs/images/icons/collapse.png b/docs/images/icons/collapse.png new file mode 100644 index 000000000..0d69e31bf Binary files /dev/null and b/docs/images/icons/collapse.png differ diff --git a/docs/images/icons/delete.png b/docs/images/icons/delete.png new file mode 100644 index 000000000..dfa7741cf Binary files /dev/null and b/docs/images/icons/delete.png differ diff --git a/docs/images/icons/expand.png b/docs/images/icons/expand.png new file mode 100644 index 000000000..957093d35 Binary files /dev/null and b/docs/images/icons/expand.png differ diff --git a/docs/images/icons/freeze.png b/docs/images/icons/freeze.png new file mode 100644 index 000000000..21b6b3cc7 Binary files /dev/null and b/docs/images/icons/freeze.png differ diff --git a/docs/images/icons/pinned.png b/docs/images/icons/pinned.png new file mode 100644 index 000000000..ce19ec297 Binary files /dev/null and b/docs/images/icons/pinned.png differ diff --git a/docs/images/icons/share.png b/docs/images/icons/share.png new file mode 100644 index 000000000..0ba349c50 Binary files /dev/null and b/docs/images/icons/share.png differ diff --git a/docs/images/icons/unfreeze.png b/docs/images/icons/unfreeze.png new file mode 100644 index 000000000..8922f092a Binary files /dev/null and b/docs/images/icons/unfreeze.png differ diff --git a/docs/images/icons/unpinned.png b/docs/images/icons/unpinned.png new file mode 100644 index 000000000..054344c97 Binary files /dev/null and b/docs/images/icons/unpinned.png differ diff --git a/docs/index.md b/docs/index.md index beaa4e3ae..404f898f0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,5 @@ --- -title: "Welcome to the Superalgos Suite Documentation" +title: "Welcome to the Superalgos Documentation" sidebar: suite_sidebar permalink: index.html --- @@ -8,7 +8,7 @@ permalink: index.html This documentation is currently work in progress and corresponds to an unreleased version of the Superalgos Suite, still in development. The system has experienced a major shift on multiple fronts, and changes are currently being documented. -The Hierarchies Directory feature extensive information about all the data structures handled by the designer, including the new, unreleased ones. +The hierarchies directory features extensive information about all the data structures handled by the design space, including the new, unreleased ones. ## Beta Stage Notice diff --git a/docs/pages/suite/suite-advanced-backtesting.md b/docs/pages/suite/suite-advanced-backtesting.md index 2b1bb2a1e..fdb9b3c73 100644 --- a/docs/pages/suite/suite-advanced-backtesting.md +++ b/docs/pages/suite/suite-advanced-backtesting.md @@ -17,7 +17,7 @@ A process running under its own task may not be affected by errors occurring on For the reasons above, you may choose to run each testing session on separate tasks. -The easiest way to create sessions under this configuration is by cloning an existing task and dropping the cloned file back on the Designer. Once the new task is on the Designer, you may chain it to your preferred task manager. +The easiest way to create sessions under this configuration is by cloning an existing task and dropping the cloned file back on the design space. Once the new task is on the design space, you may chain it to your preferred task manager. [![Sessions-01-Duplicate](https://user-images.githubusercontent.com/13994516/70354911-23d8c000-1871-11ea-8a6c-552ab6e206ce.gif)](https://user-images.githubusercontent.com/13994516/70354911-23d8c000-1871-11ea-8a6c-552ab6e206ce.gif) @@ -27,7 +27,7 @@ The easiest way to create sessions under this configuration is by cloning an exi You may decide that you don't need independent tasks for each of your backtesting sessions or prefer to handle multiple sessions under one task. -To create new sessions under such configuration you need to clone the process that runs one of the existing sessions, and drop the clone on to the Designer. Then, structure of nodes the process to the trading bot instance and give the session a new name. +To create new sessions under such configuration you need to clone the process that runs one of the existing sessions, and drop the clone on to the design space. Then, structure of nodes the process to the trading bot instance and give the session a new name. [![Network-05-Multiple-Backtests](https://user-images.githubusercontent.com/13994516/67272829-90644f00-f4bd-11e9-9559-3f01233ecee8.gif)](https://user-images.githubusercontent.com/13994516/67272829-90644f00-f4bd-11e9-9559-3f01233ecee8.gif) @@ -83,7 +83,7 @@ Being able to run multiple backtesting sessions allows you to speed up the strat For instance, you may want to check how different variations of a condition in the *take position event* affect the results. To tests all variations at the same time, you would: -**1.** Replicate a backtesting session by cloning the corresponding *process* node (along with its offspring) and dropping the clone back on your workspace, as many times as you require, [attaching it](Designer-Interface#detachment-and-attachment-of-nodes) to an available trading bot. +**1.** Replicate a backtesting session by cloning the corresponding *process* node (along with its offspring) and dropping the clone back on your workspace, as many times as you require, [attaching it](Design-Space-Interface#detachment-and-attachment-of-nodes) to an available trading bot. **2.** Rename each backtesting session with a significant name that is related to the different variations of the condition you wish to test. diff --git a/docs/pages/suite/suite-anatomy-of-an-indicator.md b/docs/pages/suite/suite-anatomy-of-an-indicator.md index b64387d34..52fccadd0 100644 --- a/docs/pages/suite/suite-anatomy-of-an-indicator.md +++ b/docs/pages/suite/suite-anatomy-of-an-indicator.md @@ -43,5 +43,5 @@ An indicator may have several several processes and several products. In the cas The reason why Paula has two processes is related to the products Paula creates and the way each dataset is structured. -The Multi-Period-Market process stores data in *market files* while the Multi-Period-Daily process stores files in the *daily file* type of dataset. This is a common occurence in most indicators. The reason is that this is the desired behavior so that data may be consumed efficiently both in the lower and higher frequency time periods. +The Multi-Period-Market process stores data in *market files* while the Multi-Period-Daily process stores files in the *daily file* type of dataset. This is a common occurence in most indicators. The reason is that this is the desired behavior so that data may be consumed efficiently both in the lower and higher frequency time frames. diff --git a/docs/pages/suite/suite-build-a-plotter.md b/docs/pages/suite/suite-build-a-plotter.md index 10cf6d1d0..48da90011 100644 --- a/docs/pages/suite/suite-build-a-plotter.md +++ b/docs/pages/suite/suite-build-a-plotter.md @@ -102,7 +102,7 @@ Beyond the module's configuration, the most important aspect of a module's behav The *shapes* node contains all of the definitions required to render graphics on the screen. -A plotter recursively renders graphics for each period (or candle). This means that you will define—in generic terms—what shapes need to be drawn for a single period, and the plotter will do the same thing for every candle that is visible on the screen at any point in time, for any time period, as long as the corresponding data is available. +A plotter recursively renders graphics for each period (or candle). This means that you will define—in generic terms—what shapes need to be drawn for a single period, and the plotter will do the same thing for every candle that is visible on the screen at any point in time, for any time frame, as long as the corresponding data is available. [![Shapes-01-show-off](https://user-images.githubusercontent.com/13994516/71016080-eab41180-20f4-11ea-84c6-a514b87d568f.gif)](https://user-images.githubusercontent.com/13994516/71016080-eab41180-20f4-11ea-84c6-a514b87d568f.gif) diff --git a/docs/pages/suite/suite-build-an-indicator.md b/docs/pages/suite/suite-build-an-indicator.md index 25c29b723..7f008a158 100644 --- a/docs/pages/suite/suite-build-an-indicator.md +++ b/docs/pages/suite/suite-build-an-indicator.md @@ -397,7 +397,7 @@ That's it! You are now ready to run the *Indicator Bot Instance*. > **NOTE:** Remember that the bot has dependencies that need to be running for it to start. Click *Run All Tasks* in the *Masters Datasets* task manager. -If everything works well, the bot should start logging the typical progress messages in the console, create the folders structure as specified before and start pilling files for each of the time periods. +If everything works well, the bot should start logging the typical progress messages in the console, create the folders structure as specified before and start pilling files for each of the time frames. ## Debugging diff --git a/docs/pages/suite/suite-charts-interface.md b/docs/pages/suite/suite-charts-interface.md index 1f31fe331..fead2684a 100644 --- a/docs/pages/suite/suite-charts-interface.md +++ b/docs/pages/suite/suite-charts-interface.md @@ -13,7 +13,7 @@ Notice the following three nodes relative to the position of the mouse pointer: **2.** To the right, the current rate. This is the rate (in this case USDT per BTC) at the mouse pointer position. -**3.** Below, the current time period (time frame or candle size if you wish). This is the currently displayed time period—not only for candles but for any other object plotted across available layers. +**3.** Below, the current time frame (time frame or candle size if you wish). This is the currently displayed time frame—not only for candles but for any other object plotted across available layers. [![Charts-01-Main-Nodes](https://user-images.githubusercontent.com/13994516/67268983-141a3d80-f4b6-11e9-96cc-c0dc3d9188f7.gif)](https://user-images.githubusercontent.com/13994516/67268983-141a3d80-f4b6-11e9-96cc-c0dc3d9188f7.gif) @@ -26,8 +26,8 @@ There are many things you can do with your mouse wheel: 1. Scroll over the Layers Panel to access layers that may be out of reach downwards. 1. Scroll on top of or next to the datetime to produce a horizontal scaling. 1. Scroll on top of or next to the displayed rate to produce a vertical scaling. -1. Scroll on top of or next to the time period to change the time period to available values. -1. Scroll elsewhere over the chart to zoom in and out. The Platform will not only zoom in and out of the chart, but also automatically adjust the time period to the most convenient one (for the current zoom level). +1. Scroll on top of or next to the time frame to change the time frame to available values. +1. Scroll elsewhere over the chart to zoom in and out. The Platform will not only zoom in and out of the chart, but also automatically adjust the time frame to the most convenient one (for the current zoom level). [![Overview-05-Mouse-Use](https://user-images.githubusercontent.com/13994516/67268341-7a9e5c00-f4b4-11e9-848d-c520b4a8f1ff.gif)](https://user-images.githubusercontent.com/13994516/67268341-7a9e5c00-f4b4-11e9-848d-c520b4a8f1ff.gif) diff --git a/docs/pages/suite/suite-data-mine-hierarchy.md b/docs/pages/suite/suite-data-mine-hierarchy.md index c97887791..ce2bbd5cd 100644 --- a/docs/pages/suite/suite-data-mine-hierarchy.md +++ b/docs/pages/suite/suite-data-mine-hierarchy.md @@ -8,1993 +8,123 @@ toc: false {% include note.html content="Hover your mouse over a node for a tooltip definition, and click to get all the details." %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Data Mine
-
- - -
Indicator Bot
-
- - - - -
Process Definition
-
- - - - - - -
Process Output
-
- - - - - - - - -
Output Dataset
-
- - - - - - -
Process Dependencies
-
- - - - - - - - -
Status Dependency
-
- - - - - - - - -
Data Dependency
-
- - - - - - -
Status Report
-
- - - - - - -
Execution Started Event
-
- - - - - - -
Execution Finished Event
-
- - - - -
Product Definition
-
- - - - -
Dataset Definition
-
- - - - -
Record Definition
-
- - - - - - -
Record Property
-
- - - - - - -
Formula
-
- - - - -
Calculations Procedure
-
- - - - - - -
Procedure Loop
-
- - - - - - - - -
JavaScript Code
-
- - - - - - -
Procedure Initialization
-
- - - - - - -
JavaScript Code
-
- - - - -
Data Building Procedure
-
- - - - -
Procedure Loop
-
- - - - - - -
JavaScript Code
-
- - - - -
Procedure Initialization
-
- - - - -
JavaScript Code
-
- - -
Plotter
-
- - -
Plotter Module
-
- - -
Plotter Panel
-
- - -
Panel Data
-
- - -
Data Formula
-
- - -
Shapes
-
- - -
Chart Points
-
- - - - -
Point
-
- - - - -
Point Formula
-
- - -
Polygon
-
- - -
Polygon Vertex
-
- - -
Polygon Border
-
- - - - -
Style
-
- - - - -
Style Condition
-
- - - - -
Style
-
- - -
Polygon Body
-
- - -
Style
-
- - -
Style Condition
-
- - -
Style
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Mine

Indicator Bot

Process Definition

Process Output

Output Dataset

Process Dependencies

Status Dependency

Data Dependency

Status Report

Execution Started Event

Execution Finished Event

Product Definition

Dataset Definition

Record Definition

Record Property

Formula

Calculations Procedure

Procedure Loop

JavaScript Code

Procedure Initialization

JavaScript Code

Data Building Procedure

Procedure Loop

JavaScript Code

Procedure Initialization

JavaScript Code

Plotter

Plotter Module

Plotter Panel

Panel Data

Data Formula

Shapes

Chart Points

Point

Point Formula

Polygon

Polygon Vertex

Polygon Border

Style

Style Condition

Style

Polygon Body

Style

Style Condition

Style
+{% include /data_mine/data-mine.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} -## Data Mine +{% include /data_mine/indicator-bot.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} - +{% include /data_mine/process-definition.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} -**{{site.data.data_mine.data_mine}}** +{% include /data_mine/process-output.md heading="##" icon="150-" adding="####" configuring="" starting="" content="no" definition="bold" table="yes" more="no"%} -In a way, data mines are catalogs of bots that anyone may create. This hierarchy provides all the tools required to create sensors, indicators, and plotters, with minimal coding required. +{% include /data_mine/output-dataset.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -Because the hierarchy provides definitions, it does not intervene in the execution of bots. Instead, the definitions in data mines are instantiated from the Network hierarchy by bot instances. Bot instances and process instances are the ones running the code according to the definitions in the corresponding data mine. +{% include /data_mine/process-dependencies.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -### Adding a Data Mine +{% include /data_mine/status-dependency.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} -To add a data mine, select *Add Data Mine* on the workspace node menu. +{% include /data_mine/data-dependency.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -### Configuring a Data Mine +{% include /data_mine/status-report.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -Select *Configure Data Mine* on the menu to access the configuration. +{% include /data_mine/execution-started-event.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -```json -{ -"codeName": "Supermine" -} -``` +{% include /data_mine/execution-finished-event.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -* ```codeName``` is the name of the data mine as used within the code of the system. +{% include /data_mine/product-definition.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/dataset-definition.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/record-definition.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/record-property.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/formula.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/calculations-procedure.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/procedure-loop.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -## Indicator Bot +{% include /data_mine/javascript-code.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} - +{% include /data_mine/procedure-initialization.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -**{{site.data.data_mine.indicator_bot}}** +{% include /data_mine/data-building-procedure.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -The indicator bot node holds all definitions required for an indicator bot to function. Definitions are split between the definition of processes and products. Processes are algorithms that go through an input dataset, perform certain calculations, and produce an output. Part of that output is the data products the bot creates. +{% include /data_mine/plotter.md heading="##" icon="150-" adding="" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -### Adding an Indicator Bot +{% include /data_mine/plotter-module.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} -To add an indicator bot, select *Add Indicator Bot* on the data mine node menu. An indicator bot is created along with the basic structure of nodes required to define it. +{% include /data_mine/plotter-panel.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -### Configuring an Indicator Bot +{% include /data_mine/panel-data.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} -Select *Configure Bot* on the menu to access the configuration. +{% include /data_mine/data-formula.md heading="##" icon="150-" adding="####" configuring="" starting="" content="no" definition="bold" table="yes" more="no"%} -```json -{ -"codeName": "Super", -"repo": "Super-Indicator-Bot" -} -``` +{% include /data_mine/shapes.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -* ```codeName``` is the name of the bot as used within the code of the system. +{% include /data_mine/chart-points.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/point.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/point-formula.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/polygon.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/polygon-vertex.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/polygon-border.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /data_mine/style.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} -## Process Definition +{% include /data_mine/style-condition.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="no"%} - - -**{{site.data.data_mine.process_definition}}** - -As hinted above, most bots, in particular indicators, have two different processes. The reason is that different data structures need to be handled in different manners. The Multi-Period-Daily process handles daily files, while the Multi-Period-Market process handles market files. - -### Adding a Process Definition - -To add a process definition, select *Add Process Definition* on the bot's menu. A process definition node is created along with the basic structure of nodes comprising the definition. - -### Configuring a Process Definition - -Select *Configure Process* on the menu to access the configuration. - -**Multi-Period-Market:** - -```json -{ - "codeName": "Multi-Period-Market", - "description": "Brief description of what the bot does.", - "startMode": { - "allMonths": { - "run": "false", - "minYear": "", - "maxYear": "" - }, - "oneMonth": { - "run": "false", - "year": "", - "month": "" - }, - "noTime": { - "run": "true" - }, - "fixedInterval": { - "run": "false", - "interval": 0 - } - }, - "deadWaitTime": 0, - "normalWaitTime": 0, - "retryWaitTime": 10000, - "sleepWaitTime": 3600000, - "comaWaitTime": 86400000, - "framework": { - "name": "Multi-Period-Market", - "startDate": { - }, - "endDate": { - } - } -} -``` - -**Multi-Period-Daily:** - -```json -{ - "codeName": "Multi-Period-Daily", - "description": "Brief description of what the bot does.", - "startMode": { - "allMonths": { - "run": "false", - "minYear": "", - "maxYear": "" - }, - "oneMonth": { - "run": "false", - "year": "", - "month": "" - }, - "noTime": { - "run": "true" - }, - "fixedInterval": { - "run": "false", - "interval": 0 - } - }, - "deadWaitTime": 0, - "normalWaitTime": 0, - "retryWaitTime": 10000, - "sleepWaitTime": 3600000, - "comaWaitTime": 86400000, - "framework": { - "name": "Multi-Period-Daily", - "startDate": { - "takeItFromStatusDependency": 0 - }, - "endDate": { - "takeItFromStatusDependency": 1 - } - } -} -``` - -Both configurations deal with certain aspects of the internal workings of these kinds of processes. These are the ones to be adjusted when creating a new bot: - -* ```codeName``` is the name of the process as used within the code of the system; for consistency, always use ```Multi-Period-Market``` and ```Multi-Period-Daily``` accordingly. - -* ```description``` is a short description of what the bot does. - - - - - - - - -## Process Output - - - -**{{site.data.data_mine.process_output}}** - -### Adding a Process Output - -To add a process output node, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. - - - - - - - - - -## Output Dataset - - - -**{{site.data.data_mine.output_dataset}}** - -There are other effects of establishing a reference from the output dataset to a product dataset definition. Upon execution, every time a process finishes a processing cycle, it triggers an event that may be consumed by other entities. This event indicates that the datasets impacted by the process have been updated. - -An example of other entities that may be listening to such events is that of plotters. Plotters read datasets and create graphical representations of this data over the charts. Charts are constantly updating the information in the form of candles and indicators in realtime, synchronized with the data being extracted from the exchange by the sensor bot. That kind of automatism is possible thanks to the events that processes trigger every time an execution cycle is finished, signaling to everyone listening that new data is available on each of the impacted datasets. - -[![Indicators-Process-Output-01](https://user-images.githubusercontent.com/13994516/68976798-f01cf400-07f6-11ea-9ffb-198b5853a220.gif)](https://user-images.githubusercontent.com/13994516/68976798-f01cf400-07f6-11ea-9ffb-198b5853a220.gif) - -The image above shows the typical references from output datasets to datasets definitions. - -### References - -An output dataset must reference a dataset definition. - -### Adding an Output Dataset - -To add an output dataset, select *Add Output Dataset* on the process output node menu. - -{% include tip.html content="Remember that an output dataset must reference a valid dataset definition after creating the output dataset." %} - - - - - - - -## Process Dependencies - - - -**{{site.data.data_mine.process_dependencies}}** - -While processes run autonomously, most processes participate in a value-adding chain by which a process produces a data product that other processes may consume as an input to be processed further. This means that bots—while autonomous in their particular jobs—do depend both on other bots and on the data other bots produce. - -### Adding Process Dependencies - -To add a process dependencies node, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. - - - - - - -## Status Dependency - - - -**{{site.data.data_mine.status_dependency}}** - -The reference is established to acquire the information relative to what the target process is doing. For example, by reading a status report a process may learn when was the last time the referenced process ran, and what was the last file processed. - -The status report referenced may belong to the same process— which is called a self-reference. In such a case, the process is learning what it did the last time it ran. Also, the status report referenced may belong to another process—another bot. In that case, the dependency may be of the Market Starting Point or Market Ending Point types. - -* **Self Reference** is mandatory, as a process needs to read it's own status report every time it wakes up. - -* **Market Starting Point** is a status dependency existing on Multi-Period-Daily processes so that the process establishing the reference learns the datetime of the start of the market. Usually, the reference is established with the sensor's Historic-Trades process status report. Multi-Period-Market processes do not have this type of status dependency as the date of the start of the market is implied in their dataset (a single file with all market data). - -* **Market Ending Point** is a status dependency existing both in Multi-Period-Market and Multi-Period-Daily processes so that the process establishing the reference knows the datetime of the end of the market. - -[![Indicators-Process-Dependencies-01](https://user-images.githubusercontent.com/13994516/68991956-dfa36280-0864-11ea-87ec-f0e4e3b7bf0f.gif)](https://user-images.githubusercontent.com/13994516/68991956-dfa36280-0864-11ea-87ec-f0e4e3b7bf0f.gif) - -The image above shows a case of a self-reference status dependency as well as a market ending point status dependency. - -### Adding a Status Dependency - -To add a status dependency, select *Add Status Dependency* on the process dependencies node menu. - -{% include tip.html content="Remember that a status dependency must be configured, and must establish a reference to the appropriate status report." %} - -### Configuring a Status Dependency - -Select *Configure Status Dependency* on the menu to access the configuration. - -```json -{ -"mainUtility": "Self Reference|Market Starting Point|Market Ending Point" -} -``` - -* ```mainUtility``` determines the type of status dependency, with possible values being ```Self Reference```, ```Market Starting Point```, or ```Market Ending Point```. - - - - - - -## Data Dependency - - - -**{{site.data.data_mine.data_dependency}}** - -Most bots consume data other bots have produced. Because bots need the data as input for their calculations, processes establish a data dependency with the dataset definitions of other bots. The reference provides the process with all the information needed to decode the dataset, enabling it to perform the required calculations. - -[![Indicators-Process-Dependencies-02](https://user-images.githubusercontent.com/13994516/68993034-7840df00-0873-11ea-804d-d24e88ce25f7.gif)](https://user-images.githubusercontent.com/13994516/68993034-7840df00-0873-11ea-804d-d24e88ce25f7.gif) - -The image above shows data dependencies in one bot referencing dataset definitions of another bot. - -### Adding a Data Dependency - -To add a data dependency, select *Add Data Dependency* on the process dependencies node menu. - -{% include tip.html content="Remember that a data dependency must establish a reference to the appropriate dataset definition." %} - - - - - - -## Status Report - - - -**{{site.data.data_mine.status_report}}** - -Bots do not run continuously. Instead, they run in cycles. A cycle usually lasts until there is no more data to process, and once they finish, they shut down until the next cycle is due. A status report is a file every bot writes at the end of each cycle with information about the last run, including the datetime of the run and the last record processed. - -A status report may be consumed by the same bot producing it, or by other bots. - -### Adding a Status Report - -To add a status report, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. - - - - - - - -## Execution Started Event - - - -**{{site.data.data_mine.execution_started_event}}** - -These references determine when a process is due for another run. By listening to the execution finished event of the process it depends on, it may wake up just in time to process the new batch of data the dependency has just delivered. - -Bots form a sort of multi-branched execution sequence with an indeterminate number of dependencies. Every time the bot further down the tree of dependencies finishes a cycle, it triggers the execution of multiple bots listening to its execution finished event. - -### Adding an Execution Started Event - -To add an execution started event, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. - -{% include tip.html content="Remember that an execution started event must establish a reference to the appropriate execution finished event." %} - - - - - - - -## Execution Finished Event - - - -**{{site.data.data_mine.execution_finished_event}}** - -The execution finished event is responsible for triggering the execution of every process that depends on the data a bot produces. If bot Alice depends on bot Bob, Alice listens to the execution finished event of Bob so that it may start a new execution cycle as soon as Bob finishes its cycle. Alice listens to Bob's execution finished event by establishing a reference from its execution started event. - -[![Indicators-Process-Execution-Started-Finished-Events-01](https://user-images.githubusercontent.com/13994516/68993254-39605880-0876-11ea-9ee7-9f49976bd2dc.gif)](https://user-images.githubusercontent.com/13994516/68993254-39605880-0876-11ea-9ee7-9f49976bd2dc.gif) - -The image above shows a reference established from the execution started event of a process to the execution finished event of another process. - -### Adding an Execution Finished Event - -To add an execution finished event, select *Add Missing Items* on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. - - - - - -## Product Definition - - - -**{{site.data.data_mine.product_definition}}** - -A bot may feature multiple products, thus, there may be multiple product definitions. Three main aspects need to be defined in terms of products: the characteristics of the dataset, the composition of each record, and the way records are calculated. - -{% include note.html content="A product definition usually references a plotter module, which provides a graphic representation of the underlying dataset" %} - -### Adding a Product Definition - -To add a product definition, select *Add Product Definition* on the bot's node menu. A product definition is created along with the basic structure of nodes required to make up a product. - -### Configuring a Product Definition - -Select *Configure Product* on the menu to access the configuration. - -```json -{ - "codeName": "New-Product-Name", - "singularVariableName": "newProductName", - "pluralVariableName": "newProductNames" -} -``` - -* ```codeName``` is the name of the product as it is used within the bot's code. - -* ```singularVariableName``` is the singular form of the name of the variable representing the product, as is used on strategies (*i.e.:* ```bollingerChannel.direction```, where *bollingerChannel* is the name of the product as defined in its configuration and *direction* is the name of the property. - -* ```pluralVariableName``` is the plural form of the variable. - - - - - - -## Dataset Definition - - - -**{{site.data.data_mine.dataset_definition}}** - -A good part of what makes datasets easy to consume by other bots is the fact that they are standardized in terms of their structure. It is that structure that is specified in the dataset definitions. - -### Adding a Dataset Definition - -To add a dataset definition, select *Add Dataset Definition* on the bot's node menu. - -### Configuring a Dataset Definition - -Select *Configure Definition* on the menu to access the configuration. - -**Multi-Period-Market:** - -```json -{ - "codeName": "Multi-Period-Market", - "type": "Market Files", - "validPeriods": [ "24-hs", "12-hs", "08-hs", "06-hs", "04-hs", "03-hs", "02-hs", "01-hs" ], - "filePath": "Data-Mine-Name/Bot-Name/@Exchange/Output/Product-Name/Multi-Period-Market/@Period", - "fileName": "@BaseAsset_@QuotedAsset.json" -} -``` - -**Multi-Period-Daily:** - -```json -{ - "codeName": "Multi-Period-Daily", - "type": "Daily Files", - "validPeriods": [ "45-min", "40-min", "30-min", "20-min", "15-min", "10-min", "05-min", "04-min", "03-min", "02-min", "01-min" ], - "filePath": "Data-Mine-Name/Bot-Name/@Exchange/Output/Product-Name/Multi-Period-Daily/@Period/@Year/@Month/@Day", - "fileName": "@BaseAsset_@QuotedAsset.json", - "dataRange": { - "filePath": "Data-Mine-Name/Bot-Name/@Exchange/Output/Product-Name/Multi-Period-Daily", - "fileName": "Data.Range.@BaseAsset_@QuotedAsset.json" - } -} -``` - - -* ```codeName``` is the name of the dataset as used within the code. - -* ```type``` refers to the type of dataset; possible values are ```Market Files``` and ```Daily Files```. - -* ```validPeriods``` refers to the time frames handled by the dataset. - -* ```filePath``` sets the path on which files are stored; the proper name of the data mine, the bot and the product need to be entered. - -* ```fileName``` sets the name of the files that constitute the dataset. - - - - - - -## Record Definition - - - -**{{site.data.data_mine.record_definition}}** - -Bots store data in the form of arrays of records, in a minimized plain text file and the standard JSON format, although not as objects with named properties, but as arrays. - -[![image](https://user-images.githubusercontent.com/13994516/68998023-303eae00-08ad-11ea-9baa-ddea801c7d6d.png)](https://user-images.githubusercontent.com/13994516/68998023-303eae00-08ad-11ea-9baa-ddea801c7d6d.png) - -The choice of plain text for storage of large volumes of information has benefits in terms of not requiring any sophisticated technology to store and serve the data (*i.e.:* no database is required). - -Best practice indicates that there needs to be a balance between the amount of data that is stored and calculations that may be performed at runtime. - -Storing objects with named properties in the JSON format would be inappropriate as labels would repeat over and over, creating a ridiculous amount of unnecessary information. However, storing arrays in the JSON standard facilitates the handling of files in the context of JavaScript and Node.JS. - -### Adding a Record Definition - -To add a record definition node, select *Add Record Definition* on the product definition node menu. A record definition node is created along with the first record property. - - - - - - -## Record Property - - - -**{{site.data.data_mine.record_property}}** - -Records may have as many properties as required. - -{% include important.html content="The order in which record properties are defined around the parent record definition node is the order in which they are stored in the actual record." %} - -{% include tip.html content="The first two records are usually the *begin* and *end* records, featuring the corresponding datetimes that indicate when the record starts and ends." %} - -### Adding a Record Property - -To add a record property, select *Add Record Property* on the bot's node menu. - -### Configuring a Record Property - -Select *Configure Property* on the menu to access the configuration. - -```js -{ - "codeName": "record-name", - "isString": false, - "isCalculated": true -} -``` - -* ```codeName``` is the name of the record as it is used in the bot's code. - -* ```isString``` determines if the field is a text string or if, in turn, is a numeric field. Dates are stored in the *epoch* format, which is numeric. The reason why this configuration is important is that fields that are strings need to be stored between "double quotes". - -* ```isCalculated``` determines if the field is stored in the dataset or if, instead, is calculated at a later stage. A value *true* means that the record is not stored. In the case ```isCaculated``` is not defined in the configuration, it is assumed to be false. - -[![Indicators-Record-Definitions-01](https://user-images.githubusercontent.com/13994516/69139160-3ce72000-0ac0-11ea-9566-a259c9ea6194.gif)](https://user-images.githubusercontent.com/13994516/69139160-3ce72000-0ac0-11ea-9566-a259c9ea6194.gif) - -The image above shows a record definition with four record properties. - - - - - -## Formula - - - -**{{site.data.data_mine.formula}}** - -A formula may act in slightly different ways depending on the ```isCaculated``` attribute in the record property configuration: - -* When a property is calculated (```"isCalculated": true```), the formula assigns to the property a value that is calculated in the calculations procedure. Even if the property is not stored in the dataset, it is made available as a *calculated property* to other bots that may have the dataset as input. - -* When a property is not calculated (```"isCalculated": false``` or the attribute is not defined in the configuration) the formula is applied in the data building procedure. - -### Adding a Formula - -To add a formula, select *Add Formula* on the record property menu. - - - - - - - - -## Calculations Procedure - - - -**{{site.data.data_mine.calculations_procedure}}** - -Bots store data in the minimized array format as a strategy to build the lightest possible datasets. For the same reason, a bot may choose not to store easily calculable information. - -For example, imagine an indicator that stores buy and sell volumes... does it *need* to store the total volume? Given that it is so easy to calculate, the answer is *probably* no. IT is up to the developer to decide, but it is certainly not required. - -{% include note.html content="It may not be worthy to store information that can be easily calculated at a later stage." %} - -The calculations procedure calculates the properties that the developer chose not to store in the dataset. - -### Adding a Calculations Procedure - -To add a calculations procedure, select *Add Missing Items* on the product definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. - - - - - - - -## Procedure Loop - - - -**{{site.data.data_mine.procedure_loop}}** - -This is an example of a procedure loop code snippet, in particular, the code that calculates the Popular SMAs product of the Simple Moving Average (SMA) indicator. - -{% include important.html content="Calculation procedures may only access data up to 48 hours in the past counting from the datetime of the record being processed. For that reason, the calculation of a moving average requires temporarily storing data in an array." %} - -```js -/* Loop Code. */ - -let candle = record.current // Our main dependencies are candles -variable.last200.push(candle.close) // Add the current close value to the last 200 array. - -if (variable.last200.length > 200) { - variable.last200.splice(0, 1) // Remove the first element of the array to keep it at a maximun of 200 elements. -} - -variable.sma20 = calculateSMA(20) -variable.sma50 = calculateSMA(50) -variable.sma100 = calculateSMA(100) -variable.sma200 = calculateSMA(200) - -function calculateSMA(periods) { // Having a function saves us from duplicating code. - /* We check we have enough values to make the calculation */ - if (variable.last200.length < periods) { return 0 } // If we dont, we define the value is zero. - - let sum = 0 // Initialize sum variable. - for (let i = variable.last200.length - periods; i < variable.last200.length; i++) { // Iterate through the last periods - sum = sum + variable.last200[i] - } - let sma = sum / periods - return sma -} -``` - -### Adding a Procedure Loop - -To add a procedure loop, select *Add Procedure loop* on the corresponding procedure node menu. A procedure loop node is created along with the corresponding JavaScript node. - - - - -## JavaScript Code - - - -**{{site.data.data_mine.javascript_code}}** - -The platform allows developers great flexibility as all valid JavaScript code is allowed. - -{% include important.html content="Until a robust JavaScript editor is implemented on the UI, it is recommended to write code on an external editor and paste it in the UI code bubble to ensure consistency." %} - -### Adding a JavaScript Code - -To add a JavaScript code node, select *Add Code* on the corresponding parent node menu. - - - - - - -## Procedure Initialization - - - -**{{site.data.data_mine.procedure_initialization}}** - -procedure_initialization: "The procedure initialization is used to initialize variables used by the procedure loop." - -This is an example of a procedure loop code snippet, in particular, the code that initializes the array used in the calculation of the Popular SMAs product of the Simple Moving Average (SMA) indicator. - -```js -/* Initialization Code. */ -variable.last200 = [] -``` - -### Adding a Procedure Initialization - -To add a procedure initialization, select *Add Procedure Initialization* on the corresponding procedure node menu. A procedure initialization node is created along with the corresponding JavaScript node. - - - - - - - - - - - -## Data Building Procedure - - - -**{{site.data.data_mine.data_building_procedure}}** - -This procedure holds the core logic of the bot, as it features the code that performs the calculations required to produce the new data set. The code is split between a procedure initialization and a procedure loop. - -### Adding a Data Building Procedure - -To add a data buildings procedure, select *Add Missing Items* on the product definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them. - - - - - - - - -## Plotter - - - -**{{site.data.data_mine.plotter}}** - -Plotters usually have a one-to-one relationship with bots, as they are often created as a customized solution. However, in practice, there is no constraint to creating any number of plotters for a single bot or a single plotter for multiple bots. - -The overall workflow of a plotter, while reading a dataset, consists in: - -* Applying a set of rules to identify certain data points; - -* Use those points to form lines and polygons; - -* Apply graphical styles to those lines and polygons. - -Those actions are performed recursively for each record, and the graphics are plotted on the charts in real-time as data is processed. - - - - - -## Plotter Module - - - -**{{site.data.data_mine.plotter_module}}** - -A single plotter may have several modules. Different modules may be used to plot each product of the bot, or as best suits the expected use-pattern. - -[![Plotter-Module-01](https://user-images.githubusercontent.com/13994516/71016077-eab41180-20f4-11ea-87e7-7262ff10a1ab.gif)](https://user-images.githubusercontent.com/13994516/71016077-eab41180-20f4-11ea-87e7-7262ff10a1ab.gif) - -{% include important.html content="For a bot to use a plotter, the corresponding product definition must establish a reference with the plotter module built to interpret the dataset." %} - -[![Plotter-Module-02-Product-Link](https://user-images.githubusercontent.com/13994516/71016079-eab41180-20f4-11ea-8afb-96321f9c68d8.gif)](https://user-images.githubusercontent.com/13994516/71016079-eab41180-20f4-11ea-8afb-96321f9c68d8.gif) - -### Adding a Plotter Module - -To add a plotter module, select *Add Plotter Module* on the plotter node menu. - -### Configuring a Plotter Module - -Select *Configure Plotter Module* on the menu to access the configuration. - -```json -{ - "codeName": "Module Name", - "isLegacy": true, - "icon": "histogram" -} -``` - -* ```codeName``` is the name used in the code to refer to the module. - -* ```isLegacy``` is ```true``` for plotters modules developed entirely in JavaScript, and is ```false``` or doesn't show in the configuration for plotters built with the tools featured in the data mine hierarchy. - -* ```icon``` is the name of the image that illustrates the corresponding layer in the Layers Panel. In case the banner is not specified, the *default banner* is used. Current possible values are: - - -| Value | Image| -| :---: | :---: | -| ```Default``` | ![Default-Banner](https://user-images.githubusercontent.com/13994516/70896073-5bbdd100-1ff0-11ea-84e3-5bd90475976f.png) | -| ```Histogram``` | ![Histogram-Banner](https://user-images.githubusercontent.com/13994516/70896074-5bbdd100-1ff0-11ea-8dad-ccc6cfe64beb.png) | -| ```Band``` | ![Bands-Banner](https://user-images.githubusercontent.com/13994516/70896072-5bbdd100-1ff0-11ea-8626-61c36bd22a3c.png) | -| ```Moving Average``` | ![Moving-Average-Banner](https://user-images.githubusercontent.com/13994516/70896075-5bbdd100-1ff0-11ea-9909-dae33e57f65f.png) | -| ```Oscillator``` | ![Oscillator-Banner](https://user-images.githubusercontent.com/13994516/70896076-5c566780-1ff0-11ea-8a5b-20077257c560.png) | -| ```Trend``` | ![trends-banner](https://user-images.githubusercontent.com/13994516/70989177-744aeb80-20c3-11ea-88f5-d10473fa79b9.png) | - -Custom images may be added too. To do that: - -1. name the image in the following format: ```The-Image-Name-Icon.png```; - -1. place images in the ```WebServer\Images\``` folder; - -1. in the configuration of the module, use the name without the *-Icon* ending (e.g.: ```"icon": "The-Image-Name"```) - - - - - - - - - -## Plotter Panel - - - -**{{site.data.data_mine.plotter_panel}}** - -Beyond the graphic representation of data over the charts, plotters may also feature a *data panel*, that is, a numerical representation of the data showing the exact figures corresponding to the column or period that is in focus (the point of the charts where the mouse pointer is at any point). - -### Adding a Plotter Panel - -To add a plotter panel, select *Add Plotter Panel* on the plotter module node menu. - - - - - - - - -## Panel Data - - - -**{{site.data.data_mine.panel_data}}** - -The system renders a panel featuring a centered, single-column vertical arrangement of data, with a label and a data field right below it. The label of each data field on the panel is given—by default—by the label set for each panel data node. - -### Adding a Panel Data - -To add a panel data node, select *Add Panel Data* on the plotter panel menu. - -### Configuring a Panel Data - -Select *Configure Panel Data* on the menu to access the configuration. - -```json -{ - "valueDecimals": 2 -} -``` - -* ```valueDecimals``` sets the number of decimals to be shown on the corresponding data field. - -To override the default manner in which the data is assembled on the panel, the following properties may be included and defined: - -```json -{ - "labelText": "The Label", - "labelPosition": 15, - "valuePosition": 20, - "valueDecimals": 2 -} -``` - -* ```labelPosition``` and ```valuePosition``` represent the vertical distance of the corresponding fields to the top margin of the panel. - - - - - - -## Data Formula - - - -**{{site.data.data_mine.data_formula}}** - -### Adding a Data Formula - -To add a data formula, select *Add Data Formula* on the plotter panel menu. - - - - -## Shapes - - - -**{{site.data.data_mine.shapes}}** - -A plotter recursively renders graphics for each period or candle. This means that a definition of what shapes need to be drawn for a single period is required. The plotter does the same thing for every period or candle that is visible on the screen at any point in time, for any time frame, as long as the corresponding data is available. - -[![Shapes-01-show-off](https://user-images.githubusercontent.com/13994516/71016080-eab41180-20f4-11ea-84c6-a514b87d568f.gif)](https://user-images.githubusercontent.com/13994516/71016080-eab41180-20f4-11ea-84c6-a514b87d568f.gif) - -In general terms, the process of defining what is going to be rendered on the screen consist of the following four steps: - - 1. Identifying points defined by ```[x,y]``` coordinates - 2. Defining polygons - 3. Defining default styles - 4. Defining conditional styles - -### Adding Shapes - -To add a shapes node, select *Add Shapes* on the plotter module menu. - - - - - - -## Chart Points - - - -**{{site.data.data_mine.chart_points}}** - -The definition of a point consists of the name of the point and the corresponding values for the ```x``` and ```y``` coordinates. To create such definitions, point and point formulas are used. - -### Adding a Chart Points - -To add a chart points node, select *Add Chart Points* on the shapes menu. - - - - - -## Point - - - -**{{site.data.data_mine.point}}** - -These coordinate points are used to define polygons. Values for ```[x,y]```coordinates are entered with a point formula. - -{% include tip.html content="Each point should be given a significant name so that it is easier to identify them at the time of establishing references with polygon vertices." %} - -### Adding a Point - -To add a point, select *Add Point* on the chart points node menu. - - - - - - -## Point Formula - - - -**{{site.data.data_mine.point_formula}}** - -To represent some form of variation of the price or a price derivative over time, a typical point formula consists of the following two coordinates: ```x = datetime``` and ```y = rate```. - -For example: - -**Point *SMA 20 Begin*** -```js -x = record.begin -y = record.previous.sma20 -``` - -The example above shows the definition of the first of two points necessary to draw the segment of the 20-periods SMA curve for any particular period or candle. In this case, ```x = record.begin``` is the starting datetime of the period and ```y = record.previous.sma20``` is the rate of the 20-periods SMA of the previous period. - -{% include note.html content="The above variables are constructed with information originating at the product definition that references the corresponding plotter module." %} - -To complete the line segment corresponding to a single period, the closing datetime of the period and the closing rate for the 20-periods SMA are required: - -**Point *SMA 20 End*** -```js -x = record.end -y = record.sma20 -``` - -The above system works very well for plotting all sorts of information over the candles, on the charts. - -An oscillator like RSI too needs the definition of the starting and ending datetime of the period as the value for the *x-axis*. However, the value for *axis y* fits a different scale. - -Anyway, the points definition is just as straight forward, for example: - -**Point *RSI Begin*** -```js -x = record.begin -y = record.previous.value -``` - -**Point *RSI End*** -```js -x = record.end -y = record.value -``` - -Points do not necessarily need to refer to values on the dataset produced by the corresponding data product. For example, absolute values for the *y-axis* may be used to describe fixed graphical elements, for instance, a horizontal line, or a box. - -**Point *Begin 20*** -```js -x = record.begin -y = 20 -``` - -**Point *End 20*** -```js -x = record.end -y = 20 -``` - -**Point *Begin 30*** -```js -x = record.begin -y = 30 -``` - -**Point *End 30*** -```js -x = record.end -y = 30 -``` - -The above four points are used to paint the background of the 20 to 30 value range of the RSI chart. The first two points are also used to draw the dotted line signaling the 20-value mark, and the last two are used for the dotted line indicating the 30-value mark. - -{% include note.html content="The reason from separating the definition of points from the definition of polygons is that any point may be used by one or more polygons." %} - -### Adding a Point Formula - -To add a point formula, select *Add Point Formula* on the point node menu. - - - - - - - - - - -## Polygon - - - -**{{site.data.data_mine.polygon}}** - -Polygons are defined by two or more vertices, which map points in a charts point. The graphic representation of polygons originates in styles applied to either or both polygon bodies and polygon borders. - -{% include note.html content="The order in which polygons are ordered around the parent shapes node determines the order in which they are drawn on the screen. In cases on which polygons intersect, those drawn last are drawn on top of those drawn first." %} - -### Adding a Polygon - -To add a polygon, select *Add Polygon* on the shapes node menu. - - - - - -## Polygon Vertex - - - -**{{site.data.data_mine.polygon_vertex}}** - -polygon_vertex: "A polygon vertex is a reference to a point defined in the chart points, constituting a specific coordinate to be used as a vertex of a shape." - -Vertices are the main element defining polygons. Once created, each vertex must establish a reference to the corresponding point in the charts point. - -[![Vertex-01-add-and-link](https://user-images.githubusercontent.com/13994516/71016081-eb4ca800-20f4-11ea-8fee-4d38ecfb0596.gif)](https://user-images.githubusercontent.com/13994516/71016081-eb4ca800-20f4-11ea-8fee-4d38ecfb0596.gif) - -Drawing curves requires two vertices. Painting areas, such as the background of a chart, likely requires four vertices. Note that vertices are not capable of featuring a style. Instead, styles are applied to polygon borders and polygon bodies. - -{% include important.html content="Bear in mind that the order in which vertices in a polygon are arranged around the parent polygon node when their *rotational symmetry* property is selected, is the order in which the plotter computes the points. This means that points need to be in the correct order, for example, when drawing a box. Imagine drawing a box on a piece of paper without lifting the pencil... that is how the plotter does it." %} - -### Adding a Polygon Vertex - -To add a polygon vertex, select *Add Polygon Vertex* on the polygon node menu. - -{% include tip.html content="Remember that a vertex must establish a reference to a point in the charts point to be properly defined" %} - - - - - -## Polygon Border - - - -**{{site.data.data_mine.polygon_border}}** - -A polygon border needs at least two vertices to be defined. A border serves to create a *stroke* for the outlines of any sort of polygon, either closed or open, by giving it a style. - -### Adding a Polygon Border - -To add a polygon border, select *Add Polygon Border* on the polygon node menu. - - - -## Style - - - -**{{site.data.data_mine.style}}** - -A style applied to a polygon body or a polygon border node acts as the default style. - -### Adding a Style - -To add a style, select *Add Style* on a polygon border or polygon body node menu. - -### Configuring a Style - -Select *Configure Style* on the menu to access the configuration. - -A typical definition for a polygon body style looks like this: - -```json -{ - "default": { - "opacity": 0.2, - "paletteColor": "UI_COLOR.DARK_TURQUOISE" - }, - "atMousePosition": { - "opacity": 0.3, - "paletteColor": "UI_COLOR.DARK_TURQUOISE" - } -} -``` - -A typical definition for a polygon border style has a couple more properties: - -```json -{ - "default": { - "opacity": 0.2, - "lineWidth": 1, - "lineDash": [0,0], - "paletteColor": "UI_COLOR.DARK_TURQUOISE" - }, - "atMousePosition": { - "opacity": 0.3, - "lineWidth": 2, - "lineDash": [0,0], - "paletteColor": "UI_COLOR.RUSTED_RED" - } -} -``` - -The first section of the definition refers, as explicitly stated, to the default state of the style. - -The second section refers to the style assigned to the column or period on which the mouse pointer is located. This is very useful for highlighting the specific zone of interest as the user browses the charts. - -* ```opacity``` is probably self-explanatory: it may range from ```0``` for a fully transparent object to ```1``` for a solid object. - -* ```paletteColor``` sets the color for the *fill* or *stroke* in cases of polygon bodies and polygon borders respectively. Use the variable ```UI_COLOR``` followed by a ```.``` and any of the properties in the following list for a selection of currently available colors: - -| Variable Value | RGB Value | Color Sample | -| :--- | :---: | :------------------- | -| ```DARK``` | 48, 48, 54 |   | -| ```LIGHT``` | 234, 226, 222 |   | -| ```GREY``` | 150, 150, 150 |   | -| ```LIGHT_GREY``` | 247, 247, 247 |   | -| ```WHITE``` | 255, 255, 255 |   | -| ```BLACK``` | 0, 0, 0 |   | -| ```GOLDEN_ORANGE``` | 240, 162, 2 |   | -| ```RUSTED_RED``` | 204, 88, 53 |   | -| ```GREEN``` | 188, 214, 67 |   | -| ```RED``` | 223, 70, 60 |   | -| ```PATINATED_TURQUOISE``` | 27, 153, 139 |   | -| ```TITANIUM_YELLOW``` | 244, 228, 9 |   | -| ```MANGANESE_PURPLE``` | 91,80, 122 |   | -| ```TURQUOISE``` | 74, 207, 217 |   | -| ```DARK_TURQUOISE``` | 2, 149, 170 |   | - -* ```lineWidth``` is the width of the border line, which should be greater than 0. - -* ```lineDash``` is used to turn the border into a dashed-line; the first value corresponds to the length of the dash while the second value defines the length of the space. - -{% include note.html content="When using dashed lines, bear in mind that the drawing from one column or period is independent of the next. Big values for dashes and spaces may not work well for lines that span several columns." %} - - - - - - - - - -## Style Condition - - - -**{{site.data.data_mine.style_condition}}** - -Style conditions offer a way to introduce additional intelligence on the visual representation of data by using styles that respond to certain conditions. - -For example, the *Percentage Bandwidth* plotter module assigns a different color to the Moving Average line when it's going up or down. - -To do that, a style condition features it's own style so that, when the condition validates true, the new style is applied. - -Style conditions me be created in a sequence so that the style may continue changing upon the validation of a series of style conditions. The system evaluates all style conditions in a sequential order determined by their position in the rotational symmetry around the parent node. Each condition that is met may modify or add up to the resulting style that is rendered on screen. That is, the final style is the result of the sequential application of the styles defined for each condition that is met, on top of the default style. - -### Adding a Style Condition - -To add a style condition, select *Add Style Condition* on a polygon border or polygon body node menu. - -### Editing a Style Condition - -Select *Edit Condition* on the menu to access the configuration. - -Style conditions work pretty much like conditions used on trading systems. The main difference is that the variables available are solely those provided by the bot product definition that reference the corresponding plotter module. - -To continue the example of the Percentage Bandwidth plotter, the following is the condition that determines the newly added styles: - -```js -record.previous.movingAverage > record.movingAverage -``` - -As hinted earlier, when the condition is met, the default style is modified by a second style that may be created on the menu of the style condition node. - -The definition of secondary styles is slightly different from that of the default style, as—in such cases—the ```atMousePosition``` property may no longer be defined: - -```js -{ - "opacity": 0.55, - "lineWidth": 1, - "lineDash": [0,0], - "paletteColor": "UI_COLOR.RED" -} -``` - - - - - - - - - - - -## Polygon Body - - - -**{{site.data.data_mine.polygon_body}}** - -A polygon body needs at least three vertices to be defined. A body serves to create a *fill* for the outlines of any sort of polygon, either closed or open, by giving it a style. - -### Adding a Polygon Body - -To add a polygon body, select *Add Polygon Body* on the polygon node menu. +{% include /data_mine/polygon-body.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} diff --git a/docs/pages/suite/suite-datasets.md b/docs/pages/suite/suite-datasets.md index a3ed19eb8..37240b33b 100644 --- a/docs/pages/suite/suite-datasets.md +++ b/docs/pages/suite/suite-datasets.md @@ -29,7 +29,7 @@ For instance, writting a single file with all historic trades in a market spanni Let's look into a specific example... -The Charts offer the possibility to navigate market data in the form of candles over different time periods. It is reasonable to keep candles in time periods of 1 hour and above (up to the 24-hour time period) in a single file. A market spanning 5 years would have less than 44 thousand records ```(5 * 365 * 24)``` of 1-hour candles. It seems reasonable for the Charts to load a single file so as to allow the user to seamlessly navigate large sections of the market in this time period, for instance, several days or weeks. +The Charts offer the possibility to navigate market data in the form of candles over different time frames. It is reasonable to keep candles in time frames of 1 hour and above (up to the 24-hour time frame) in a single file. A market spanning 5 years would have less than 44 thousand records ```(5 * 365 * 24)``` of 1-hour candles. It seems reasonable for the Charts to load a single file so as to allow the user to seamlessly navigate large sections of the market in this time frame, for instance, several days or weeks. However, if the user wishes to browse 1 minute candles it is obvious his or her focus does not span days or weeks, let alone the whole market. The person is surely interested in analyzing a very specific point in time. Therefore, loading a single file with over 2.5 million records ```(5 * 365 * 24 * 60)``` would be unreasonable. @@ -64,7 +64,7 @@ _e.g.:_ The format in which bots store their output is standardized. In an attempt to make data highly accessible, a tree-like folder structure is built following this pattern (which may slightly differ from bot to bot, depending on the specific dataset): ``` -Dataset Name > Process Name > Time Period > Year > Month > Day > Hour +Dataset Name > Process Name > Time Frame > Year > Month > Day > Hour ``` _e.g.:_ diff --git a/docs/pages/suite/suite-design-space-interface.md b/docs/pages/suite/suite-design-space-interface.md new file mode 100644 index 000000000..4577eb8e1 --- /dev/null +++ b/docs/pages/suite/suite-design-space-interface.md @@ -0,0 +1,95 @@ +--- +title: "Design Space Interface" +summary: "Navigation allows the use of mouse and keyboard. You may also create shortcuts. Node's menu allows controlling the physics of the environment and provides backup, share and clone functions." +sidebar: suite_sidebar +permalink: suite-design-space-interface.html +--- + +## Navigation + +Left-click on the black background and drag to move around the workspace. + +You may also use the following key combinations on your keyboard: + +1. Ctrl or ⌘ + ← to pan to the left. +1. Ctrl or ⌘ + → to pan to the right. +1. Ctrl or ⌘ + ↑ to pan upwards. +1. Ctrl or ⌘ + ↓ to pan downwards. + +You may also use your keyboard as follows: + +1. Alt + ↑ to close the charts and open the design space. +1. Alt + ↓ to close the design space and open the charts. +1. Alt + → to open both the design space and the charts, assigning each one-half of the screen. +1. Ctrl or ⌘ + Shift + ↑ to pull the separation bar up incrementally. +1. Ctrl or ⌘ + Shift + ↓ to pull the separation bar down incrementally. + +## Node Shortcuts + +You may define shortcuts for frequently-used nodes with the following procedure: + +1. Hover the mouse pointer over the target node until the menu opens up. This puts the node *in focus*. +1. Click Ctrl or ⌘ + Alt + your preferred key to assign the shortcut. +1. A sign will appear below the node confirming the assignation of the shortcut. + +[![Shortcuts](https://user-images.githubusercontent.com/13994516/70344838-f123cd00-185a-11ea-819f-92c4cf1e93ea.gif)](https://user-images.githubusercontent.com/13994516/70344838-f123cd00-185a-11ea-819f-92c4cf1e93ea.gif) + +Repeat the same procedure to remove a shortcut. + +{% include note.html content="When attempting to assign a shortcut with a keyboard combination that is already in use, the platform will notify of the issue. If you insist by hitting the same keyboard combination two more times, the platform will assign the shortcut as expected." %} + +## Node's Menu + +Hovering the mouse pointer over nodes causes a menu to pop up. In this situation, the node is *in focus*. + +### Arrangement Features + +The design space functions under the paradigm of a *self-organizing workspace* in which nodes tend to find their place guided by certain laws of physics, and constrained by their chain relationships. + +This self-organizing paradigm saves users the effort of maintaining the arrangement of nodes in a logical manner, in particular when manipulating or creating new nodes. + +However, there will be times in which you will want to override this self-organizing nature. The following menu options are tools that will help you manipulate the arrangement of nodes, overriding the physics that affect their floating nature. + +| Icon | Pinned / Unpinned | +| --- | --- | +| ![pinned](images/icons/pinned.png) | The node is pinned to the workspace on a specific ```[x, y]``` coordinate. This status overrides any other setting affecting the node's mobility. Only direct user action by clicking and dragging may move a pinned node. | +| ![unpinned](images/icons/unpinned.png) | When a node is unpinned, it is free to be affected by other settings, or find its place floating on the workspace. | + + +| Icon | Freeze / Unfreeze | +| --- | --- | +| ![freeze](images/icons/freeze.png) | Clicking the *freeze* option freezes the node's chain connections with its parent and offspring. Connecting lines turn blue. If you freeze the head node of a hierarchy, then the whole hierarchy is frozen. Freezing node structures is effective only when nodes are loose, that is, when they are not affected by angle or distance settings and are unpinned. In such cases, freezing releases CPU resources, as the platform stops calculating node's positions and status. | +| ![unfreeze](images/icons/unfreeze.png) | Clicking the *unfreeze* option unfreezes connections. If you click the option to unfreeze a node and the node does not change its status, it may be because a higher node in the hierarchy is still frozen. | + +| Icon | Collapse / Expand | +| --- | --- | +| ![collapse](images/icons/collapse.png) | Clicking the _minus_ button collapses the structure, hiding offspring nodes. This also has the effect of releasing CPU resources as the platform stops calculating their position and status. In general, it is good practice to keep hierarchies closed when not being actively worked on. | +| ![expand](images/icons/expand.png) | Clicking the _plus_ button expands the structure of offspring nodes. | + +| Icon | Angle to Parent — Click to cycle through the different options. | +| --- | --- | +| ![00](images/icons/angle-to-parent-000.png) | The *rotational symmetry* is disabled and the node may take any position. The connection line with its parent is yellow.| +| ![36](images/icons/angle-to-parent-360.png) | The node is locked to a *rotational symmetry* around its parent node, with sibling nodes using the same setting. The symmetry spans **360 degrees**, and the connection line with the parent node turns orange.| +| ![180](images/icons/angle-to-parent-180.png) | The slot of the symmetry around its parent node is limited to **180 degrees**, and the connection line remains orange.| +| ![90](images/icons/angle-to-parent-090.png) | The slot of the symmetry around its parent node is limited to **90 degrees**, and the connection line remains orange.| +| ![45](images/icons/angle-to-parent-045.png) | The slot of the symmetry around its parent node is limited to **45 degrees**, and the connection line remains orange.| + +| Icon | Distance to Parent — Click to cycle through the different options. | +| --- | --- | +| ![000](images/icons/distance-to-parent-000.png) | The distance setting is dissabled and the node may assume any distance to its parent. | +| ![025](images/icons/distance-to-parent-025.png) | The node is locked to a distance from its parent node that is **0.25X** of the distance from the parent to its parent. | +| ![050](images/icons/distance-to-parent-050.png) | The node is locked to **0.5X** of the distance. | +| ![100](images/icons/distance-to-parent-100.png) | The node is locked to **1X** of the distance. | +| ![150](images/icons/distance-to-parent-150.png) | The node is locked to **1.5X** of the distance. | +| ![200](images/icons/distance-to-parent-200.png) | The node is locked to **2X** of the distance. | + +### Productivity Features + +The rest of the menu options available in most nodes are the following: + +| Icon | Action | +| --- | --- | +| ![menu-backup](https://user-images.githubusercontent.com/13994516/63045559-e66eb200-bed0-11e9-8f4d-6385147161fb.png) | **Backup**: Downloads a JSON file with the data structure and references concerning the particular node and the structure of offspring nodes in the hierarchy. Use this feature to save your entire workspace or any particular structure of nodes within your workspace so that you may later restore the information, including all references, should you need to. For your reference, the file downloaded is named ```Backup``` followed by the name of the node you are backing up. | +| ![clone](https://user-images.githubusercontent.com/13994516/71024964-5d79b880-2106-11ea-9f9a-753b96d98861.png) | **Clone**: Downloads a JSON file containing information similar to a backup. The main difference is that the feature is built to facilitate the production of identical copies of any particular structure of nodes of a hierarchy, or a complete hierarchy. Use this feature to accelerate your work process when you need to replicate nodes, for example, to create multiple testing sessions. The file downloaded is named ```Clone``` followed by the name of the node you are cloning. | +| ![menu-share](https://user-images.githubusercontent.com/13994516/63045561-e7074880-bed0-11e9-88a2-cf99a0ede94e.png) | **Share**: Downloads a JSON file containing information similar to a backup. The only difference is that no personal information is included. This is particularly important so that you do not share sensitive information accidentally, such as your API keys. Always use this function when you intend to share work. Do not share your backups. The file downloaded is named ```Share``` followed by the name of the node you are sharing. | +| ![menu-delete](https://user-images.githubusercontent.com/13994516/63045560-e66eb200-bed0-11e9-8b67-feb72b4ab253.png) | **Delete**: Deletes the node and all its offspring. Confirmation in the form of an additional click is required. | diff --git a/docs/pages/suite/suite-design-space-workspace-and-data-structures.md b/docs/pages/suite/suite-design-space-workspace-and-data-structures.md new file mode 100644 index 000000000..58be58460 --- /dev/null +++ b/docs/pages/suite/suite-design-space-workspace-and-data-structures.md @@ -0,0 +1,66 @@ +--- +title: "Design Space, Workspace, and Data Structures" +summary: "The workspace, nodes, structures of nodes and their parent-offspring relationships are the overarching concepts arranging all information handled by the system." +sidebar: suite_sidebar +permalink: suite-design-space-workspace-and-data-structures.html +--- + +Superalgos handles numerous concepts encompassing fields such as market information, trading strategies, visualization features, workflows, technical resources, and many more. + +All of these concepts are structured so that users may use them intuitively. Learning the Superalgos conceptual framework is the first step in that direction. + +## Design Space + +**{{site.data.concepts.design_space}}** + +In practical terms, the design space is the portion of the system you access when you pull up the sliding panel, hiding the charts in the process. + +## Workspace + +**{{site.data.concepts.workspace}}** + +It contains: + + * All hierarchies with all of their nodes. + + * Nodes that may be floating around detached from hierarchies. + + * Information regarding the physical position and status of all nodes within the design space, even those detached from the hierarchies. + +The workspace is not part of any of the hierarchies; instead, it contains them. + +{% include note.html content="Users may manage multiple workspaces, but only one workspace may be loaded in the system at any point." %} + +{% include tip.html content="Backing up your workspace is the best way to store all the information within the design space, ready to be deployed. Your workspace is saved at the browser level every time you make a change, but still, you should back up your workspace once in a while so that you can go back to past versions or recover from the occasional crash. Also, backups allow you to switch seamlessly from one workspace to another workspace." %} + +## Nodes + +**{{site.data.concepts.node}}** + +### Structure of Nodes + +{{site.data.concepts.structure_of_nodes}} + +As a consequence, structures of nodes are hierarchical structures, and a logical representation of how the concepts embodied by each node relate to each other. + +### Parent-Offspring Relationships + +{{site.data.concepts.parent-offspring_relationships}} + +The direction of the relationship is determined, in most cases, by the ability of a node to produce the offspring node. That is, the parent node is the one which, by software design, may produce the offspring node. + +### Attaching and Detaching Nodes + +{{site.data.concepts.chain}} + +This feature is useful when testing different configurations, rules or parameters, as it allows to keep alternatives handy in the workspace. + +[![Design-Space-Attach-Detach](https://user-images.githubusercontent.com/13994516/63227849-6d7e9b80-c1eb-11e9-9a02-6f760f383751.gif)](https://user-images.githubusercontent.com/13994516/63227849-6d7e9b80-c1eb-11e9-9a02-6f760f383751.gif) + +To detach a node, right-click on it and drag it away from the parent node. To attach a node, right-click on it and move it closer to the node you wish to attach it to. + +Nodes may be attached only to potential parents. The system limits the way in which nodes may be attached, according to the logic of the information they contain. + +{% include note.html content="Nodes may not be detached or attached to frozen nodes. You need to unfreeze them before attaching or detaching." %} + +{% include note.html content="The verbs *to chain* and *to attach* may be used interchangeably, as synonyms. Similarly, *to unchain* and *to detach* are both valid." %} \ No newline at end of file diff --git a/docs/pages/suite/suite-detachment-and-attachment-of-nodes.md b/docs/pages/suite/suite-detachment-and-attachment-of-nodes.md index a06148569..b871c72c7 100644 --- a/docs/pages/suite/suite-detachment-and-attachment-of-nodes.md +++ b/docs/pages/suite/suite-detachment-and-attachment-of-nodes.md @@ -10,7 +10,7 @@ toc: false This feature may be handy when testing different configurations, rules or parameters, as it allows to keep alternatives handy in the workspace. -[![Designer-Attach-Detach](https://user-images.githubusercontent.com/13994516/63227849-6d7e9b80-c1eb-11e9-9a02-6f760f383751.gif)](https://user-images.githubusercontent.com/13994516/63227849-6d7e9b80-c1eb-11e9-9a02-6f760f383751.gif) +[![Design-Space-Attach-Detach](https://user-images.githubusercontent.com/13994516/63227849-6d7e9b80-c1eb-11e9-9a02-6f760f383751.gif)](https://user-images.githubusercontent.com/13994516/63227849-6d7e9b80-c1eb-11e9-9a02-6f760f383751.gif) {% include note.html content="The verbs *to chain* and *to attach* may be used interchangeably, as synonyms. Similarly, *to unchain* and *to detach* are both valid." %} diff --git a/docs/pages/suite/suite-getting-ready-to-trade-live.md b/docs/pages/suite/suite-getting-ready-to-trade-live.md index f215990b7..ef2b62c86 100644 --- a/docs/pages/suite/suite-getting-ready-to-trade-live.md +++ b/docs/pages/suite/suite-getting-ready-to-trade-live.md @@ -20,8 +20,8 @@ As soon as you click *Run* in your session, your bot will be forward testing or The difference is that orders will now go to the exchange. -**For maximum efficiency, we recommend you run live trading sessions on the 01-min time period. Your bot will then be executed every 60 seconds to evaluate your strategy rules and decide if any action needs to be taken.** +**For maximum efficiency, we recommend you run live trading sessions on the 01-min time frame. Your bot will then be executed every 60 seconds to evaluate your strategy rules and decide if any action needs to be taken.** - This is important even if your strategy operates at a lower frequency, as running the live session at the 01-min time period guarantees that the trading bot will exit trades as soon as the one-minute candle closes tagging your stop or take profit target. On the contrary, if you run the live trading session at a time period higher than 01-min, slippage when closing the position may be considerably greater. + This is important even if your strategy operates at a lower frequency, as running the live session at the 01-min time frame guarantees that the trading bot will exit trades as soon as the one-minute candle closes tagging your stop or take profit target. On the contrary, if you run the live trading session at a time frame higher than 01-min, slippage when closing the position may be considerably greater. > **WARNING:** The Superalgos Platform is at a very early stage of development. As such, errors may occur at any point, including errors that can cause you to lose money. You are responsible for taking all precautions before starting trading live. Make sure you test with small amounts of money, the kind you can afford losing. Also, make sure you understand the [Execution Limitations](Execution-Limitations). Trade live at your own risk. \ No newline at end of file diff --git a/docs/pages/suite/suite-hierarchies.md b/docs/pages/suite/suite-hierarchies.md index 3a4e1dca7..0cf9a43ce 100644 --- a/docs/pages/suite/suite-hierarchies.md +++ b/docs/pages/suite/suite-hierarchies.md @@ -5,28 +5,16 @@ sidebar: suite_sidebar permalink: suite-hierarchies.html --- -{{site.data.concepts.hierarchy}} +**{{site.data.concepts.hierarchy}}** -On the designer, the head or parent node of each hierarchy is represented by the corresponding icon surrounded by an ever-present white ring, so that they are easier to locate within the workspace. +{% include note.html content="On the design space, the head or parent node of each hierarchy is represented by the corresponding icon surrounded by an ever-present white ring, so that they are easier to locate within the workspace." %} +{% include /crypto_ecosystem/crypto-ecosystem.md heading="##" icon="150-" adding="" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} +{% include /charting_space/charting-space.md heading="##" icon="150-" adding="" configuring="" charts="" content="yes" definition="bold" table="yes" more="no"%} -## Charting Space +{% include /trading_system/trading-system.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="yes"%} -{{site.data.charting_space.charting_space}} +{% include /network/network.md heading="##" icon="150-" adding="" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} -## Crypto Ecosystem - -{{site.data.crypto_ecosystem.crypto_ecosystem}} - -## Trading System - -{{site.data.trading_system.trading_system}} - -## Network - -{{site.data.network.network}} - -## Data Mine - -{{site.data.data_mine.data_mine}} +{% include /data_mine/data-mine.md heading="##" icon="150-" adding="####" configuring="####" starting="" content="yes" definition="bold" table="yes" more="yes"%} diff --git a/docs/pages/suite/suite-indicators-included-in-the-data-release.md b/docs/pages/suite/suite-indicators-included-in-the-data-release.md index 39a421b7e..81a294f9f 100644 --- a/docs/pages/suite/suite-indicators-included-in-the-data-release.md +++ b/docs/pages/suite/suite-indicators-included-in-the-data-release.md @@ -1,11 +1,11 @@ --- -title: Indicators Included in the Data Release -summary: "" +title: Masters indicators +summary: "A set of indicators built in the Masters data mine including candles, Bollinger Bands (BB), Percentage Bandwidth (%B), Bollinger Channels, and Bollinger Subchannels." sidebar: suite_sidebar -permalink: suite-indicators-included-in-the-data-release.html +permalink: suite-masters-indicators.html --- -The following indicators are those readily available as soon as you fire up the platform, as the corresponding datasets are included in the data release. +{% include note.html content="The following indicators are available under the Masters task managers in the data mining section of the network hierarchy." %} ## Candles diff --git a/docs/pages/suite/suite-indicators-not-included-in-the-data-release.md b/docs/pages/suite/suite-indicators-not-included-in-the-data-release.md index 7c2bf7e35..4fbb8064c 100644 --- a/docs/pages/suite/suite-indicators-not-included-in-the-data-release.md +++ b/docs/pages/suite/suite-indicators-not-included-in-the-data-release.md @@ -1,10 +1,12 @@ --- -title: Indicators Not Included in the Data Release -summary: "" +title: Sparta indicators +summary: "A set of indicators built in the Sparta data mine including Simple Moving Average (SMA), Exponential Moving Averege (EMA), Relative Strenght Index (RSI), and Moving Average convergence Divergence (MACD)." sidebar: suite_sidebar -permalink: suite-indicators-not-included-in-the-data-release.html +permalink: suite-sparta-indicators.html --- +{% include note.html content="The following indicators are available under the Sparta task managers in the data mining section of the network hierarchy." %} + ## Simple Moving Average (SMA) There are three products pre-configured to start calculating as soon as you start the corresponding task, each with different period configurations: diff --git a/docs/pages/suite/suite-internal-variables.md b/docs/pages/suite/suite-internal-variables.md index 8e8b61288..76dfe23d2 100644 --- a/docs/pages/suite/suite-internal-variables.md +++ b/docs/pages/suite/suite-internal-variables.md @@ -1,52 +1,33 @@ --- title: Internal Variables -summary: "" +summary: "The system makes cetain internal variables available to be used on strategies." sidebar: suite_sidebar permalink: suite-internal-variables.html --- These are properties managed internally by the platform that are made available for using within strategies. -```strategyStage```: Possible values are ```"No Stage"```, ```"Trigger Stage"```, ```"Open Stage"```, ```"Manage Stage"```, and ```"Close Stage"```. - -```stopLoss```: The value of your Stop in the active phase. - -```stopLossPhase```: The number of the active Stop phase (0, 1, 2, ...). - -```takeProfit```: The value of the Take Profit in the active phase. - -```takeProfitPhase```: The number of the active Stop phase (0, 1, 2, ...). - -```positionRate```: The price at which the position was taken. - -```positionSize```: The size of the position. - -```balanceAssetA```: Your BTC balance. - -```balanceAssetB```: Your USDT balance. - -```lastTradeProfitLoss```: The P&L value for the latest completed trade (roundtrip). - -```lastTradeROI```: The ROI of your latest trade. - -```profit```: The total P&L during the current execution period. - -```roundtrips```: The total number of trades in the current execution. - -```fails```: The number of trades resulting in losses in the current execution. - -```hits```: The number of trades resulting in profits in the current execution. - -```periods```: The number of candles evaluated in the current execution. - -```positionPeriods```: The number of candles in the current open position. - -```positionDays```: The number of days in the current open position. - -```distanceToLast.triggerOn```: The number of periods between the last Trigger On and the current candle. - -```distanceToLast.triggerOff```: The number of periods between the last Trigger Off and the current candle. - -```distanceToLast.takePosition```: The number of periods between the last Take Position and the current candle. - -```distanceToLast.closePosition```: The number of periods between the last Close Position and the current candle. +| Variable | Description | +|:---|:---| +| ```strategyStage``` | Possible values are ```"No Stage"```, ```"Trigger Stage"```, ```"Open Stage"```, ```"Manage Stage"```, and ```"Close Stage"```. | +| ```stopLoss``` | The value of your Stop in the active phase. | +| ```stopLossPhase``` | The number of the active Stop phase (0, 1, 2, ...). | +| ```takeProfit``` | The value of the Take Profit in the active phase. | +| ```takeProfitPhase``` | The number of the active Stop phase (0, 1, 2, ...). | +| ```positionRate``` | The price at which the position was taken. | +| ```positionSize``` | The size of the position. | +| ```balanceAssetA``` | Your BTC balance. | +| ```balanceAssetB``` | Your USDT balance. | +| ```lastTradeProfitLoss``` | The P&L value for the latest completed trade (roundtrip). | +| ```lastTradeROI``` | The ROI of your latest trade. | +| ```profit``` | The total P&L during the current execution period. | +| ```roundtrips``` | The total number of trades in the current execution. | +| ```fails``` | The number of trades resulting in losses in the current execution. | +| ```hits``` | The number of trades resulting in profits in the current execution. | +| ```periods``` | The number of candles evaluated in the current execution. | +| ```positionPeriods``` | The number of candles in the current open position. | +| ```positionDays``` | The number of days in the current open position. | +| ```distanceToLast.triggerOn``` | The number of periods between the last Trigger On and the current candle. | +| ```distanceToLast.triggerOff``` | The number of periods between the last Trigger Off and the current candle. | +| ```distanceToLast.takePosition``` | The number of periods between the last Take Position and the current candle. | +| ```distanceToLast.closePosition``` | The number of periods between the last Close Position and the current candle. | diff --git a/docs/pages/suite/suite-layers.md b/docs/pages/suite/suite-layers.md index 24561bd0b..7efab99cd 100644 --- a/docs/pages/suite/suite-layers.md +++ b/docs/pages/suite/suite-layers.md @@ -83,7 +83,7 @@ For the time being, the chart is fixed on the screen and the user may not move i ### Simple Moving Average (SMA) -[According to Investopedia](https://www.investopedia.com/terms/e/ema.asp), "A simple moving average (SMA) is an arithmetic moving average calculated by adding recent closing prices and then dividing that by the number of time periods in the calculation average. Short-term averages respond quickly to changes in the price of the underlying asset, while long-term averages are slow to react." +[According to Investopedia](https://www.investopedia.com/terms/e/ema.asp), "A simple moving average (SMA) is an arithmetic moving average calculated by adding recent closing prices and then dividing that by the number of time frames in the calculation average. Short-term averages respond quickly to changes in the price of the underlying asset, while long-term averages are slow to react." [![Layers-01-SMA](https://user-images.githubusercontent.com/13994516/71260423-217b6900-233b-11ea-9229-d838f8a071da.gif)](https://user-images.githubusercontent.com/13994516/71260423-217b6900-233b-11ea-9229-d838f8a071da.gif) diff --git a/docs/pages/suite/suite-multiple-forward-testing-and-live-trading-sessions.md b/docs/pages/suite/suite-multiple-forward-testing-and-live-trading-sessions.md index cd2a5aebb..390c45efa 100644 --- a/docs/pages/suite/suite-multiple-forward-testing-and-live-trading-sessions.md +++ b/docs/pages/suite/suite-multiple-forward-testing-and-live-trading-sessions.md @@ -9,7 +9,7 @@ The platform allows running multiple forward testing and live trading sessions a The one thing you need to be aware of is that—due to restrictions on API use imposed by exchanges—you may not use the same exchange API key with different processes. -If you ever need to create a new trading session, you will create a copy of an existing one by cloning the whole task. Once you drop the clone back on the Designer, the new task will have all of the nodes required for trading, including an *exchange account key*. +If you ever need to create a new trading session, you will create a copy of an existing one by cloning the whole task. Once you drop the clone back on the design space, the new task will have all of the nodes required for trading, including an *exchange account key*. Just make sure you don't use the same key on more than one session: you need to get a new API key from the exchange and edit the *exchange account key** accordingly. diff --git a/docs/pages/suite/suite-my-system-gets-slow.md b/docs/pages/suite/suite-my-system-gets-slow.md index 5442fd2d9..00719e8c2 100644 --- a/docs/pages/suite/suite-my-system-gets-slow.md +++ b/docs/pages/suite/suite-my-system-gets-slow.md @@ -11,13 +11,13 @@ If you experience such symptoms, there are several workarounds you may implement ## Display Less Data on the Charts -If you are zooming out too far in the horizontal time scale with too many candles on the screen, try zooming-in a bit or changing time periods so that candle density decreases. +If you are zooming out too far in the horizontal time scale with too many candles on the screen, try zooming-in a bit or changing time frames so that candle density decreases. You may also want to switch off the layers you may not be using. Remember, every piece of graphical information you see on screen represents data your system is reading from your disk and processing to display in a visual environment. ## Close Unused Hierarchies -The physics that govern nodes in the Designer help the hierarchical structure of information to self-organize. This comes at a cost in terms of processing power. +The physics that govern nodes in the design space help the hierarchical structure of information to self-organize. This comes at a cost in terms of processing power. Make sure the two exiting team hierarchies are closed: diff --git a/docs/pages/suite/suite-on-screen-errors-and-warnings.md b/docs/pages/suite/suite-on-screen-errors-and-warnings.md index fb6607130..246319802 100644 --- a/docs/pages/suite/suite-on-screen-errors-and-warnings.md +++ b/docs/pages/suite/suite-on-screen-errors-and-warnings.md @@ -9,6 +9,6 @@ It may happen that your simulation or live trading is not working as expected. T [![On-screen-errors](https://user-images.githubusercontent.com/13994516/63213696-b52ff500-c10f-11e9-9bc1-741ecb0858ef.gif)](https://user-images.githubusercontent.com/13994516/63213696-b52ff500-c10f-11e9-9bc1-741ecb0858ef.gif) -Bear in mind that when the split tab is fully closed, errors will no longer show up in the Designer, as shown in the below video: +Bear in mind that when the split tab is fully closed, errors will no longer show up in the design space, as shown in the below video: [![Error](https://user-images.githubusercontent.com/13994516/63213579-528a2980-c10e-11e9-8464-76cb4b369db4.gif)](https://user-images.githubusercontent.com/13994516/63213579-528a2980-c10e-11e9-8464-76cb4b369db4.gif) diff --git a/docs/pages/suite/suite-quick-overview.md b/docs/pages/suite/suite-quick-overview.md index fcad66b26..6787d5c7a 100644 --- a/docs/pages/suite/suite-quick-overview.md +++ b/docs/pages/suite/suite-quick-overview.md @@ -7,25 +7,25 @@ permalink: suite-quick-overview.html > **Start here:** Watch the [Superalgos Platform Quick Getting Started Guide](https://www.youtube.com/watch?v=_apiM49udL0) video for a quick intro. The video is slightly outdated in that the Superalgos Platform (the client version of the Platform) does not require a login and does not feature a menu on top. Otherwise, the content is still valid. -The first time you run the platform, you will see a screen split in half. The top half features the space used by the _Charts_ and the bottom half features the _Designer_. +The first time you run the platform, you will see a screen split in half. The top half features the space used by the _Charts_ and the bottom half features the _design space_. Use the control in the center of the turquoise bar to pull the bar up and down to make more room for either application. You may also use your keyboard as follows: -1. Alt + ↑ to close the Charts and open the Designer. -1. Alt + ↓ to close the Designer and open the Charts. -1. Alt + → to set the bar at the middle giving half of the screen to the Charts and the other half to the Designer. +1. Alt + ↑ to close the Charts and open the design space. +1. Alt + ↓ to close the design space and open the Charts. +1. Alt + → to set the bar at the middle giving half of the screen to the Charts and the other half to the design space. [![Overview-01-Separator](https://user-images.githubusercontent.com/13994516/67267448-9d2f7580-f4b2-11e9-8f5c-123f8b0f360b.gif)](https://user-images.githubusercontent.com/13994516/67267448-9d2f7580-f4b2-11e9-8f5c-123f8b0f360b.gif) -> **TIP:** Pulling the bar to the very top of the screen causes the Charts to stop consuming resources in your machine, and gives you an ample view of the Designer. +> **TIP:** Pulling the bar to the very top of the screen causes the Charts to stop consuming resources in your machine, and gives you an ample view of the design space. -**The Designer** is the place where you create. Think of the designer as your toolbox. This is where you will control every aspect of your data, your trading strategies and the overall behavior of the platform in general. +**The design space** is the place where you create. Think of the design space as your toolbox. This is where you will control every aspect of your data, your trading strategies and the overall behavior of the platform in general. [![Overview-02-Workspace](https://user-images.githubusercontent.com/13994516/67267449-9d2f7580-f4b2-11e9-9ae8-1eb1355de07d.gif)](https://user-images.githubusercontent.com/13994516/67267449-9d2f7580-f4b2-11e9-9ae8-1eb1355de07d.gif) -> **TIP:** Pulling the bar to the very bottom of the screen causes the Designer to stop consuming resources from your machine and offers a full-screen view of the Charts. The image above shows what you will see once you import your first *workspace* (you will learn about it in the next step). +> **TIP:** Pulling the bar to the very bottom of the screen causes the design space to stop consuming resources from your machine and offers a full-screen view of the Charts. The image above shows what you will see once you import your first *workspace* (you will learn about it in the next step). **The Charts** show indicators data along with the actions taken by strategies, integrated with market data. This is the section of the platform in which you will see and analyze the result of your work. diff --git a/docs/pages/suite/suite-references.md b/docs/pages/suite/suite-references.md index 2367dacd6..2b77ae3c1 100644 --- a/docs/pages/suite/suite-references.md +++ b/docs/pages/suite/suite-references.md @@ -5,36 +5,40 @@ sidebar: suite_sidebar permalink: suite-references.html --- -{{site.data.concepts.reference}} +**{{site.data.concepts.reference}}** -As such, *references* have a *direction* property relative to each of the nodes involved in the reference: the node establishing the reference sets an *outgoing* reference, while the one accepting the reference sets an *incoming* reference. +## Direction -For example, a session (testing or live) establishes an outgoing reference with a trading system. This allows the session to access the information within the whole trading system hierarchy, including strategies. At the trading system level, the same reference is viewed as an incoming reference. +References have a *direction* property relative to each of the nodes involved in the reference: the node establishing the reference sets an *outgoing* reference, while the one accepting the reference sets an *incoming* reference. + +For example, a session establishes an outgoing reference with a trading system. This allows the session to access the information within the whole trading system hierarchy, including strategies. At the trading system level, the same reference is viewed as an incoming reference. [![Sessions-03-Link-Session](https://user-images.githubusercontent.com/13994516/70355703-0e649580-1873-11ea-925e-1f0250148d2c.gif)](https://user-images.githubusercontent.com/13994516/70355703-0e649580-1873-11ea-925e-1f0250148d2c.gif) +## Scope + A reference established between nodes of any particular structure within a hierarchy is said to be an *internal* reference relative to the said structure of nodes. Similarly, a reference established with a node outside of the said structure, that is, in a different part of the hierarchy or in another hierarchy, is said to be an *external* reference. -Examples of internal references may be found in the Data Mine and Crypto Ecosystem hierarchies. For example, let's briefly look into one such case within a *plotter module*: +Examples of internal references may be found in the data mine and crypto ecosystem hierarchies. For example, let's briefly look into one such case within a plotter module: -The capture below shows the *shapes* node and several offspring objects: on one hand, several *polygons*; on the other hand, the *chart points* node. +The capture below shows the shapes node and several offspring nodes: on one hand, several polygons; on the other hand, the chart points node. [![Backups-04-Internal-references-intro-shapes](https://user-images.githubusercontent.com/13994516/71106204-316e3e00-21bf-11ea-8ba0-df5fe9d0000e.gif)](https://user-images.githubusercontent.com/13994516/71106204-316e3e00-21bf-11ea-8ba0-df5fe9d0000e.gif) -Notice that *vertices* under each polygon reference to *points* under the *chart points* node. +Notice that vertices under each polygon reference to points under the chart points node. This means that the node *shapes* feature several internal references. -The *backup*, *clone* and *share* operations described later in this section make different uses of the properties of references. We will cover the three of them extensively so that you may make the most of these features. +{% include note.html content="The *backup*, *clone* and *share* operations make different uses of the properties of references. We will cover the three of them extensively so that you may make the most of these features." %} ## Establishing and Removing References To establish a reference, right-click on the first node and drag it close to the target node. Grey rings show which nodes you may establish a reference with. In case there are multiple nodes that would accept the reference, the one closer to the node where the reference originates will have its ring highlighted. Releasing the mouse button establishes the reference, or *links* both nodes. -{% include note.html content="The reference is visually represented by a faint grey dotted line. Such line is visible only when both ends of the reference are visible." %} - -Throughout this documentation we may use the verb "*to link* interchangeably with *to establish a reference*, as synonyms. +The reference is visually represented by a faint grey dotted line. Such line is visible only when both ends of the reference are visible. To remove a reference or *delink* two nodes, simply right-click the node where the reference originates and make a dentle swipping motion away from the target node. -[![Link-01-link-and-delink](https://user-images.githubusercontent.com/13994516/71175267-7057ce80-2267-11ea-8e97-4cffaa14b993.gif)](https://user-images.githubusercontent.com/13994516/71175267-7057ce80-2267-11ea-8e97-4cffaa14b993.gif) \ No newline at end of file +[![Link-01-link-and-delink](https://user-images.githubusercontent.com/13994516/71175267-7057ce80-2267-11ea-8e97-4cffaa14b993.gif)](https://user-images.githubusercontent.com/13994516/71175267-7057ce80-2267-11ea-8e97-4cffaa14b993.gif) + +{% include note.html content="Throughout this documentation we may use the verbs *to link*, *to reference* or *to establish a reference* interchangeably, as synonyms." %} \ No newline at end of file diff --git a/docs/pages/suite/suite-run-your-first-backtest.md b/docs/pages/suite/suite-run-your-first-backtest.md index dbd10939a..4e8882875 100644 --- a/docs/pages/suite/suite-run-your-first-backtest.md +++ b/docs/pages/suite/suite-run-your-first-backtest.md @@ -15,7 +15,7 @@ To run your first backtest you will need a functional strategy. ## Import a Workspace -Go to the ```Superalgos Platform/Quick-Start-Examples``` folder, drag ```Share - Workspace - Combined Bull-run rider and Weak-hands buster.json``` and drop it on the _Designer_ to start with a workspace with functioning strategies. +Go to the ```Superalgos Platform/Quick-Start-Examples``` folder, drag ```Share - Workspace - Combined Bull-run rider and Weak-hands buster.json``` and drop it on the _design space_ to start with a workspace with functioning strategies. [![Getting-Started-Guide-02-Drop-Workspace](https://user-images.githubusercontent.com/13994516/67231208-2907ba00-f43f-11e9-82b4-d78c0ace4d0a.gif)](https://user-images.githubusercontent.com/13994516/67231208-2907ba00-f43f-11e9-82b4-d78c0ace4d0a.gif) @@ -25,9 +25,9 @@ Go to the ```Superalgos Platform/Quick-Start-Examples``` folder, drag ```Share - | :---: | :---: | :---: | :---: | :---: | |![task](https://user-images.githubusercontent.com/13994516/66308205-ca9eef80-e906-11e9-8864-f7dba886bc7d.png) | ![timeline](https://user-images.githubusercontent.com/13994516/67079956-73b1d980-f194-11e9-89e0-9c8d1ea2ad1d.png) | ![trading-engine](https://user-images.githubusercontent.com/13994516/69948042-2f358f80-14ef-11ea-9193-f49eeb67b51c.png) | ![process](https://user-images.githubusercontent.com/13994516/67079738-00a86300-f194-11e9-9f59-a4cc4ce6d56c.png) | ![session-backtesting](https://user-images.githubusercontent.com/13994516/66318052-e7452280-e91a-11e9-94a7-90ebe6ee6e62.png) | -Once on the Designer, hit Ctrl or ⌘ + Alt + T (*T* for *Testing*). This shortcut will take you to the *Network* hierachy of the Designer, where you will start the process to run a backtesting session. More precisely, it takes you to *Testing Sessions*, the *task manager* that controls testing sessions. +Once on the design space, hit Ctrl or ⌘ + Alt + T (*T* for *Testing*). This shortcut will take you to the *Network* hierachy of the design space, where you will start the process to run a backtesting session. More precisely, it takes you to *Testing Sessions*, the *task manager* that controls testing sessions. -Look around the task manager by clicking and dragging the black background of the Designer. You may also use the following keyboard key combinations to move around: +Look around the task manager by clicking and dragging the black background of the design space. You may also use the following keyboard key combinations to move around: 1. Ctrl or ⌘ + ← to pan to the left. 1. Ctrl or ⌘ + → to pan to the right. @@ -50,17 +50,17 @@ Notice the date progress notification displayed below the backtesting session no It may take anything between 2 to 10 minutes (depending on your machine's processing power) to finish. You can tell the process finished calculating the backtesting session once the progress date stops, and—eventually—disappears. -To see the backtest simulation on the charts, you first need to make sure that the *Layers Manager* for the corresponding session is visible in the Designer. This is what enables the corresponding simulation layers on the Layers Panel. +To see the backtest simulation on the charts, you first need to make sure that the *Layers Manager* for the corresponding session is visible in the design space. This is what enables the corresponding simulation layers on the Layers Panel. To do that, go back to the backtesting session and click ![plus](https://user-images.githubusercontent.com/13994516/70042962-121cc180-15c0-11ea-8322-018f78524f39.PNG) on the left-hand side. [![Backtesting-03-Layers](https://user-images.githubusercontent.com/13994516/70341075-65a63e00-1852-11ea-9ae4-3b58a26b3c8c.gif)](https://user-images.githubusercontent.com/13994516/70341075-65a63e00-1852-11ea-9ae4-3b58a26b3c8c.gif) -Then, you may pull down the horizontal bar to go to the charts and see the simulation. Make sure you are standing on the 1-hour time period. Notice the time box at the bottom of the charts: +Then, you may pull down the horizontal bar to go to the charts and see the simulation. Make sure you are standing on the 1-hour time frame. Notice the time box at the bottom of the charts: [![Getting-Started-Guide-06-Go-to-Charts](https://user-images.githubusercontent.com/13994516/67237146-fc599f80-f44a-11e9-8da4-c95fc6295d52.gif)](https://user-images.githubusercontent.com/13994516/67237146-fc599f80-f44a-11e9-8da4-c95fc6295d52.gif) -If you are not at the 1-hour time period use the wheel of your mouse while pointing at the charts to zoom in until you reach the 1-hour time period. You do this so that you may see the results of the backtesting session, which in the case of the example strategies, are calculated and plotted over the 1-hour charts. +If you are not at the 1-hour time frame use the wheel of your mouse while pointing at the charts to zoom in until you reach the 1-hour time frame. You do this so that you may see the results of the backtesting session, which in the case of the example strategies, are calculated and plotted over the 1-hour charts. [![Getting-Started-Guide-07-Zoom-In](https://user-images.githubusercontent.com/13994516/67237088-d7fdc300-f44a-11e9-8ae5-d3fd394ffc22.gif)](https://user-images.githubusercontent.com/13994516/67237088-d7fdc300-f44a-11e9-8ae5-d3fd394ffc22.gif) @@ -68,7 +68,7 @@ Now go the *Layers Panel* on the left-hand side of the screen and use the wheel [![Getting-Started-Guide-08-Turn-on-Layers](https://user-images.githubusercontent.com/13994516/67237090-d8965980-f44a-11e9-86ba-3eb1e6980ae2.gif)](https://user-images.githubusercontent.com/13994516/67237090-d8965980-f44a-11e9-86ba-3eb1e6980ae2.gif) -You may now navigate the charts by clicking and dragging, or by zooming in and out with the wheel of your mouse. If you change the time period, you will not see the simulated data, as each time period may hold its own set of simulations. +You may now navigate the charts by clicking and dragging, or by zooming in and out with the wheel of your mouse. If you change the time frame, you will not see the simulated data, as each time frame may hold its own set of simulations. [![Getting-Started-Guide-09-Navigate](https://user-images.githubusercontent.com/13994516/67237276-3e82e100-f44b-11e9-977f-a02da0857b38.gif)](https://user-images.githubusercontent.com/13994516/67237276-3e82e100-f44b-11e9-977f-a02da0857b38.gif) diff --git a/docs/pages/suite/suite-session-parameters.md b/docs/pages/suite/suite-session-parameters.md index cb1d9d1b3..361b5251a 100644 --- a/docs/pages/suite/suite-session-parameters.md +++ b/docs/pages/suite/suite-session-parameters.md @@ -103,13 +103,13 @@ Paper trading sessions only require a *finalDatetime*. If you do not set one eit } ``` -## Time Period +## Time Frame -| Time Period | +| Time Frame | | :---: | | ![time-period](https://user-images.githubusercontent.com/13994516/67087015-597ef800-f1a2-11e9-8a5e-712a13ef99d4.png) | -Testing sessions run in the time period specified in this parameter. +Testing sessions run in the time frame specified in this parameter. ```js { @@ -132,7 +132,7 @@ Available options at the sub-hour level are: 45-min ``` -Available options at larger time periods are: +Available options at larger time frames are: ``` 01-hs @@ -145,6 +145,6 @@ Available options at larger time periods are: 24-hs ``` -In the context of backtesting sessions, what time period you decide to run the session on depends on the strategies being tested. If strategies make decisions based on the 1 hour candle and above, then ```01-hs``` may be the best choice. However, if decisions are influenced by sub-hour candles then you should match the time periods accordingly. +In the context of backtesting sessions, what time frame you decide to run the session on depends on the strategies being tested. If strategies make decisions based on the 1 hour candle and above, then ```01-hs``` may be the best choice. However, if decisions are influenced by sub-hour candles then you should match the time frames accordingly. ->**NOTE:** In the context of live sessions, that is, paper trading, forward testing and live trading, you should run the session on the ```01-min``` time period so that the trading bot reacts fast when the price tags the take profit or stop loss targets. \ No newline at end of file +>**NOTE:** In the context of live sessions, that is, paper trading, forward testing and live trading, you should run the session on the ```01-min``` time frame so that the trading bot reacts fast when the price tags the take profit or stop loss targets. \ No newline at end of file diff --git a/docs/pages/suite/suite-simulation-layers.md b/docs/pages/suite/suite-simulation-layers.md index 5b2e41e41..c3daa3b04 100644 --- a/docs/pages/suite/suite-simulation-layers.md +++ b/docs/pages/suite/suite-simulation-layers.md @@ -13,7 +13,7 @@ permalink: suite-simulation-layers.html The layers manager allows you to determine which visualization layers will be available at the Layers Panel to plot the results of testing sessions over the charts. -The layers manager and its offspring nodes must be visible in the Designer +The layers manager and its offspring nodes must be visible in the design space Back on the charts, the following layers plot strategies' actions over the market data, providing a comprehensive set of visual clues showing how strategies would behave when trading. diff --git a/docs/pages/suite/suite-situations-conditions-formulas.md b/docs/pages/suite/suite-situations-conditions-formulas.md new file mode 100644 index 000000000..1878e02f5 --- /dev/null +++ b/docs/pages/suite/suite-situations-conditions-formulas.md @@ -0,0 +1,12 @@ +--- +title: Situations, Conditions and Formulas +summary: "Situations and conditions are used to define the specific market situations in which a certain event should be triggered. Formulas are used to dynamically determine the value of targets." +sidebar: suite_sidebar +permalink: suite-situations-conditions-formulas.html +--- + +{% include /trading_system/situation.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="yes"%} + +{% include /trading_system/condition.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="yes"%} + +{% include /trading_system/formula.md heading="##" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="yes"%} diff --git a/docs/pages/suite/suite-strategies.md b/docs/pages/suite/suite-strategies.md new file mode 100644 index 000000000..0687b30fa --- /dev/null +++ b/docs/pages/suite/suite-strategies.md @@ -0,0 +1,36 @@ +--- +title: Strategies +summary: "Strategies are defined as a sequence of stages." +sidebar: suite_sidebar +permalink: suite-strategies.html +--- + +{% include /trading_system/strategy.md heading="" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="yes"%} + +{% include /trading_system/trigger-stage.md heading="##" icon="150-" adding="" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} + +{% include /trading_system/trigger-on-event.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/trigger-off-event.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/take-position-event.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/open-stage.md heading="##" icon="150-" adding="" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} + +{% include /trading_system/phase-0.md heading="###" icon="" adding="" configuring="" starting="" content="no" definition="" table="yes" more="no"%} + +{% include /trading_system/initial-stop.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/initial-take-profit.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/position-size.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/position-rate.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/manage-stage.md heading="##" icon="150-" adding="" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} + +{% include /trading_system/next-phase-event.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/phase-1.md heading="###" icon="" adding="" configuring="" starting="" content="yes" definition="" table="yes" more="no"%} + +{% include /trading_system/close-stage.md heading="##" icon="150-" adding="" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} diff --git a/docs/pages/suite/suite-sysntax-overview.md b/docs/pages/suite/suite-sysntax-overview.md index 9f2eb869e..8cdf78e15 100644 --- a/docs/pages/suite/suite-sysntax-overview.md +++ b/docs/pages/suite/suite-sysntax-overview.md @@ -1,6 +1,6 @@ --- title: Syntax Overview -summary: "" +summary: "The syntax for writing conditions and formulas combine references to the data product name, the name of the property, and the time frame." sidebar: suite_sidebar permalink: suite-sysntax-overview.html --- @@ -15,19 +15,19 @@ To do that, you will use the following syntax: ```.productName``` + ```.property The above syntax returns the value of the property of the declared product at the latest closed candle. This is common throughout all available datasets. -## Specifying the Time Period +## Specifying the Time Frame -When building conditions and formulas, you may want to use analysis concerning different time periods. This is perfectly possible. +When building conditions and formulas, you may want to use analysis concerning different time frames. This is perfectly possible. -The variables explained further down this section, written as described for each indicator, are not valid unless they are preceeded by the declaration of the time period they refer to. +The variables explained further down this section, written as described for each indicator, are not valid unless they are preceeded by the declaration of the time frame they refer to. To do that, you need to preceed the above syntax with the following: -```chart.at``` + ```timeperiod``` +```chart.at``` + ```time frame``` Therefore, the complete syntax to build a valid statement is: -```chart.at``` + ```timeperiod``` + ```.productName``` + ```.propertyName``` +```chart.at``` + ```time frame``` + ```.productName``` + ```.propertyName``` For example: @@ -35,9 +35,9 @@ For example: The above statement compares the current 4 hours candle to the previous 4 hours candle. -The complete list of time periods available is: +The complete list of time frames available is: -| Time Period | Syntax | +| Time Frame | Syntax | | :---: | :---: | | 1 min | ```chart.at01min``` | | 2 min | ```chart.at02min``` | @@ -59,15 +59,13 @@ The complete list of time periods available is: | 12 hs | ```chart.at12hs``` | | 24 hs | ```chart.at24hs``` | -> **NOTE:** For brevity's sake, when discussing indicators further down this document, the declaration of the time period may sometimes be ommited. However, do remember the statement is only valid with the proper declaration of the time period. - ## Previous Property The ```previous``` property is a property common to all products that allows you to retrieve the value of the candle that closed previous to the last one. -The property is used with the following syntax: ```chart.at``` + ```timeperiod``` + ```.productName``` + ```.previous``` + ```.propertyName```. You may use the property on any of the indicators in a similar way. +The property is used with the following syntax: ```chart.at``` + ```time frame``` + ```.productName``` + ```.previous``` + ```.propertyName```. You may use the property on any of the indicators in a similar way. -In addition, you may use the ```previous``` property more than once, to retrieve values further in the past: ```chart.at``` + ```timeperiod``` + ```.productName``` + ```.previous.previous... ...previous``` + ```.propertyName``` +In addition, you may use the ```previous``` property more than once, to retrieve values further in the past: ```chart.at``` + ```time frame``` + ```.productName``` + ```.previous.previous... ...previous``` + ```.propertyName``` For example, ```chart.at1hs.candle.previous.previous.max``` returns the maximum value of two candles before the last closed candle at the 1-hour chart. @@ -79,7 +77,7 @@ The syntax is ```productName.[currentCandleIndex-n].propertyName``` where *curre For example, ```chart.at1hs.candle.[currentCandleIndex-5].max``` retrieves the maximum value of the fifth candle previous to the last closed candle at the 1-hour chart. -> **NOTE:** There is a technical limitation by which you may retrieve the value of a property up to a maximum of 24 hours in the past, whatever number of periods that may represent, depending on the time period you may be working on. For instance, if you are working on the 1 hour time period, you may fetch up to 23 candles before the last one. If you are working on the 1 minute time period, you may retrieve 1439 candles. +{% include note.html content="There is a technical limitation by which you may retrieve the value of a property up to a maximum of 24 hours in the past, whatever number of periods that may represent, depending on the time frame you may be working on. For instance, if you are working on the 1 hour time frame, you may fetch up to 23 candles before the last one. If you are working on the 1 minute time frame, you may retrieve 1439 candles." %} ## Comparison and Logical Operators diff --git a/docs/pages/suite/suite-trading-sessions.md b/docs/pages/suite/suite-trading-sessions.md index 790c19ab9..8ecf2a511 100644 --- a/docs/pages/suite/suite-trading-sessions.md +++ b/docs/pages/suite/suite-trading-sessions.md @@ -1,6 +1,6 @@ --- title: Trading Sessions -summary: "Strategies are defined in a sequence of stages." +summary: "Trading sessions enabling using the trading bot to perform tests, simulations, and live trading." sidebar: suite_sidebar permalink: suite-trading-sessions.html --- diff --git a/docs/pages/suite/suite-trading-systems.md b/docs/pages/suite/suite-trading-systems.md new file mode 100644 index 000000000..6ded03833 --- /dev/null +++ b/docs/pages/suite/suite-trading-systems.md @@ -0,0 +1,8 @@ +--- +title: Trading Systems +summary: "A trading system is a device that allows building strategies in a standardized manner." +sidebar: suite_sidebar +permalink: suite-trading-systems.html +--- + +{% include /trading_system/trading-system.md heading="" icon="150-" adding="####" configuring="" starting="" content="yes" definition="bold" table="yes" more="no"%} diff --git a/docs/pages/suite/suite-update-datasets.md b/docs/pages/suite/suite-update-datasets.md index dd7afce02..ecdf56a7a 100644 --- a/docs/pages/suite/suite-update-datasets.md +++ b/docs/pages/suite/suite-update-datasets.md @@ -17,7 +17,7 @@ The bots that keep your datasets up to date are too controlled by a task manager | :---: | :---: | :---: | :---: | :---: | :---: | | ![network](https://user-images.githubusercontent.com/13994516/66855353-59ed7800-ef83-11e9-8de9-db40971faa7b.png) | ![network-node](https://user-images.githubusercontent.com/13994516/66855357-5a860e80-ef83-11e9-917d-95cd8394588b.png) |![task](https://user-images.githubusercontent.com/13994516/66308205-ca9eef80-e906-11e9-8864-f7dba886bc7d.png) | ![timeline](https://user-images.githubusercontent.com/13994516/67079956-73b1d980-f194-11e9-89e0-9c8d1ea2ad1d.png) | ![bot-sensor](https://user-images.githubusercontent.com/13994516/67079734-000fcc80-f194-11e9-911d-2b537e4cb8f2.png) | ![bot-indicator](https://user-images.githubusercontent.com/13994516/67079733-000fcc80-f194-11e9-98d7-3426dd956d65.png) | -Open up the Designer section of the platform by dragging the horizontal bar upwards. You may also use Alt + ↑ on your keyboard. This shortcut closes the Charts and opens the Designer. +Open up the design space section of the platform by dragging the horizontal bar upwards. You may also use Alt + ↑ on your keyboard. This shortcut closes the Charts and opens the design space. Hit Ctrl or ⌘ + Alt + D (*D* for *Datasets*) to go to the *Masters Datasets* task manager that controls the aforementioned bots. Open the menu and click *Run All Tasks*. diff --git a/docs/pages/suite/suite-working-with-strategies.md b/docs/pages/suite/suite-working-with-strategies.md index 71e442385..465344db0 100644 --- a/docs/pages/suite/suite-working-with-strategies.md +++ b/docs/pages/suite/suite-working-with-strategies.md @@ -26,7 +26,7 @@ Becoming familiar with the Superalgos Trading Protocol will significantly increa * [Superalgos Trading Protocol V0.1 - the Long Version, for Beginner Traders](https://medium.com/superalgos/superalgos-protocol-v0-1-the-long-version-for-beginner-traders-f293f1cc6c13). -The Designer provides a graphic user interface (GUI) for traders to input the _rules_ and _formulas_ that determine the behavior of strategies. Traders need to define the rules to _trigger on_ and _trigger off_ each strategy, to _take a position_, to manage _take profit_ targets and _stops_. +The design space provides a graphic user interface (GUI) for traders to input the _rules_ and _formulas_ that determine the behavior of strategies. Traders need to define the rules to _trigger on_ and _trigger off_ each strategy, to _take a position_, to manage _take profit_ targets and _stops_. ## Situations and Conditions @@ -38,7 +38,7 @@ The protocol calls these sets of rules _situations_, in the sense that you are t In other words, you define _situations_ in which you wish a certain _event_ to happen (i.e.: trigger on the strategy, take a position, etc.) and each situation is described as a set of _conditions_ that need to be met for the _event_ to be triggered. -[![Designer-Situation-Condition-Code](https://user-images.githubusercontent.com/13994516/63052184-fe4d3280-bede-11e9-87b0-7fb67964450c.gif)](https://user-images.githubusercontent.com/13994516/63052184-fe4d3280-bede-11e9-87b0-7fb67964450c.gif) +[![Design-Space-Situation-Condition-Code](https://user-images.githubusercontent.com/13994516/63052184-fe4d3280-bede-11e9-87b0-7fb67964450c.gif)](https://user-images.githubusercontent.com/13994516/63052184-fe4d3280-bede-11e9-87b0-7fb67964450c.gif) The type of _statements_ you will use to define _conditions_ need to evaluate to _true_ or _false_. @@ -58,7 +58,7 @@ Thanks to the implementation of the Superalgos Trading Protocol, all strategies You may import any node—formulas, conditions, situations, phases, stages, complete strategies, complete trading systems, and even complete workspaces—simply by dragging and dropping them on the workspace. -[![Designer-01-Drop-Workspace](https://user-images.githubusercontent.com/13994516/67271115-34e49200-f4ba-11e9-9309-e9e7046384a0.gif)](https://user-images.githubusercontent.com/13994516/67271115-34e49200-f4ba-11e9-9309-e9e7046384a0.gif) +[![Design-Space-01-Drop-Workspace](https://user-images.githubusercontent.com/13994516/67271115-34e49200-f4ba-11e9-9309-e9e7046384a0.gif)](https://user-images.githubusercontent.com/13994516/67271115-34e49200-f4ba-11e9-9309-e9e7046384a0.gif) ## Working with Multiple Strategies