The script analyzes the market based on two criteria: the moving averages and the support and resistance levels.
The script draws the support and resistance levels on the H4 chart based on the 6-8-week and yearly extremums, and also displays the average values at the same parameters of the flat.