OHLC for1 Hour candle

HAs
How to get ohlc 1hour candle for same day.. in excel
  • rakeshr
    rakeshr edited September 2018
    @HAs

    Are you looking to get it during live market or end of the day?
    For live market,you can keep from date as today's date and keep on fetching latest hour candle for the same day.Python code example:
    #Keep from_date as today's date  
    today_start=datetime.date.today()
    #to_date should always be current time
    current_time=datetime.datetime.now()
    data=kite.historical_data(instrument_token=instrument_token,from_date=today_start, to_date=current_time, interval='60minute')
    #Dump these data to Excel row wise
  • HAs
    Yes in Live market, but i did't understand the formula given i want it for excel...please help
  • dadu369
    @HAs For this you can write macro/function to run GetHistData() subroutine every hour, passing required parameters.

    For other idea @HowUTrade may help.
Sign In or Register to comment.