Spoiler alert
The Expert Advisor is written for MT5, for tests, because MT5 has more features for testing and analyzing results.
The EA is made for new quote points, but the size of the candle, tails and gap in the source data of the EA are set in the old points, because it is more familiar (1 old point = 10 new points-this is so that everything is completely clear

).
Install the MT5 terminal, for example, from the official website, connect the demo account (MT5) of the broker and test it on various tools. Quotes are loaded by themselves. Any timeframe, the Expert Advisor will still take data from D1. (This is if anyone thinks that MT5 is something complicated.)
Expert Advisor parameters.
D1_Body_Min - the minimum size of the candle body (in old points).
D1_Body_Max - the maximum size of the candle body (in old points).
D1_Tail_Min - the minimum size of the candle tail (in old points).
D1_Tail_Max - the maximum size of the candle tail (in old points).
Gep_Max - maximum gap size (in old points).
HourOpen - the hour of placing orders at the beginning of a new day (according to the time of the server (broker)).
HourClose - the hour of closing all orders (according to the time of the server (broker)). which are in the market and have not yet managed to close on a take or stop.
Trade_Mon - allow trading on Monday.
Trade_Tue - allow trading on Tuesday.
Trade_Wed - allow trading on Wednesday.
Trade_Thu - allow trading on Thursday.
Trade_Fri - allow trading on Friday.
Pending orders remain placed (waiting for activation) until the time that is 1 hour less than the HourClose parameter.