Course Name: Price Action Trading Strategies Using Python, Section No: 20, Unit No: 4, Unit type: Notebook
Hello,
Why are we doing this?
https://i.imgur.com/XdIJrCx.png
In other notebooks when we resampled data we didn't changed the hours and minutes of daily candlesticks but here we're doing it. It is because the last minute candle of every day is at 15:59?
Hey Daniel,
When resampling data to a daily frequency ('1d'
), the resulting timestamps typically represent the start of each day (00:00:00). By adding 15 hours and 59 minutes, we are simply shifting the timestamp to represent a different point in the day. In this case, the adjustment sets the timestamp to 15:59 (3:59 PM) of each day.
Hope this helps!
Thanks
Rushda
But if we try to represent the start of a day, the equitie's day starts at 9:30. Don't you mean representing the END of each day?
Yes, 15:59 represents the end of each day
Let me retry my question: previously you said that moving the timestamp from 00:00:00 to 15:59:00 is because you're trying to represent the start of each day correctly, but the start of the session is 09:30:00. Do you mean that you're trying to represent the end of each day and not the start?
If that's true, why using 15:59:00 as end of the day instead of 16:00:00 like we do in the next notebook?
Hey Daniel,
What i meant earlier was that - when you don't adjust the timestamp at the time of resampling it is automatically set to (00:00:00). Something like this:
But in this notebook, we have set the timestamp to 15:59:00. The difference in timestamp in this notebook and the next is something I will have to check and get back. Please allow me sometime for this.
Thanks
Rushda
Okay, please let me know once you've checked it.
Hey Daniel,
Adjusting the timestamp is only done for the purpose of presentation. Changing it would not impact the output. Therefore, instead of 15:59 we can keep it as 16:00 also.
Just to clarify further, this is the data after adjusting the timestamp to 15:59
And this is the data after adjusting it to 16:00
Hope this helps!
Thanks
Rushda
Thank you for your clarification!