diff --git a/packages/trader/src/Modules/SmartChart/Components/Markers/accumulators-chart-elements.jsx b/packages/trader/src/Modules/SmartChart/Components/Markers/accumulators-chart-elements.jsx index 5fbcd2a6376b..d83445482789 100644 --- a/packages/trader/src/Modules/SmartChart/Components/Markers/accumulators-chart-elements.jsx +++ b/packages/trader/src/Modules/SmartChart/Components/Markers/accumulators-chart-elements.jsx @@ -17,8 +17,8 @@ const AccumulatorsChartElements = ({ ); const last_contract_info = accumulators_positions.slice().pop()?.contract_info; const should_highlight_tick_without_contract = !!current_symbol_spot_time && is_stats_highlighted; - const should_highlight_contract_tick = - last_contract_info?.status === 'lost' && current_symbol_spot_time === last_contract_info?.exit_tick_time; + const diff = Date.now() / 1000 - last_contract_info?.exit_tick_time; + const should_highlight_contract_tick = last_contract_info?.status === 'lost' && diff <= 1.3; const should_highlight_tick = should_highlight_tick_without_contract || should_highlight_contract_tick; const current_spot = should_highlight_contract_tick ? last_contract_info?.exit_tick : current_symbol_spot; const current_spot_time = should_highlight_contract_tick diff --git a/packages/trader/src/Modules/SmartChart/Components/Markers/accumulators-profit-loss-tooltip.jsx b/packages/trader/src/Modules/SmartChart/Components/Markers/accumulators-profit-loss-tooltip.jsx index 6410a6468f58..0dbbc52afdbc 100644 --- a/packages/trader/src/Modules/SmartChart/Components/Markers/accumulators-profit-loss-tooltip.jsx +++ b/packages/trader/src/Modules/SmartChart/Components/Markers/accumulators-profit-loss-tooltip.jsx @@ -9,7 +9,6 @@ import AccumulatorsProfitLossText from './accumulators-profit-loss-text'; const AccumulatorsProfitLossTooltip = ({ alignment = 'right', - current_spot, current_spot_time, className = 'sc-accumulators-profit-loss-tooltip', currency, @@ -17,6 +16,7 @@ const AccumulatorsProfitLossTooltip = ({ exit_tick_time, high_barrier, is_sold, + low_barrier, profit, }) => { const [is_tooltip_open, setIsTooltipOpen] = React.useState(false); @@ -68,15 +68,18 @@ const AccumulatorsProfitLossTooltip = ({ }; if (typeof profit !== 'number') return null; - if (!is_sold && current_spot_time && high_barrier) + const time_now = Date.now() / 1000; + const diff = time_now - exit_tick_time; + if ((!is_sold || diff <= 1.3) && current_spot_time && high_barrier) { return ( ); + } return is_sold && exit_tick_time ? ( isAccumulatorContract(type) && contract_info.underlying === this.symbol + ); + const { status, exit_tick_time } = accu_contracts[accu_contracts.length - 1]?.contract_info || {}; + const diff = Date.now() / 1000 - exit_tick_time; + if (status === 'open' || (status && diff < 1.3)) { + // hide barriers from proposal while last contract barriers are shown + this.root_store.contract_trade.current_symbol_spot = null; + this.root_store.contract_trade.current_symbol_spot_time = null; + } else { + this.root_store.contract_trade.current_symbol_spot = spot; + this.root_store.contract_trade.current_symbol_spot_time = spot_time; + } this.ticks_history_stats = getUpdatedTicksHistoryStats({ previous_ticks_history_stats: this.ticks_history_stats, new_ticks_history_stats: ticks_stayed_in,