Let's divide it in conditions that will be join by an AND icon 1. the current candle just closed - by default if you trade bars the ea trade with the first tick after the close and 2. it has closed in the top or bottom 70% range of the candle - here you need an indicator to define the range. You can in the indicator builder create the range, something like high - low times 0.7 (you can include the abs value). Then you import it in the strategy builder and compare the close to the indicator. You can also create this condition in the mql icon and 3. the high of any of the last 5 candles was less than the high of the current candle, you need an indicator that shows the high of the last 5 candles, import it and compare it with the high. The indicator builder has an example that shows how to get the highest high.
|