# Question about bar data manipulation

**URL:** <https://community.tradovate.com/t/question-about-bar-data-manipulation/6715>\
**Category:** Custom Indicators\
**Created:** [February 16, 2023, 9:46pm UTC](https://community.tradovate.com/t/question-about-bar-data-manipulation/6715 "2023-02-16T21:46:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Greeny](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jeff\_Greeny](https://community.tradovate.com/u/Jeff_Greeny)\
**Post date:** [February 16, 2023, 9:46pm UTC](https://community.tradovate.com/t/question-about-bar-data-manipulation/6715/1 "2023-02-16T21:46:52Z")

</div>

I need the time of the high and low of the current bar.

Snippet of the code:

If (d.close()==d.high())  
{this.highTime=new Date().get minutes()} //For bar high time  
If (d.close()==d.low())  
{this.lowTime=new Date().get minutes()}//For bar low time

The issue is that when close is equal to low/high, exactly at that time, it works. But when close is not equal to low, it will not remember to save/store/push the value so that it can be used.

I feel like there is an easy script function that I am missing to store the value.

Thanks.
