작업 종료됨
명시
Just an EA I can attach to a chart so once Slow EMA crosses the Fast EMA (slow EMA is above the fast EMA) I want the EA to enter a short position and once the Fast EMA crosses the slow EMA (the fast EMA is above the slow) I want the EA to buy and enter long. I want the EMA to close orders at the intersection of the EMAs and enter a position either by buying or selling.
MA's time frame as per the launched pair.
MA's values must be fully configurable: Period, Method (exponential, simple,...), Apply to (open, close,...)
No need to close multiple EA's as I will run just one EA per pair/account so it can work by using the same magic number as the running EA.
Specifications:
1. 1. An EA that trades at the intersection of 2 MAs based on the closing of the previous bar.
2. 2. EA Signal is based on the previous candle.
3. 3. A trailing stop loss.
4. 4. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the fast EMA value is greater than the previous one, the trend is seen as growing (ema_fast > ema_slow). Alternatively, if fast EMA is below the previous one, the trend is considered to be falling (ema_fast< ema_slow).
5. 5. Trading Signals:
- Buy signal: the fast MA line crosses the slow MA line upwards (ema_fast > ema_slow)
- Sell signal: the main fast MA line crosses the slow MA line downwards (ema_fast< ema_slow). The below figure shows Buy and Sell cases.
6. Positions are closed at opposite signals: Buy positions are closed at Sell signals, and Sell positions are closed at Buy signals.
7. Positions are opened at the market price, when a new bar emerges. The Expert Advisor is to be tested using Open prices (for buying and selling signal) and Close prices (for the MA intersection signal and closing open orders).
Parameters:
Fast EMA period: 20
Slow EMA period: 7
shift for both fast and slow : 0
Slippage:0
TakeProfit: 0
StopLoss:0
The takeprofit is Zero as it will takeprofit / loss at the intersection by closing the orders
Any question, please, just ask.
Thank you.