Version 1.6 2020.12.17
code optimization
Version 1.5 2020.12.07
Optimized the "day of the week selection" function"
Version 1.4 2020.10.17
Indicators are built into the expert Advisor
Version 1.3 2017.08.08
Improved the check of the account free margin for opening a position. Now the check is performed immediately before an order is opened.
Version 1.2 2017.07.24
The choice of day of the week – select a day of the week when trade is allowed, if not allowed and there are open trades, trading will be continued until these trades are closed.

Maximum volume - maximum allowed volume if the volume increase is enabled (Losing volume, increased by two).

Open a new bar – opening an order on a new bar after receiving a signal of the indicator.
Timeframe of a new bar – the period, on which we should wait for the opening of a new bar.

Not to repeat if the order was closed with profit – do not open a trade if the signal from the indicator is active and the last order was closed with positive profit.

Not to repeat if the order is closed with stoploss - do not open a trade if the signal from the indicator is active and the last order is closed with negative result.

Close by opposite signal – close open orders in case of an opposite signal of the indicator.
Version 1.1 2017.07.14
Added the Distance option to the settings of the MovingAverage indicator.
Distance - when this parameter is set, an order is opened when the MovingAverage moves from the price to a specified Distance in points, in case it is a BUY signal, and when the MovingAverage moves from the price to a specified Distance in points, in case it is a SELL signal (if Distance=0, this parameter is disabled).