Modify: 'whileAtStage_whenToRun' -> 'whileAtStageWhenToRun'

This commit is contained in:
Philip Love committed 2021-05-14 11:32:37 -04:00
1 parent 0b566f59c4
commit 9cc2bbdee2
2 files changed
+4 -11

No files matched your search

@@ -23,18 +23,11 @@
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity"
},
{
"action": "Copy Node Path",
"label": "Copy Node Path",
"iconPathOn": "copy-path",
"iconPathOff": "copy-path",
"actionFunction": "payload.executeAction"
}
}
],
"addLeftIcons": true,
"initialValues": {
"config": "{ \n \"runWhenEnteringStage\": false, \n \"runWhenExitingStage\": false, \n \"runWhileAtStage\": false, \n \"WhileAtStage_whenToRun\": \"first|last\" \n}"
"config": "{ \n \"runWhenEnteringStage\": false, \n \"runWhenExitingStage\": false, \n \"runWhileAtStage\": false, \n \"whileAtStageWhenToRun\": \"first|last\" \n}"
},
"editors": {
"config": true
@@ -1256,7 +1256,7 @@ exports.newSuperalgosBotModulesTradingStages = function (processIndex) {
let tradingSystemStage = getTradingSystemStage(stage);
if (tradingSystemStage.userDefinedCode !== undefined) {
if (status === 'Running' && when !== tradingSystemStage.userDefinedCode.config.WhileAtStage_whenToRun) { return; }
if (status === 'Running' && when !== tradingSystemStage.userDefinedCode.config.whileAtStageWhenToRun) { return; }
switch(status) {
case 'Open' : {
@@ -1267,7 +1267,7 @@ exports.newSuperalgosBotModulesTradingStages = function (processIndex) {
}
case 'Running' : {
if (tradingSystemStage.userDefinedCode.config.runWhileAtStage &&
tradingSystemStage.userDefinedCode.config.WhileAtStage_whenToRun === when) {
tradingSystemStage.userDefinedCode.config.whileAtStageWhenToRun === when) {
tradingSystem.evalUserCode(tradingSystemStage, 'User Defined Code');
}
break;