Refactoring Simulation record done
This commit is contained in:
1 parent
0d2b27b322
commit
c250615574
5 files changed
+99
-100
No files matched your search
+16
-16
@@ -375,8 +375,8 @@
|
||||
record.begin = dailyFile[1][i][0];
|
||||
record.end = dailyFile[1][i][1];
|
||||
record.strategyIndex = dailyFile[1][i][2];
|
||||
record.stopLossPhase = dailyFile[1][i][3];
|
||||
record.takeProfitPhase = dailyFile[1][i][4];
|
||||
record.variable_current_position_stopLoss_phase = dailyFile[1][i][3];
|
||||
record.variable_current_position_takeProfit_phase = dailyFile[1][i][4];
|
||||
record.conditions = dailyFile[1][i][5];
|
||||
record.formulaErrors = dailyFile[1][i][6];
|
||||
record.formulaValues = dailyFile[1][i][7];
|
||||
@@ -446,8 +446,8 @@
|
||||
record.begin = marketFile[1][i][0];
|
||||
record.end = marketFile[1][i][1];
|
||||
record.strategyIndex = marketFile[1][i][2];
|
||||
record.stopLossPhase = marketFile[1][i][3];
|
||||
record.takeProfitPhase = marketFile[1][i][4];
|
||||
record.variable_current_position_stopLoss_phase = marketFile[1][i][3];
|
||||
record.variable_current_position_takeProfit_phase = marketFile[1][i][4];
|
||||
record.conditions = marketFile[1][i][5];
|
||||
record.formulaErrors = marketFile[1][i][6];
|
||||
record.formulaValues = marketFile[1][i][7];
|
||||
@@ -650,7 +650,7 @@
|
||||
|
||||
for (let p = 0; p < initialDefinition.stopLoss.phases.length; p++) {
|
||||
|
||||
if (record.strategyIndex === j && record.stopLossPhase === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_stopLoss_phase === p) {
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.stopLoss.phases[p].payload.uiObject.isExecuting = true
|
||||
} else {
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.stopLoss.phases[p].payload.uiObject.isExecuting = false
|
||||
@@ -663,13 +663,13 @@
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.stopLoss.phases[p].formula.payload.uiObject.setErrorMessage(openStage.initialDefinition.stopLoss.phases[p].formula.error)
|
||||
|
||||
if (record.formulaErrors[formulaErrorsIndex] !== "") {
|
||||
if (record.strategyIndex === j && record.stopLossPhase === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_stopLoss_phase === p) {
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.stopLoss.phases[p].formula.payload.uiObject.setErrorMessage(record.formulaErrors[formulaErrorsIndex])
|
||||
}
|
||||
}
|
||||
formulaErrorsIndex++
|
||||
|
||||
if (record.strategyIndex === j && record.stopLossPhase === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_stopLoss_phase === p) {
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.stopLoss.phases[p].formula.payload.uiObject.setValue(record.formulaValues[formulaValuesIndex])
|
||||
}
|
||||
formulaValuesIndex++
|
||||
@@ -735,7 +735,7 @@
|
||||
|
||||
for (let p = 0; p < initialDefinition.takeProfit.phases.length; p++) {
|
||||
|
||||
if (record.strategyIndex === j && record.takeProfitPhase === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_takeProfit_phase === p) {
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.takeProfit.phases[p].payload.uiObject.isExecuting = true
|
||||
} else {
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.takeProfit.phases[p].payload.uiObject.isExecuting = false
|
||||
@@ -748,13 +748,13 @@
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.takeProfit.phases[p].formula.payload.uiObject.setErrorMessage(openStage.initialDefinition.takeProfit.phases[p].formula.error)
|
||||
|
||||
if (record.formulaErrors[formulaErrorsIndex] !== "") {
|
||||
if (record.strategyIndex === j && record.takeProfitPhase === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_takeProfit_phase === p) {
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.takeProfit.phases[p].formula.payload.uiObject.setErrorMessage(record.formulaErrors[formulaErrorsIndex])
|
||||
}
|
||||
}
|
||||
formulaErrorsIndex++
|
||||
|
||||
if (record.strategyIndex === j && record.takeProfitPhase === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_takeProfit_phase === p) {
|
||||
designerTradingSystem.strategies[j].openStage.initialDefinition.takeProfit.phases[p].formula.payload.uiObject.setValue(record.formulaValues[formulaValuesIndex])
|
||||
}
|
||||
formulaValuesIndex++
|
||||
@@ -833,7 +833,7 @@
|
||||
|
||||
for (let p = 0; p < manageStage.stopLoss.phases.length; p++) {
|
||||
|
||||
if (record.strategyIndex === j && record.stopLossPhase - 1 === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_stopLoss_phase - 1 === p) {
|
||||
designerTradingSystem.strategies[j].manageStage.stopLoss.phases[p].payload.uiObject.isExecuting = true
|
||||
} else {
|
||||
designerTradingSystem.strategies[j].manageStage.stopLoss.phases[p].payload.uiObject.isExecuting = false
|
||||
@@ -846,12 +846,12 @@
|
||||
designerTradingSystem.strategies[j].manageStage.stopLoss.phases[p].formula.payload.uiObject.setErrorMessage(manageStage.stopLoss.phases[p].formula.error)
|
||||
|
||||
if (record.formulaErrors[formulaErrorsIndex] !== "") {
|
||||
if (record.strategyIndex === j && record.stopLossPhase - 1 === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_stopLoss_phase - 1 === p) {
|
||||
designerTradingSystem.strategies[j].manageStage.stopLoss.phases[p].formula.payload.uiObject.setErrorMessage(record.formulaErrors[formulaErrorsIndex])
|
||||
}
|
||||
}
|
||||
formulaErrorsIndex++
|
||||
if (record.strategyIndex === j && record.stopLossPhase - 1 === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_stopLoss_phase - 1 === p) {
|
||||
designerTradingSystem.strategies[j].manageStage.stopLoss.phases[p].formula.payload.uiObject.setValue(record.formulaValues[formulaValuesIndex])
|
||||
}
|
||||
formulaValuesIndex++
|
||||
@@ -917,7 +917,7 @@
|
||||
|
||||
for (let p = 0; p < manageStage.takeProfit.phases.length; p++) {
|
||||
|
||||
if (record.strategyIndex === j && record.takeProfitPhase - 1 === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_takeProfit_phase - 1 === p) {
|
||||
designerTradingSystem.strategies[j].manageStage.takeProfit.phases[p].payload.uiObject.isExecuting = true
|
||||
} else {
|
||||
designerTradingSystem.strategies[j].manageStage.takeProfit.phases[p].payload.uiObject.isExecuting = false
|
||||
@@ -930,13 +930,13 @@
|
||||
designerTradingSystem.strategies[j].manageStage.takeProfit.phases[p].formula.payload.uiObject.setErrorMessage(manageStage.takeProfit.phases[p].formula.error)
|
||||
|
||||
if (record.formulaErrors[formulaErrorsIndex] !== "") {
|
||||
if (record.strategyIndex === j && record.takeProfitPhase - 1 === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_takeProfit_phase - 1 === p) {
|
||||
designerTradingSystem.strategies[j].manageStage.takeProfit.phases[p].formula.payload.uiObject.setErrorMessage(record.formulaErrors[formulaErrorsIndex])
|
||||
}
|
||||
}
|
||||
formulaErrorsIndex++
|
||||
|
||||
if (record.strategyIndex === j && record.takeProfitPhase - 1 === p) {
|
||||
if (record.strategyIndex === j && record.variable_current_position_takeProfit_phase - 1 === p) {
|
||||
designerTradingSystem.strategies[j].manageStage.takeProfit.phases[p].formula.payload.uiObject.setValue(record.formulaValues[formulaValuesIndex])
|
||||
}
|
||||
formulaValuesIndex++
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
record.begin = dailyFile[i][0];
|
||||
record.end = dailyFile[i][1];
|
||||
record.status = dailyFile[i][2];
|
||||
record.record.variable_last_position_ROI = dailyFile[i][3];
|
||||
record.variable_last_position_ROI = dailyFile[i][3];
|
||||
record.beginRate = dailyFile[i][4];
|
||||
record.endRate = dailyFile[i][5];
|
||||
record.exitType = dailyFile[i][6];
|
||||
@@ -432,7 +432,7 @@
|
||||
record.begin = marketFile[i][0];
|
||||
record.end = marketFile[i][1];
|
||||
record.status = marketFile[i][2];
|
||||
record.record.variable_last_position_ROI = marketFile[i][3];
|
||||
record.variable_last_position_ROI = marketFile[i][3];
|
||||
record.beginRate = marketFile[i][4];
|
||||
record.endRate = marketFile[i][5];
|
||||
record.exitType = marketFile[i][6];
|
||||
@@ -541,10 +541,10 @@
|
||||
line1 = 'Open Position';
|
||||
}
|
||||
|
||||
if (record.record.variable_last_position_ROI < 0) {
|
||||
line2 = 'ROI:' + (record.record.variable_last_position_ROI).toFixed(2) + ' %';
|
||||
if (record.variable_last_position_ROI < 0) {
|
||||
line2 = 'ROI:' + (record.variable_last_position_ROI).toFixed(2) + ' %';
|
||||
} else {
|
||||
line2 = 'ROI:' + (record.record.variable_last_position_ROI).toFixed(2) + ' %';
|
||||
line2 = 'ROI:' + (record.variable_last_position_ROI).toFixed(2) + ' %';
|
||||
}
|
||||
|
||||
/* Draw the triangle that represents the trade. */
|
||||
@@ -559,7 +559,7 @@
|
||||
|
||||
let opacity = '0.25';
|
||||
|
||||
if (record.record.variable_last_position_ROI > 0) {
|
||||
if (record.variable_last_position_ROI > 0) {
|
||||
browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.PATINATED_TURQUOISE + ', ' + opacity + ')';
|
||||
browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.GREEN + ', ' + opacity + ')';
|
||||
} else {
|
||||
|
||||
+49
-50
@@ -366,25 +366,25 @@
|
||||
record.variable_episode_count_periods = dailyFile[i][12];
|
||||
record.variable_episode_stat_days = dailyFile[i][13];
|
||||
record.variable_episode_stat_anualizedRateOfReturn = dailyFile[i][14];
|
||||
record.record.variable_current_position_rate = dailyFile[i][15];
|
||||
record.record.variable_last_position_ROI = dailyFile[i][16];
|
||||
record.variable_current_position_rate = dailyFile[i][15];
|
||||
record.variable_last_position_ROI = dailyFile[i][16];
|
||||
record.strategy = dailyFile[i][17];
|
||||
record.takeProfit = dailyFile[i][18];
|
||||
record.stopLossPhase = dailyFile[i][19];
|
||||
record.takeProfitPhase = dailyFile[i][20];
|
||||
record.positionSize = dailyFile[i][21]; // 25 is the message for the executor
|
||||
record.initialBalanceA = dailyFile[i][22];
|
||||
record.minimunBalanceA = dailyFile[i][23];
|
||||
record.maximunBalanceA = dailyFile[i][24];
|
||||
record.initialBalanceB = dailyFile[i][25];
|
||||
record.minimunBalanceB = dailyFile[i][26];
|
||||
record.maximunBalanceB = dailyFile[i][27];
|
||||
record.baseAsset = dailyFile[i][28];
|
||||
record.quotedAsset = dailyFile[i][29];
|
||||
record.marketBaseAsset = dailyFile[i][30];
|
||||
record.marketQuotedAsset = dailyFile[i][31];
|
||||
record.positionPeriods = dailyFile[i][32];
|
||||
record.positionDays = dailyFile[i][33];
|
||||
record.variable_current_position_takeProfit_value = dailyFile[i][18];
|
||||
record.variable_current_position_stopLoss_phase = dailyFile[i][19];
|
||||
record.variable_current_position_takeProfit_phase = dailyFile[i][20];
|
||||
record.variable_current_position_size = dailyFile[i][21]; // 25 is the message for the executor
|
||||
record.variable_episode_parameters_initial_balance_baseAsset = dailyFile[i][22];
|
||||
record.variable_episode_parameters_minimum_balance_baseAsset = dailyFile[i][23];
|
||||
record.variable_episode_parameters_maximum_balance_baseAsset = dailyFile[i][24];
|
||||
record.variable_episode_parameters_initial_balance_quotedAsset = dailyFile[i][25];
|
||||
record.variable_episode_parameters_minimum_balance_quotedAsset = dailyFile[i][26];
|
||||
record.variable_episode_parameters_maximum_balance_quotedAsset = dailyFile[i][27];
|
||||
record.variable_episode_parameters_baseAsset = dailyFile[i][28];
|
||||
record.variable_episode_parameters_quotedAsset = dailyFile[i][29];
|
||||
record.variable_episode_parameters_marketBaseAsset = dailyFile[i][30];
|
||||
record.variable_episode_parameters_marketQuotedAsset = dailyFile[i][31];
|
||||
record.variable_current_position_count_periods = dailyFile[i][32];
|
||||
record.variable_current_position_stat_days = dailyFile[i][33];
|
||||
|
||||
if (
|
||||
(record.begin >= farLeftDate.valueOf() && record.end <= farRightDate.valueOf()) &&
|
||||
@@ -456,25 +456,24 @@
|
||||
record.variable_episode_count_periods = marketFile[i][12];
|
||||
record.variable_episode_stat_days = marketFile[i][13];
|
||||
record.variable_episode_stat_anualizedRateOfReturn = marketFile[i][14];
|
||||
record.record.variable_current_position_rate = marketFile[i][15];
|
||||
record.record.variable_last_position_ROI = marketFile[i][16];
|
||||
record.strategy = marketFile[i][17];
|
||||
record.takeProfit = marketFile[i][18];
|
||||
record.stopLossPhase = marketFile[i][19];
|
||||
record.takeProfitPhase = marketFile[i][20];
|
||||
record.positionSize = marketFile[i][21];
|
||||
record.initialBalanceA = marketFile[i][22];
|
||||
record.minimunBalanceA = marketFile[i][23];
|
||||
record.maximunBalanceA = marketFile[i][24];
|
||||
record.initialBalanceB = marketFile[i][25];
|
||||
record.minimunBalanceB = marketFile[i][26];
|
||||
record.maximunBalanceB = marketFile[i][27];
|
||||
record.baseAsset = marketFile[i][28];
|
||||
record.quotedAsset = marketFile[i][29];
|
||||
record.marketBaseAsset = marketFile[i][30];
|
||||
record.marketQuotedAsset = marketFile[i][31];
|
||||
record.positionPeriods = marketFile[i][32];
|
||||
record.positionDays = marketFile[i][33];
|
||||
record.variable_current_position_rate = marketFile[i][15];
|
||||
record.variable_last_position_ROI = marketFile[i][16];
|
||||
record.variable_current_position_takeProfit_value = marketFile[i][17];
|
||||
record.variable_current_position_stopLoss_phase = marketFile[i][18];
|
||||
record.variable_current_position_takeProfit_phase = marketFile[i][19];
|
||||
record.variable_current_position_size = marketFile[i][20];
|
||||
record.variable_episode_parameters_initial_balance_baseAsset = marketFile[i][21];
|
||||
record.variable_episode_parameters_minimum_balance_baseAsset = marketFile[i][22];
|
||||
record.variable_episode_parameters_maximum_balance_baseAsset = marketFile[i][23];
|
||||
record.variable_episode_parameters_initial_balance_quotedAsset = marketFile[i][24];
|
||||
record.variable_episode_parameters_minimum_balance_quotedAsset = marketFile[i][25];
|
||||
record.variable_episode_parameters_maximum_balance_quotedAsset = marketFile[i][26];
|
||||
record.variable_episode_parameters_baseAsset = marketFile[i][27];
|
||||
record.variable_episode_parameters_quotedAsset = marketFile[i][28];
|
||||
record.variable_episode_parameters_marketBaseAsset = marketFile[i][29];
|
||||
record.variable_episode_parameters_marketQuotedAsset = marketFile[i][30];
|
||||
record.variable_current_position_count_periods = marketFile[i][31];
|
||||
record.variable_current_position_stat_days = marketFile[i][32];
|
||||
|
||||
if (
|
||||
(record.begin >= leftDate.valueOf() && record.end <= rightDate.valueOf()) &&
|
||||
@@ -516,8 +515,8 @@
|
||||
if (record.variable_current_position_stopLoss_value !== 0) {
|
||||
coordinateSystem.reportYValue(record.variable_current_position_stopLoss_value)
|
||||
}
|
||||
if (record.takeProfit !== 0) {
|
||||
coordinateSystem.reportYValue(record.takeProfit)
|
||||
if (record.variable_current_position_takeProfit_value !== 0) {
|
||||
coordinateSystem.reportYValue(record.variable_current_position_takeProfit_value)
|
||||
}
|
||||
|
||||
/* Send the current record to the panel */
|
||||
@@ -534,12 +533,12 @@
|
||||
let takeProfitPhase = -1;
|
||||
|
||||
if (i > 0) {
|
||||
if (record.stopLossPhase !== records[i - 1].stopLossPhase) {
|
||||
stopLossPhase = record.stopLossPhase;
|
||||
if (record.variable_current_position_stopLoss_phase !== records[i - 1].stopLossPhase) {
|
||||
stopLossPhase = record.variable_current_position_stopLoss_phase;
|
||||
}
|
||||
|
||||
if (record.takeProfitPhase !== records[i - 1].takeProfitPhase) {
|
||||
takeProfitPhase = record.takeProfitPhase;
|
||||
if (record.variable_current_position_takeProfit_phase !== records[i - 1].takeProfitPhase) {
|
||||
takeProfitPhase = record.variable_current_position_takeProfit_phase;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,15 +580,15 @@
|
||||
|
||||
let recordPoint7 = {
|
||||
x: record.begin,
|
||||
y: record.record.variable_current_position_rate
|
||||
y: record.variable_current_position_rate
|
||||
};
|
||||
|
||||
let recordPoint8 = {
|
||||
x: record.end,
|
||||
y: record.record.variable_current_position_rate
|
||||
y: record.variable_current_position_rate
|
||||
};
|
||||
|
||||
if (record.record.variable_current_position_rate === 0) { // Put these points out of range if sellRate is zero.
|
||||
if (record.variable_current_position_rate === 0) { // Put these points out of range if sellRate is zero.
|
||||
|
||||
recordPoint7.x = 0;
|
||||
recordPoint8.x = 0;
|
||||
@@ -597,15 +596,15 @@
|
||||
|
||||
let recordPoint9 = {
|
||||
x: record.begin,
|
||||
y: record.takeProfit
|
||||
y: record.variable_current_position_takeProfit_value
|
||||
};
|
||||
|
||||
let recordPoint10 = {
|
||||
x: record.end,
|
||||
y: record.takeProfit
|
||||
y: record.variable_current_position_takeProfit_value
|
||||
};
|
||||
|
||||
if (record.takeProfit === 0) { // Put these points out of range if takeProfit is zero.
|
||||
if (record.variable_current_position_takeProfit_value === 0) { // Put these points out of range if takeProfit is zero.
|
||||
|
||||
recordPoint9.x = 0;
|
||||
recordPoint10.x = 0;
|
||||
@@ -723,7 +722,7 @@
|
||||
/* Depending on what is on top, it is also the text and image of the take accumulatedProfitLoss / stop loss */
|
||||
|
||||
let yOffset = 0
|
||||
if (record.takeProfit > record.variable_current_position_stopLoss_value) { yOffset = imageSize * 2 }
|
||||
if (record.variable_current_position_takeProfit_value > record.variable_current_position_stopLoss_value) { yOffset = imageSize * 2 }
|
||||
|
||||
/* Next we are drawing the stopLoss floor / ceilling */
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ function newTradingEnginesPlottersTradingSimulationTradingSimulationTradingSimul
|
||||
let paramsArray = []
|
||||
let positionTaken = false
|
||||
|
||||
if (record.positionSize > 0) {
|
||||
if (record.variable_current_position_size > 0) {
|
||||
positionTaken = true
|
||||
}
|
||||
|
||||
@@ -154,59 +154,59 @@ function newTradingEnginesPlottersTradingSimulationTradingSimulationTradingSimul
|
||||
return
|
||||
}
|
||||
|
||||
if (record.baseAsset === record.marketBaseAsset) {
|
||||
if (record.variable_episode_parameters_baseAsset === record.variable_episode_parameters_marketBaseAsset) {
|
||||
params = {}
|
||||
params.VALUE = record.variable_current_balance_baseAsset;
|
||||
params.INIT_VALUE = record.initialBalanceA
|
||||
params.MIN_VALUE = record.minimunBalanceA
|
||||
params.MAX_VALUE = record.maximunBalanceA
|
||||
params.INIT_VALUE = record.variable_episode_parameters_initial_balance_baseAsset
|
||||
params.MIN_VALUE = record.variable_episode_parameters_minimum_balance_baseAsset
|
||||
params.MAX_VALUE = record.variable_episode_parameters_maximum_balance_baseAsset
|
||||
params.ASSET_LABEL = 'Base'
|
||||
params.ASSET_NAME = record.baseAsset
|
||||
params.ASSET_NAME = record.variable_episode_parameters_baseAsset
|
||||
params.LEFT_OFFSET = X_AXIS
|
||||
params.POSITION_TAKEN = positionTaken
|
||||
params.BASE_ASSET = record.baseAsset
|
||||
params.BASE_ASSET = record.variable_episode_parameters_baseAsset
|
||||
params.DECIMALS = 4
|
||||
|
||||
paramsArray.push(params)
|
||||
|
||||
params = {}
|
||||
params.VALUE = record.variable_current_balance_quotedAsset;
|
||||
params.MIN_VALUE = record.minimunBalanceB
|
||||
params.INIT_VALUE = record.initialBalanceB
|
||||
params.MAX_VALUE = record.maximunBalanceB
|
||||
params.MIN_VALUE = record.variable_episode_parameters_minimum_balance_quotedAsset
|
||||
params.INIT_VALUE = record.variable_episode_parameters_initial_balance_quotedAsset
|
||||
params.MAX_VALUE = record.variable_episode_parameters_maximum_balance_quotedAsset
|
||||
params.ASSET_LABEL = 'Quoted'
|
||||
params.ASSET_NAME = record.quotedAsset
|
||||
params.ASSET_NAME = record.variable_episode_parameters_quotedAsset
|
||||
params.LEFT_OFFSET = X_AXIS
|
||||
params.POSITION_TAKEN = positionTaken
|
||||
params.BASE_ASSET = record.baseAsset
|
||||
params.BASE_ASSET = record.variable_episode_parameters_baseAsset
|
||||
params.DECIMALS = 2
|
||||
|
||||
paramsArray.push(params)
|
||||
} else {
|
||||
params = {}
|
||||
params.VALUE = record.variable_current_balance_quotedAsset;
|
||||
params.INIT_VALUE = record.initialBalanceB
|
||||
params.MIN_VALUE = record.minimunBalanceB
|
||||
params.MAX_VALUE = record.maximunBalanceB
|
||||
params.INIT_VALUE = record.variable_episode_parameters_initial_balance_quotedAsset
|
||||
params.MIN_VALUE = record.variable_episode_parameters_minimum_balance_quotedAsset
|
||||
params.MAX_VALUE = record.variable_episode_parameters_maximum_balance_quotedAsset
|
||||
params.ASSET_LABEL = 'Base'
|
||||
params.ASSET_NAME = record.baseAsset
|
||||
params.ASSET_NAME = record.variable_episode_parameters_baseAsset
|
||||
params.LEFT_OFFSET = X_AXIS
|
||||
params.POSITION_TAKEN = positionTaken
|
||||
params.BASE_ASSET = record.baseAsset
|
||||
params.BASE_ASSET = record.variable_episode_parameters_baseAsset
|
||||
params.DECIMALS = 4
|
||||
|
||||
paramsArray.push(params)
|
||||
|
||||
params = {}
|
||||
params.VALUE = record.variable_current_balance_baseAsset;
|
||||
params.MIN_VALUE = record.minimunBalanceA
|
||||
params.INIT_VALUE = record.initialBalanceA
|
||||
params.MAX_VALUE = record.maximunBalanceA
|
||||
params.MIN_VALUE = record.variable_episode_parameters_minimum_balance_baseAsset
|
||||
params.INIT_VALUE = record.variable_episode_parameters_initial_balance_baseAsset
|
||||
params.MAX_VALUE = record.variable_episode_parameters_maximum_balance_baseAsset
|
||||
params.ASSET_LABEL = 'Quoted'
|
||||
params.ASSET_NAME = record.quotedAsset
|
||||
params.ASSET_NAME = record.variable_episode_parameters_quotedAsset
|
||||
params.LEFT_OFFSET = X_AXIS
|
||||
params.POSITION_TAKEN = positionTaken
|
||||
params.BASE_ASSET = record.baseAsset
|
||||
params.BASE_ASSET = record.variable_episode_parameters_baseAsset
|
||||
params.DECIMALS = 2
|
||||
|
||||
paramsArray.push(params)
|
||||
|
||||
@@ -133,12 +133,12 @@ function newTradingEnginesPlottersTradingSimulationTradingSimulationTradingSimul
|
||||
y = y + increment;
|
||||
printLabel('Size', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60', undefined, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
y = y + increment;
|
||||
printLabel(record.positionSize, X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
printLabel(record.variable_current_position_size, X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Rate', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60', undefined, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
y = y + increment;
|
||||
printLabel(record.record.variable_current_position_rate, X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
printLabel(record.variable_current_position_rate, X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Stop', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60', undefined, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
@@ -148,17 +148,17 @@ function newTradingEnginesPlottersTradingSimulationTradingSimulationTradingSimul
|
||||
y = y + increment;
|
||||
printLabel('Take Profit', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60', undefined, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
y = y + increment;
|
||||
printLabel(record.takeProfit, X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
printLabel(record.variable_current_position_takeProfit_value, X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Periods', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60', undefined, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
y = y + increment;
|
||||
printLabel((record.positionPeriods), X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
printLabel((record.variable_current_position_count_periods), X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Days', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60', undefined, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
y = y + increment;
|
||||
printLabel((record.positionDays).toFixed(2), X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
printLabel((record.variable_current_position_stat_days).toFixed(2), X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
|
||||
y = y + increment;
|
||||
y = y + increment;
|
||||
@@ -172,7 +172,7 @@ function newTradingEnginesPlottersTradingSimulationTradingSimulationTradingSimul
|
||||
y = y + increment;
|
||||
printLabel('ROI', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60', undefined, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
y = y + increment;
|
||||
printLabel((record.record.variable_last_position_ROI).toFixed(2) + ' % ', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
printLabel((record.variable_last_position_ROI).toFixed(2) + ' % ', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14, undefined, true, thisObject.container, thisObject.fitFunction);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user