Thanks for the Code.
but there is a problem in this - if i run this code it gives me the days high / low and close on a new candle but then stops there because the next candle is at end of the day as it is D1.
What i am looking at is a 1 Min candle which can give me todays high / close / low every min but not according to the last candle. because now if i apply the same code to the 1 min candle it give me the low / high and close of the last candle which is not necessarily the same as low / high of the day.
Please let me know if there is any code for this where i can get the high and low and the last price of the day every minute.
Thanks in advance