OsMA plus MA
The strategy is based on OsMA and Moving Average indicators. The Expert Advisor buys when the fast MA exceeds the slow one and OsMA histogram bars are located in the following order: the first bar exceeds the second one, while the second bar is lower than the third one. The opposite is true for selling. The product is designed for 4 and 5-digit quotes and should be launched on a VPS server.
Expert Advisor Installation
It is recommended to launch the EA on several adjacent currency pairs with the same magical numbers. For example:
- GBPUSD, EURUSD, AUDUSD, NZDUSD;
- or USDCAD, USDCHF;
- or GBPJPY, EURJPY, AUDJPY, NZDJPY;
- or other similar linked pairs.
Make sure to allow multitrading. If Inp_Multicurrency is true, the EA works with the same magic number on all symbols it is launched on. When a specified profit, drawdown, breakeven or trailing is reached, all orders in the same/opposite direction are closed and the trading is started anew.
In order to provide operation of the news filter: In the terminal, open Tools ---> Options ---> Expert Advisors ---> add "http://calendar.fxstreet.com" to the "Allow WebRequest for listed URL list" field.
EA template advantages
- It is possible to combine different template features or strategy additions;
- The most efficient functionality compatible with each other;
- Easily optimizable.
- Inp_NewsFilter – disable trading during news;
- Inp_NewsImpotance – upcoming news importance;
- Inp_StopBeforeNews, Inp_StartAfterNews – minute before and after a news release when opening new positions is disabled;
- Inp_StartTime, Inp_EndTime – trading time. 00:00 – not used;
- Inp_BalanceLots – calculate traded lot based on balance (maximum lot/100*Inp_BalanceLots);
- Inp_StartLots – initial lot if Inp_BalanceLots = 0;
- Inp_MaxSlippage – maximum slippage;
- Inp_PercenValues – if true, stop loss, take profit, breakeven and trailing are set in %, otherwise in points;
- Inp_StopLoss – stop loss, 0 – not used;
- Inp_TakeProfit – take profit, 0 – not used;
- Inp_MagicNum – magic number. If -1, the EA works with all orders;
- Inp_EaComment – trade comment;
- Inp_ReverseTrades – reverse positions: open sell instead of buy and buy instead of sell;
- Inp_DiffDirections – allow oppositely directed orders;
- Inp_ModeWithdrawal – disable opening new positions, work in close-only mode;
- Inp_Multicurrency – consider positions at all symbols in calculating a stop loss, take profit, breakeven or trailing;
- Inp_CloseOnSignal – close positions in case of an opposite signal;
- Inp_CloseAllOrders – close all oppositely directed orders when reaching a total profit or loss;
- Inp_BreakevenStop, Inp_BreakevenStep – distance and profit in points for position breakeven, 0 – not used;
- Inp_TrailingStop, Inp_TrailingStep – distance and profit in points for position trailing, 0 – not used;
- Inp_DiffLotsByLock – lock position volume difference on a symbol, 0 – not used;
- Inp_MaxOrdersSeries – maximum number of orders in one direction;
- Inp_MaxLotsSeries – maximum aggregate lot in the unidirectional series of orders;
- Inp_MaxOpenLots – maximum lot that can be used to enter a trade;
- Inp_SendOrderLevel – distance from the last open position for setting a new order opening level;
- Inp_PauseMinutes – pause in minutes between order Open level modifications and order placement, 0 – not used;
- Inp_LevelAveraging – averaging level placing step, 0 – not used;
- Inp_PlusLot – previous lot's additive component for averaging, 0 – not used;
- Inp_PlusRatio – lot increase ratio for averaging, value should be greater than 1, 0 – not used;
- Inp_LevelRebuy – adding level placement step, 0 – not used;
- Inp_MinusLot – subtract from the previous lot for buying, 0 – not used;
- Inp_MinusRatio – lot decrease ratio, value should be less than 1, 0 – not used.