The author of the idea - Scriptor
mq5 code author - barabashkakvn
NOTE: The EA works on hedge accounts only! Netting is prohibited!
The Expert Advisor sets pending Buy limit and Stop limit orders. The robot uses data of the iMA (Moving Average, MA) and iEnvelopes (Envelopes) indicators. The EA works only when a new bar appears and has a limitation of the working time range: from Start hour to End hour.
It is able to set up to three pending limit orders in each direction forming a grid: a separate magic number is assigned to each order. Magic number assignment rule:
If there are non-activated pending orders, and the server time exceeds End hour, all pending orders are removed.
The default parameters, EURUSD M5:
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/22353