Eureka Lock-the Expert Advisor determines the flat sections of the price movement relative to the specified settings. Trading is carried out with pending BUY STOP and SELL STOP orders from the boundaries of the defined flat. Instead of limiting the loss, we use locking the unprofitable position with an increased volume. The virtual profit level is also used.
- TF_flet = 15 – the period of the chart on which the flat will be determined
- Bars_flet = 25 – the number of bars to determine the flat
- extern int Size_flet = 30-limit the distance between the upper and lower border of the flat (height), in points
- otstyp = 5-offset from the flat boundaries for placing pending orders
- Lot = 0.1 – order volume
- koef_lot = 2 – the multiplication factor of the locking orders
- TakeProfit = 100-the virtual profit level, in points, is calculated for the set Lot setting
- MagicNumber = 1975 – magic order number
- NumberOfTry = 5 – the number of trading attempts at the broker’s requotes
- Slippage = 3 – the level of slippage, in points