The Expert Advisor MAVA-XonaX uses moving averages based on the open and close prices.
Attach four MA indicators with the period equal to 6 to the H4 EURUSD chart. One is based on the opening prices MAopen, the second one — on the closing prices MAclose. These are signal indicators. The third one is based on the High prices MAhigh and the last one — on the Low prices MAlow.
When the trend is downward, the opening price of the candlesticks is higher than the closing price, which means that the moving average based on the opening prices will be higher and vice-versa. Thus, buy if MAclose crosses MAopen from below and sell as soon as MAopen goes above MAclose.
To use the MA indicator to its fullest, the take profit will be placed as the average spread for the given period, which calculated by the formula MAhigh – MAlow. Stop loss for sell: 2*(MAhigh – MAopen), stop loss for buy, respectively: 2*(MAclose – MAlow).
The Expert Advisor has been tested on the period 20.02.2015 – 16.07.2015.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/13459
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.Average Directional Movement Index (ADX)
The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.