Scales Improvements
This commit is contained in:
1 parent
1a8a0c27ad
commit
31ff6e38e8
213 files changed
+5371
-2884
No files matched your search
+13
-9
@@ -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 {
|
||||
|
||||
+45
-27
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
+20
-185
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
-173
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,9 +343,11 @@ function newPanelsSpace () {
|
||||
}
|
||||
}
|
||||
if (container !== undefined) {
|
||||
container.space = 'Panels Space'
|
||||
return container
|
||||
}
|
||||
}
|
||||
thisObject.container.space = 'Panels Space'
|
||||
return thisObject.container
|
||||
}
|
||||
}
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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
|
||||
|
||||
+36
-8
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
}
|
||||
|
||||
function onMouseOver(event) {
|
||||
let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem)
|
||||
let userPosition = getDateFromPointAtBrowserCanvas(event, thisObject.container, coordinateSystem)
|
||||
userPositionDate = userPosition.valueOf()
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
+11
-8
@@ -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"
|
||||
+12
-7
@@ -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"
|
||||
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"
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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."
|
||||
@@ -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."
|
||||
+1
-1
@@ -73,7 +73,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
@@ -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." %}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
@@ -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." %}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
@@ -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." %}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% assign title = "Crypto Ecosystem" %}
|
||||
{% assign definition = site.data.crypto_ecosystem.crypto_ecosystem %}
|
||||
{% assign preposition = "" %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
@@ -48,8 +48,6 @@
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% assign title = "Crypto Exchanges" %}
|
||||
{% assign definition = site.data.crypto_ecosystem.crypto_exchanges %}
|
||||
{% assign preposition = "" %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% assign title = "User Keys" %}
|
||||
{% assign definition = site.data.crypto_ecosystem.user_keys %}
|
||||
{% assign preposition = "" %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
@@ -61,7 +61,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}}
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "XXXXXXXXXXXXXXXX" %}
|
||||
{% assign definition = site.data.data_mine.XXXXXXXXXXXXXXXX %}
|
||||
{% assign preposition = "XXXXXXXXXXXXXXXX" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,106 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Calculations Procedure" %}
|
||||
{% assign definition = site.data.data_mine.calculation_procedure %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Chart Points" %}
|
||||
{% assign definition = site.data.data_mine.chart_points %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a chart points node, select *Add Chart Points* on the shapes menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Data Building Procedure" %}
|
||||
{% assign definition = site.data.data_mine.data_building_procedure %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,106 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Data Dependency" %}
|
||||
{% assign definition = site.data.data_mine.data_dependency %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about data dependencies
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
[](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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about data dependencies
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Data Formula" %}
|
||||
{% assign definition = site.data.data_mine.data_formula %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a data formula, select *Add Data Formula* on the plotter panel menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Data Mine" %}
|
||||
{% assign definition = site.data.data_mine.data_mine %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a data mine, select *Add Data Mine* on the workspace node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,139 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Dataset Definition" %}
|
||||
{% assign definition = site.data.data_mine.dataset_definition %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a dataset definition, select *Add Dataset Definition* on the bot's node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,104 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Execution Finished Event" %}
|
||||
{% assign definition = site.data.data_mine.execution_finished_event %}
|
||||
{% assign preposition = "an" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
[](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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,104 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Execution Started Event" %}
|
||||
{% assign definition = site.data.data_mine.execution_started_event %}
|
||||
{% assign preposition = "an" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,104 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Formula" %}
|
||||
{% assign definition = site.data.data_mine.formula %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a formula, select *Add Formula* on the record property menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Indicator Bot" %}
|
||||
{% assign definition = site.data.data_mine.indicator_bot %}
|
||||
{% assign preposition = "an" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,102 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "JavaScript Code" %}
|
||||
{% assign definition = site.data.data_mine.javascript_code %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a JavaScript code node, select *Add Code* on the corresponding parent node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Output Dataset" %}
|
||||
{% assign definition = site.data.data_mine.output_dataset %}
|
||||
{% assign preposition = "an" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
[](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." %}
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,121 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Panel Data" %}
|
||||
{% assign definition = site.data.data_mine.panel_data %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a panel data node, select *Add Panel Data* on the plotter panel menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Plotter Module" %}
|
||||
{% assign definition = site.data.data_mine.plotter_module %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
[](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." %}
|
||||
|
||||
[](https://user-images.githubusercontent.com/13994516/71016079-eab41180-20f4-11ea-8afb-96321f9c68d8.gif)
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a plotter module, select *Add Plotter Module* on the plotter node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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``` |  |
|
||||
| ```Histogram``` |  |
|
||||
| ```Band``` |  |
|
||||
| ```Moving Average``` |  |
|
||||
| ```Oscillator``` |  |
|
||||
| ```Trend``` |  |
|
||||
|
||||
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"```)
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Plotter Panel" %}
|
||||
{% assign definition = site.data.data_mine.plotter_panel %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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).
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a plotter panel, select *Add Plotter Panel* on the plotter module node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Plotter" %}
|
||||
{% assign definition = site.data.data_mine.plotter %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,168 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Point Formula" %}
|
||||
{% assign definition = site.data.data_mine.point_formula %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a point formula, select *Add Point Formula* on the point node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,102 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Point" %}
|
||||
{% assign definition = site.data.data_mine.point %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a point, select *Add Point* on the chart points node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Polygon Body" %}
|
||||
{% assign definition = site.data.data_mine.polygon_body %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about polygon bodies
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about polygon bodies
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a polygon body, select *Add Polygon Body* on the polygon node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Polygon Border" %}
|
||||
{% assign definition = site.data.data_mine.polygon_border %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a polygon border, select *Add Polygon Border* on the polygon node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,108 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Polygon Vertex" %}
|
||||
{% assign definition = site.data.data_mine.polygon_vertex %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
Vertices are the main element defining polygons. Once created, each vertex must establish a reference to the corresponding point in the charts point.
|
||||
|
||||
[](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." %}
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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" %}
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,102 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Polygon" %}
|
||||
{% assign definition = site.data.data_mine.polygon %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a polygon, select *Add Polygon* on the shapes node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,105 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Procedure Initialization" %}
|
||||
{% assign definition = site.data.data_mine.procedure_initialization %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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 = []
|
||||
```
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,130 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Procedure Loop" %}
|
||||
{% assign definition = site.data.data_mine.procedure_loop %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,188 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Process Definition" %}
|
||||
{% assign definition = site.data.data_mine.process_definition %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Process Dependencies" %}
|
||||
{% assign definition = site.data.data_mine.process_depedencies %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,100 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Process Output" %}
|
||||
{% assign definition = site.data.data_mine.process_output %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,116 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Product Definition" %}
|
||||
{% assign definition = site.data.data_mine.product_definition %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,108 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Record Definition" %}
|
||||
{% assign definition = site.data.data_mine.record_definition %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
[](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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,122 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Record Property" %}
|
||||
{% assign definition = site.data.data_mine.record_property %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about record properties
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about record properties
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a record property, select *Add Record Property* on the bot's node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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.
|
||||
|
||||
[](https://user-images.githubusercontent.com/13994516/69139160-3ce72000-0ac0-11ea-9566-a259c9ea6194.gif)
|
||||
|
||||
The image above shows a record definition with four record properties.
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Shapes" %}
|
||||
{% assign definition = site.data.data_mine.shapes %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
[](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
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a shapes node, select *Add Shapes* on the plotter module menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,122 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Status Dependency" %}
|
||||
{% assign definition = site.data.data_mine.status_dependency %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about status dependencies
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
[](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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about status dependencies
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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." %}
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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```.
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,102 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Status Report" %}
|
||||
{% assign definition = site.data.data_mine.status_report %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,128 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Style Condition" %}
|
||||
{% assign definition = site.data.data_mine.style_condition %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
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.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a style condition, select *Add Style Condition* on a polygon border or polygon body node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Editing a {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,166 @@
|
||||
<!--------------------------------------------- TITLE AND DEFINITION starts -->
|
||||
|
||||
{% assign title = "Style" %}
|
||||
{% assign definition = site.data.data_mine.style %}
|
||||
{% assign preposition = "a" %}
|
||||
{% assign plural = "s" %}
|
||||
|
||||
<!--------------------------------------------- TITLE AND DEFINITION ends -->
|
||||
|
||||
{% if include.heading != "" %}
|
||||
{{include.heading}} {{title}}
|
||||
{% endif %}
|
||||
|
||||
{% if include.icon != "no" %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
<table class="definitionTable"><tr><td>
|
||||
{% endif %}
|
||||
|
||||
<img src='images/icons/{{include.icon}}{{ title | downcase | replace: " ", "-" }}.png' />
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td><td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.definition == "bold" %}
|
||||
|
||||
<strong>{{ definition }}</strong>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ definition }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.table == "yes" and include.icon != "no" %}
|
||||
</td></tr></table>
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content == "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.content != "no" %}
|
||||
|
||||
<!--------------------------------------------- CONTENT starts -->
|
||||
|
||||
A style applied to a polygon body or a polygon border node acts as the default style.
|
||||
|
||||
<!--------------------------------------------- CONTENT ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" and include.content != "more" %}
|
||||
<details><summary class="nobr">Click to learn more about {{ title | downcase }}{{plural}}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
{% if include.adding != "" %}
|
||||
|
||||
{{include.adding}} Adding {{preposition}} {{title}} Node
|
||||
|
||||
<!--------------------------------------------- ADDING starts -->
|
||||
|
||||
To add a style, select *Add Style* on a polygon border or polygon body node menu.
|
||||
|
||||
<!--------------------------------------------- ADDING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.configuring != "" %}
|
||||
|
||||
{{include.configuring}} Configuring the {{title}}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING starts -->
|
||||
|
||||
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 | <span style="display: block; background: RGB(48, 48, 54); border: 1px solid black;"> </span> |
|
||||
| ```LIGHT``` | 234, 226, 222 | <span style="display: block; background: RGB(234, 226, 222); border: 1px black; border: 1px solid black;"> </span> |
|
||||
| ```GREY``` | 150, 150, 150 | <span style="display: block; background: RGB(150, 150, 150); border: 1px solid black;"> </span> |
|
||||
| ```LIGHT_GREY``` | 247, 247, 247 | <span style="display: block; background: RGB(247, 247, 247); border: 1px solid black;"> </span> |
|
||||
| ```WHITE``` | 255, 255, 255 | <span style="display: block; background: RGB(255, 255, 255); border: 1px solid black;"> </span> |
|
||||
| ```BLACK``` | 0, 0, 0 | <span style="display: block; background: RGB(0, 0, 0); border: 1px solid black;"> </span> |
|
||||
| ```GOLDEN_ORANGE``` | 240, 162, 2 | <span style="display: block; background: RGB(240, 162, 2); border: 1px solid black;"> </span> |
|
||||
| ```RUSTED_RED``` | 204, 88, 53 | <span style="display: block; background: RGB(204, 88, 53); border: 1px solid black;"> </span> |
|
||||
| ```GREEN``` | 188, 214, 67 | <span style="display: block; background: RGB(188, 214, 67); border: 1px solid black;"> </span> |
|
||||
| ```RED``` | 223, 70, 60 | <span style="display: block; background: RGB(223, 70, 60); border: 1px solid black;"> </span> |
|
||||
| ```PATINATED_TURQUOISE``` | 27, 153, 139 | <span style="display: block; background: RGB(27, 153, 139); border: 1px solid black;"> </span> |
|
||||
| ```TITANIUM_YELLOW``` | 244, 228, 9 | <span style="display: block; background: RGB(244, 228, 9); border: 1px solid black;"> </span> |
|
||||
| ```MANGANESE_PURPLE``` | 91,80, 122 | <span style="display: block; background: RGB(91,80, 122); border: 1px solid black;"> </span> |
|
||||
| ```TURQUOISE``` | 74, 207, 217 | <span style="display: block; background: RGB(74, 207, 217); border: 1px solid black;"> </span> |
|
||||
| ```DARK_TURQUOISE``` | 2, 149, 170 | <span style="display: block; background: RGB(2, 149, 170); border: 1px solid black;"> </span> |
|
||||
|
||||
* ```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." %}
|
||||
|
||||
<!--------------------------------------------- CONFIGURING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.starting != "" %}
|
||||
|
||||
{{include.starting}} Starting {{preposition}} {{title}}
|
||||
|
||||
<!--------------------------------------------- STARTING starts -->
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
<!--------------------------------------------- STARTING ends -->
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if include.more == "yes" %}
|
||||
</details>
|
||||
{% endif %}
|
||||
Loaded 100 of 213 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user