To obtain a period’s open time, we can use either CopyTime() https://www.mql5.com/en/docs/series/copytime or SymbolInfoInteger() https://www.mql5.com/en/docs/marketinformation/symbolinfointeger I’ve attached a script testing the speed of each showing that SymbolInfoInteger() is faster than CopyTime() by 50%, even after optimisation. Just throwing it out there.
This is a very simple trade management EA that will close all your Open Orders (or both Open and Pending Orders) when your drawdown against balance exceeds a set percentage limit. E.g. Balance = $10,000 and “DrawdownPercent” is set at 2.0, if floating P&L is greater than -$200.00, all Orders will be closed. A simple … Continue reading