思路提供者 — Victor Chebotariov, MQL5 代码作者 — barabashkakvn。
信号基于四条 iMA (MA) 指标, 分别采用 PRICE_OPEN, PRICE_HIGH, PRICE_LOW, PRICE_CLOSE 价格。仅在对冲帐户交易。
用于确定信号方向的模块:
double open =iMAGet(handle_iMA_open,0);
double high =iMAGet(handle_iMA_high,0);
double low =iMAGet(handle_iMA_low,0);
double close=iMAGet(handle_iMA_close,0);
double GO=((close-open)+(high-open)+(low-open)+(close-low)+(close-high))*iTickVolume(0);
持仓数量受参数限制
input int MaxPositions =5;