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.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/14301
The function returns the lot size, which is calculated based on the stop loss size and the risk specified in the variable.Close all locked orders
The function closes all locked orders. This really saves money on the spread.