diff --git a/www/i18n/en.json b/www/i18n/en.json index d765f5fa71..a70f49749c 100644 --- a/www/i18n/en.json +++ b/www/i18n/en.json @@ -507,6 +507,8 @@ "otc_stocks": "OTC Stocks", "volidx": "Volidx", "volatility_indices": "Volatility Indices", + "synthetic_indices": "Synthetic Indices", + "synthetic_index": "Synthetic Indices", "subject_to_change": "Stated limits are subject to change without prior notice.", "trading_limits": "Trading Limits", "withdrawal_limits": "Withdrawal Limits", diff --git a/www/js/configs/app.config.js b/www/js/configs/app.config.js index 72b46f0b17..23890e5da8 100644 --- a/www/js/configs/app.config.js +++ b/www/js/configs/app.config.js @@ -16,35 +16,35 @@ angular.module("binary").constant("config", { tradeCategories : [ { name : "up_down", - markets: ["forex", "volidx", "random"], + markets: ["forex", "synthetic_index", "random"], value : "UP/DOWN" }, { name : "digit_matches_differs", value : "MATCH/DIFF", - markets: ["volidx", "random"], + markets: ["synthetic_index", "random"], digits : true }, { name : "digit_even_odd", - markets: ["volidx", "random"], + markets: ["synthetic_index", "random"], value : "EVEN/ODD" }, { name : "digit_over_under", value : "OVER/UNDER", - markets: ["volidx", "random"], + markets: ["synthetic_index", "random"], digits : true }, { name : "asians", value : "Asians", - markets: ["volidx", "random"] + markets: ["synthetic_index", "random"] }, { name : "high_low_ticks", value : "HIGH/LOW TICKS", - markets: ["volidx"] + markets: ["synthetic_index"] } ], tradeTypes: [ diff --git a/www/js/share/services/chart.service.js b/www/js/share/services/chart.service.js index 0eac219e16..3a946454e8 100644 --- a/www/js/share/services/chart.service.js +++ b/www/js/share/services/chart.service.js @@ -509,6 +509,7 @@ angular.module("binary").factory("chartService", $rootScope => { const fractionalLength = utils.fractionalLength(pip); if (hasEntrySpot() && broadcastable) { + const isLastTickAfterExit = contract.exitSpot && lastTime > contract.exitSpot; if (tickPriceList.length === 0) { if (contract.entrySpotTime !== lastTime && betweenExistingSpots(lastTime)) { const entrySpotPrice = parseFloat(contract.entrySpotPrice).toFixed(fractionalLength); @@ -523,6 +524,8 @@ angular.module("binary").factory("chartService", $rootScope => { contract.result = "lose"; } $rootScope.$broadcast("contract:spot", contract, entrySpotPrice); + } else if (isLastTickAfterExit) { + tickPriceList.push(contract.entrySpotPrice); } else { tickPriceList.push(parseFloat(lastPrice).toFixed(fractionalLength)); } @@ -530,9 +533,11 @@ angular.module("binary").factory("chartService", $rootScope => { tickPriceList.push(parseFloat(lastPrice).toFixed(fractionalLength)); } - if (betweenExistingSpots(lastTime)) { + if (betweenExistingSpots(lastTime) || isLastTickAfterExit) { const barrier = parseFloat(contract.barrier).toFixed(fractionalLength); - const lastPriceFloat = parseFloat(lastPrice).toFixed(fractionalLength); + const lastPriceFloat = isLastTickAfterExit + ? tickPriceList.slice(-2)[0] + : parseFloat(lastPrice).toFixed(fractionalLength); if (utils.conditions[contract.type](barrier, lastPriceFloat, tickPriceList, contract.selectedTick)) {