思路提供者: slacktrader, mq5 代码作者: barabashkakvn。
与 N 小时前的趋势方向逆势交易。每天只能在某个小时内开仓。
输入参数
- Max positions - 最大开仓数量 (不推荐使用小于 2 的值);
- Lots (if "Lots"<=0.0 -> use "Risk") - 持仓量 (如果数值设置为 0 或小于 0, 持仓量将按照可用保证金的风险百分比计算);
- 止盈
- Risk in percent for a deal from a free margin - 每笔交易的风险占可用保证金的百分比。
- Lot maximum - 限制最大手数;
- Hour when position should be opened - 指定开仓时间;
- Hours to check price difference to see a "trend" - 检查指定小时前趋势方向;
- Lot multiplier, if one position is unprofitable - 一笔亏损交易后手数增加比率;
- Lot multiplier, if two positions are unprofitable - 接连两次亏损交易后的手数增幅比率;
- Lot multiplier, if three positions are unprofitable - 接连三次亏损交易后的手数增幅比率;
- Lot multiplier, if four positions are unprofitable - 接连四次亏损交易后的手数增幅比率;
- Lot multiplier, if five positions are unprofitable - 接连五次亏损交易后的手数增幅比率。