This script is just finds the best hour to buy and sell hour in a day by checking chart movements in past
For example if the red line is on the 0.63 on BTC/USDT chart it mean the start of 12AM hour on a day is the best hour to buy (all based on
It's just for 1 hour time-frame but you can test it on other charts.
IMPORTANT: You can change time Zone in strategy settings.to get the real hours as your location timezone
IMPORTANT: Its for now just for BTC/USDT but you can optimize and test for other charts...
IMPORTANT: A green and red background color calculated for show the user the best places of buy and sell (green : positive signal, red: negative signals)
settings :
timezone : We choice a time frame for our indicator as our geo location
source : A source to calculate rate of change for it
Time Period : Time period of ROC indicator
About Calculations:
1- We first get a plot that just showing the present hour as a zigzag plot
2- So we use an indicator ( Rate of change ) to calculate chart movements as positive and negative numbers. I tested ROC is the best indicator but you can test close-open or real indicator or etc as indicator.
3 - for observe effects of all previous data we should indicator_cum that just a full sum of indicator values.
4- now we need to split this effects to hours and find out which hour is the best place to buy and which is the best for sell. Ok we should just calculate multiple of hour*indicator and get complete sum of it so:
5- we will divide this number to indicator_cum : (indicator_mul_hour_cum) / indicator_cum
6- Now we have the best hour to buy! and for best sell we should just reverse the ROC indicator and recalculate the best hour for it!
7- A green and red background color calculated for show the user the best places of buy and sell that dynamically changing with observing green and red plots(green : positive signal, red: negative signals) when green plot on 15 so each day on hour 15 the background of strategy indicator will change to 15 and if its go upper after some days and reached to 16 the background green color will move to 16 dynamically.