Dealing with negative zero values

This commit is contained in:
Luis Fernando Molina committed 2019-08-18 16:13:18 +02:00
1 parent e0c8960cbd
commit 76f5d6da79
1 file changed
+8 -1
+8 -1
View File
@@ -146,7 +146,7 @@ function newAAMastersPlottersTradingSimulationTradingSimulationTradingSimulation
y = y + increment;
printLabel('Profit / Loss', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60');
y = y + increment;
printLabel(currentRecord.lastTradeProfitLoss, X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14);
printLabel((currentRecord.lastTradeProfitLoss), X_AXIS, frameTitleHeight + frameBodyHeight * y, '1.00', 14);
y = y + increment;
printLabel('ROI', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.60');
@@ -269,6 +269,9 @@ function newAAMastersPlottersTradingSimulationTradingSimulationTradingSimulation
let label = '' + labelToPrint;
if (isNaN(label) === false) {
label = Number(label).toLocaleString();
if ((label === "-0" || label === "0") && (labelToPrint !== 0) && (labelToPrint !== "0.00")) {
label = Number(labelToPrint).toFixed(6);
}
}
let xOffset = label.length / 2 * fontSize * FONT_ASPECT_RATIO;
@@ -346,6 +349,10 @@ function newAAMastersPlottersTradingSimulationTradingSimulationTradingSimulation