Investment Plan added

This commit is contained in:
Luis Fernando Molina committed 2019-05-09 15:21:35 +02:00
1 parent c9ed3cb78e
commit 6eb8e0a8b7
6 files changed
+125 -117

No files matched your search

+38 -10
View File
@@ -68,15 +68,15 @@ function newStrategyPart () {
let menuItemsInitialValues = []
switch (thisObject.payload.node.type) {
case 'Strategy': {
imagePath = 'Images/icons/style-01/quality.png'
case 'Investment Plan': {
imagePath = 'Images/icons/style-01/analysis.png'
menuItemsInitialValues = [
{
action: 'Reload Strategy',
action: 'Reload Investment Plan',
actionFunction: thisObject.payload.onMenuItemClick,
label: 'Reload Last Saved',
label: 'Reload',
visible: false,
imagePathOn: 'Images/icons/style-01/pixel.png',
imagePathOn: 'Images/icons/style-01/vector.png',
imagePathOff: 'Images/icons/style-01/target.png',
rawRadius: 8,
targetRadius: 0,
@@ -84,7 +84,7 @@ function newStrategyPart () {
angle: -60
},
{
action: 'Save Strategy',
action: 'Save Investment Plan',
actionFunction: thisObject.payload.onMenuItemClick,
label: 'Save Changes',
visible: false,
@@ -96,11 +96,11 @@ function newStrategyPart () {
angle: -20
},
{
action: 'Delete Strategy',
action: 'New Strategy',
actionFunction: thisObject.payload.onMenuItemClick,
label: 'Delete This Strategy',
label: 'New Strategy',
visible: false,
imagePathOn: 'Images/icons/style-01/trash.png',
imagePathOn: 'Images/icons/style-01/quality.png',
imagePathOff: 'Images/icons/style-01/target.png',
rawRadius: 8,
targetRadius: 0,
@@ -121,6 +121,35 @@ function newStrategyPart () {
}]
break
}
case 'Strategy': {
imagePath = 'Images/icons/style-01/quality.png'
menuItemsInitialValues = [
{
action: 'Delete Strategy',
actionFunction: thisObject.payload.onMenuItemClick,
label: 'Delete This Strategy',
visible: false,
imagePathOn: 'Images/icons/style-01/trash.png',
imagePathOff: 'Images/icons/style-01/target.png',
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
angle: -20
},
{
action: 'Open Settings',
actionFunction: thisObject.payload.onMenuItemClick,
label: 'Settings',
visible: false,
imagePathOn: 'Images/icons/style-01/tools.png',
imagePathOff: 'Images/icons/style-01/target.png',
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
angle: 20
}]
break
}
case 'Strategy Entry Event': {
imagePath = 'Images/icons/style-01/startup.png'
menuItemsInitialValues = [
@@ -601,4 +630,3 @@ function newStrategyPart () {
}
}
}
+4
View File
@@ -42,6 +42,10 @@ function newStrategyPartConstructor () {
const FRICTION = 0.97
switch (payload.node.type) {
case 'Investment Plan': {
level_1()
break
}
case 'Strategy': {
level_1()
break
-33
View File
@@ -44,39 +44,6 @@ function newStrategyPartTitle () {
function initialize (payload) {
thisObject.payload = payload
switch (payload.node.type) {
case 'Strategy': {
break
}
case 'Strategy Entry Event': {
break
}
case 'Strategy Exit Event': {
break
}
case 'Trade Entry Event': {
break
}
case 'Stop': {
break
}
case 'Take Profit': {
break
}
case 'Phase': {
break
}
case 'Situation': {
break
}
case 'Condition': {
break
}
default: {
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> Part Type not Recognized -> type = ' + payload.node.type) }
}
}
selfFocusEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onFocus', onFocus)
selfNotFocuskEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onNotFocus', onNotFocus)
selfMouseClickEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseClick', onMouseClick)