这个Expert Advisor是基于3条移动平均线指标,移动平均线交叉基于下列思想:快速、中速、慢速3条移动平均线交叉时,作为开仓和关仓的信号,其中三线交叉包含了三线交叉于一个点的特例。
当FastMA(MA1) 向上穿越middleMA(MA2)与middleMA(MA2)向上穿越slowMA(MA3)时建立多单.
当FastMA(MA1) 向下穿越middleMA(MA2)与middleMA(MA2)向下穿越slowMA(MA3)时建立空单;
当FastMA(MA1) 向下穿越middleMA(MA2),关闭多单,当FastMA(MA1) 向上穿越middleMA(MA2),关闭空单。
这个专家使用了资金管理,传统的止损、止盈、追踪止损。每次交易只有一个订单,这确保交易的最大安全。
输入参数:
Fast MA settings
- Period = 5 – period of Faster Moving Average (value 5 ).
- Mode = EMA – type of Moving Average (SMA, EMA, SMMA, LWMA).
- Price = Close – type of price (Close,Open, Low, High, Median, Typical, Weighted).
middle MA settings
- Period = 20 – period of middle MA (value 20).
- Mode = EMA – type of Moving Average (SMA, EMA, SMMA, LWMA).
- Price = Close – type of price (Close,Open, Low, High, Median, Typical, Weighted).
Slow MA settings
- Period = 50 – period of Slower MA (value 50).
- Mode = SMA – type of Moving Average (SMA, EMA, SMMA, LWMA).
- Price = Close – type of price (Close,Open, Low, High, Median, Typical, Weighted).
Other MA settings
- NumBarsToCross = 3 – NumBars To Cross
- LimitBars = 20 – Limit Bars
- Distance = 50 – MA1 and MA2 Distance
Risk settings
- Risk_Management = Automatic – Automatic will calculate lots automatically.
- Auto_Risk_Percent = 2 – Automatic Risk. For ex: 2 means 2%.
- Auto_Max_Risk_in_Total_Orders = 10 – Automatic Max Risk. For ex: 10 means 10%.
- Manual_Lots = 0.01 – Manual Number of lots (if not automatic risk)
- Manual_Maximum_Lots = 1 – Maximum lots.
Trade settings
- Max_Order = 1 – Maximum orders.
- EntryMinTimeFrame = H4 – Entry Minimum TimeFrame.
- EntryMaxTimeFrame = H4 – Entry Maximum TimeFrame.
- Wait_Mins_For_Next_Trade = 30 – Wait time for the next trade.
- Direction = Both – Trade directions. Both : Allows both, Buy : Allows Buy, Sell : Allows Sell, Disable : Disable Trade.
- Slippage = 3 – Maximum price slippage for orders.
–Automatic Stop Loss and take profit
- AutoStopLoss = AutomaticStop – Automatic stop or manual stop.
- MaxBarsToCheckStop = 3 – MaxBars To Check Stoploss.
- TPTimesStopLoss = 3 – TP is 3 Times StopLoss.
–Manual Stop Loss and take profit
- StopLoss = 150 – Stop loss in pips, manual stop.(if not automatic stop)
- TakeProfit = 300 – Take profit in Pips. (if not automatic stop)
- PROFIT = 50 – Orders will be closed as soon as the current profit is equal or above the preset PROFIT.
–Trailing stop settings
- IsAutoTrailing = trail_on – Trailing stop loss 20 – Trailing StartStop in Pips.
- TrailingStep = 5 – Trailing Step in Pips.
关于作者
- 作者:dayingcao,我是一个具有丰富经验的软件工程师.
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END