How to know the time stamp of day high price value

Hi ,
Can we get the timestamp of when the day high value is formed.Means by "ohlc.high" i am getting only day high value .But i want to know at what time this day high value traded? Can someone please guide me.Is there any logic that by using availability tick values that we can find out?
  • shivdas_b
    shivdas_b edited November 2019
    Yes. There are two way.
    If you are in live market.
    1. get current day high and timestamp and store them somewhere lets say day_high and high_timestamp
    2. check for condition if current market high >= day_high then
    a. store current market high in day_high and
    b. current timestamp in high_timestamp

    If you are not in live market.
    1. Ping the 1min historical data for current day
    2. check following
    a. loop until you get day_ohlc.high == 1min.high [there may be possibility that more than one candle have high same as day's high :) ) please count that scenario]
    b. whichever candle satisfies above condition you can take timestamp of that candle
    3. by above procedure you can get timestamp of day_high as close as minute.

    Hope this will work for you.

    For Indicator based algo softwareor any custom algo-software feel free to get in touch o:)
    Email : [email protected]
    Mobile : 9923 587757

  • Dileep
    Thanks @shivdas_b for your help
This discussion has been closed.