Estimating Preferred Trading Hours with Circular Averages
Summary
This script estimates preferred hours for long and short orders by associating indicator values with the hour of day in a selected time zone. It represents each hour as an angle on a 24-hour circle, computes indicator-weighted sine and cosine averages, and converts the resulting direction back to an hour. The code uses RSI and money flow index averages for the long and inverse-price signals for the short, then places orders when the rounded estimated hour matches the current bar's hour.
The accompanying explanation describes the approach in terms of cumulative indicator effects and mentions rate of change as a possible input, while the supplied code uses RSI and MFI. The author says it was intended primarily for BTC/USDT on hourly charts and invites testing elsewhere. No performance statistics or validation are provided. Because the calculation accumulates historical values, the estimate may be dominated by older observations and can reflect sample-specific patterns; the document offers no safeguards against overfitting or changing intraday behavior.
Key ideas
- The method maps time-of-day values onto a circle and calculates indicator-weighted circular averages.
- It derives separate estimated hours for long and short activity from indicator series.
- The supplied code uses RSI and MFI inputs, although the accompanying explanation also discusses rate of change.
- The author primarily frames the script for BTC/USDT hourly charts and allows timezone selection.
- No measured results are provided, and historical hour patterns may not persist.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.