From 87f1745391bbaa4eef83a84fcba73f17b469f648 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 25 Jun 2019 00:55:39 +0200 Subject: [PATCH] Icon for take profit equal to the one used at the designer --- TradingSimulation.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TradingSimulation.js b/TradingSimulation.js index bfae38fd2..11e24cdff 100644 --- a/TradingSimulation.js +++ b/TradingSimulation.js @@ -50,7 +50,7 @@ let records = []; // Here we keep the records to be ploted every time the Draw() function is called by the AAWebPlatform. let imageStopLossPhase; - let imageBuyOrderPhase; + let imageTakeProfitPhase; let imageRecord; let zoomChangedEventSubscriptionId @@ -75,7 +75,7 @@ /* icons */ imageStopLossPhase = undefined; - imageBuyOrderPhase = undefined; + imageTakeProfitPhase = undefined; imageRecord = undefined; /* Destroy References */ @@ -139,7 +139,7 @@ /* Loading a few icons */ imageStopLossPhase = canvas.strategySpace.iconByPartType.get('Stop'); - imageBuyOrderPhase = canvas.strategySpace.iconByPartType.get('Phase'); + imageTakeProfitPhase = canvas.strategySpace.iconByPartType.get('Take Profit'); imageRecord = canvas.strategySpace.iconByPartType.get('Trading System'); callBackFunction(); @@ -754,8 +754,8 @@ browserCanvasContext.lineWidth = 5 browserCanvasContext.stroke() - if (imageBuyOrderPhase.canDrawIcon === true && takeProfitPhase > 0) { - browserCanvasContext.drawImage(imageBuyOrderPhase, recordPoint9.x - imageSize * 2 / 3, recordPoint9.y + imageSize / 4 - yOffset, imageSize, imageSize); + if (imageTakeProfitPhase.canDrawIcon === true && takeProfitPhase > 0) { + browserCanvasContext.drawImage(imageTakeProfitPhase, recordPoint9.x - imageSize * 2 / 3, recordPoint9.y + imageSize / 4 - yOffset, imageSize, imageSize); printLabel(takeProfitPhase, recordPoint9.x - imageSize * 1 / 3, recordPoint9.y + imageSize * 1.9 - yOffset * 2, '0.9', 8); }