Martin Overlap Bot
Continue_work - Continue (true) or not continue (false) the trading cycle. In the Continue_work=false mode, the EA does not place new orders. The rest of the orders follow in the normal mode. They are closed in averaging or overlapping mode according to the algorithm .
Lot - the Lot for opening the first order of the series
MaximalLot - the maximum allowable lot
MaximalOrders - maximum number of orders placed
ProfitOverlap - Profit from which the first and last order of the series is closed (in the Deposit currency)
TakeProfit - Take profit level for a series of orders (in points)
Step - Step (distance) between orders (in points)
Multiplier - The multiplication factor the lots next orders
Magic - Unique identifier of orders (if set to 0, the EA will work with orders opened manually - I do not recommend)
Use_time_settings - enabling/disabling of the restriction of trade in time
Start_Hour - Time to start trading. Written in the format HHmm (for example, 00:15 will be as 0015).
End_Hour - Time to stop trading. Is written in format HHmm (for example 23:55 will as 2355). After the end time, the EA will pause until the start time.
Maximal_Drawdown - Maximum drawdown (in Deposit currency). After the occurrence of this event all orders are closed forcibly on the current chart.
Show_info - Showing dashboard
For convenience, I added a dashboard that shows statistical information about the current state of the account. On the panel you can see the settings that are currently running (this is done to exclude any user errors. For example, the same magic on different charts, etc.). If you want to stop trading, but the open positions remain on the chart, the EA will display a message in the information panel: "Stop trading; Positions in the process of closing". Once the robot will close all positions, then will appear the inscription: "All positions locked". After that, you can remove the expert from the chart. I added this for convenience, because several robots can work on one chart of one trading instrument. And before it was not clear whether the robot stopped working or not. Whose these positions are: the positions of a remote robot or another robot.
The protection against requotes was improved
The performance was improved
An option that limits the number of orders placed was added
Added the dashboard
Added the ability to continue or not to continue the trading cycle. If you do not continue the market orders are closed in the normal mode and new ones are not placed.
Added the ability to start and pause the EA at the specified time.
Added the ability to close all market orders when the drawdown specified in the settings is reached.