Calculate daily candles' highs and lows, create pending orders I need a robot to help me test this daily strategy: https://forex-strategies-revealed.com/advanced/midnight-setup (Also here: https://blog.roboforex.com/blog/2020/08/25/trading-by-midnight-strategy-describing-on-examples/) The robot should calculate the newly formed daily candles' highs and lows and then create buy stop and sell stop pending orders according to instructions provided on the site. I will have many charts open to test this strategy on all those charts. On some days, I will not trade some pairs. Since I don't want to switch off all algo trading, but only specific pairs, I would like to have an on/off switch in options (like: "Allow live trading" in Common) rather than having to add/remove the robot from the chart every time (and maybe lose all the settings). Can a label be displayed on the chart, telling if the robot is off? I am not sure if it is possible to program it to recognize risky trades, like doji, hammer, comet candles, so I guess I can close some orders manually. Maybe the robot can display warnings, like if a specific candle is an inside bar etc? The robot should work in all time frames, but every time it does the midnight (server time) calculation, it should reset the chart to: Daily. In theory, the market could be so active at midnight that the price may leave the range of the previous day's candle even before the robot manages to create the pending order. The error message should explain where and why it failed. That is why the "Run now" option would be handy. "Run now" means sometime after midnight. The robot should run automatically at midnight; "Run now" means I will run it manually. First, I need an option to enforce the order at a price closest to the previously calculated buy stop or sell stop. Maybe it should be called "Use the current price"? Next, if I want to adjust anything after midnight, I would have to change the settings and also run it again. And I would probably want to adjust the lot size. There should be a fixed lot size option to be used automatically. But after that, before "Run now," I can switch that fixed-size off and enter a different lot value. "Run now" can be seen as removing the robot from the chart and adding it again. But as above, I would like to avoid losing settings. Risk management: stop loss as described in the strategy, but I also want to override stop loss and have the position closed automatically if it is losing more than a preselected number of pips or a percentage of a daily candle. (Or the amount of money?) The idea is to control and prevent a significant loss if the robot is left unattended, even for a month or so. There should be an option to create two identical orders, the difference being that one position will be closed when profit hits a preselected number of pips (default = 100 pips), while the other may be left to exploit the trend as far as it goes, optionally having a trailing stop set. An option would be helpful, to choose between 1) using the same lot size for both orders or 2) specifying each lot size. Twin orders should be available for both automatic and manual running. In fact, for manual, this is resolved by selecting if the "Run now" will replace the automatic order or leave it and add another one. The next option is to decide if to delete the previous day/days pending, non-active orders since they can be a very unpleasant and unexpected surprise when activated. Since they can pile up, is it possible to manually delete those orders for all opened charts, not only for the currently selected one? There should also be an option to automatically delete pending orders from the previous day at midnight, just before placing the new ones. I would appreciate comments in the code. I want to translate the robot into my language; I don't care if it is in two separate versions for each language or if it is all-in-one, selecting a language from options. Is there any advantage if this particular robot was written for MT4 or MT5? I could use both; only MT4 is now more convenient for me. If some requirements are not possible, too complicated, or require more budget, or you have an idea to offer, let me know.