仕事が完了した
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
==Strategy Outline==
This strategy is a mean reversion strategy which uses 3 Indicators.
· RSI with Overbought and Oversold Levels (Length 4, OB=10, OS=90)
o The RSI gives us short term momentum signals against the trend
· 3 Exponential Moving Averages (Length 50, 90, 230)
o The 3x EMA provide a clear view of the prevailing longer-term trend
· Damiani Volatmeter (Standard settings)
o The Damiani Volatmeter is used to detect when there is high volatility in the market and equally also show when the market is in a range in the short-term
· ATR
o (SL=4ATR/TP=1.33ATR) This strategy has a negative risk/reward ratio of 3:1 but has a win-rate of appx 80% - giving an approximate profit factor of 1.4 BEFORE SPREADS AND SLIPPAGE
==Long Entry Criteria==
RSI(4) crossed up above OB level (10) AND (50 EMA > 90 EMA > 230 EMA) AND DV white above green (flat market)
==Short Entry Criteria==
RSI(4) crossed up above OB level (90) AND (50 EMA < 90 EMA < 230 EMA) AND DV white above green (flat market)
==Specific Requirements for the EA==
Indicators
RSI used should be the standard RSI in MT5 – as such all its parameters should be accessible as strategy variables.
The EMA’s used should be the standard EMA available in MT5 – as such all its parameters should be accessible as strategy variables.
The Damiani Volameter is available here (https://www.mql5.com/en/code/21700) and I would like all its parameters available.
As per screenshots above we can have the EMAs on the main chart and RSI and DV underneath.
Risk Management
While this is a somewhat functional strategy, I will require some other features related to risk management to mitigate the difficulty of it being on low timeframe.
Position Sizing
o Fixed Lot Size (float)
o Percent of Equity (float)
Order Type
· Market
· Limit
o I would like to configure limit orders with a number of pips behind price so that I can get a fractionally better entry
3 Styles of ATR Stop Loss
· Static TP/SL – these are each multiplier of ATR but would like this to 2 dp please with a max of 10 each (something large)
· Static TP/Trailing SL – same as above but the SL immediately trails rather than remains static.
· Partial TP with Breakeven/Trailing SL – The trade’s stop loss trails immediately but once TP is hit a fixed percentage of the trade is closed and the rest of the trade is left to run.
o Breakeven + X pips – I’d like to add a pip to break even to bring the order into slight profit this can be configured as a pips integer
Addition of spread to ATR profit target
This would be a Boolean which allows the spread at entry to be tacked on to the profit target so that (SL=4ATR/TP=1.33ATR) becomes (SL=4ATR/TP=1.33ATR+<SpreadAtEntry) when invoked.
Adverse Spread Filter
If the spread is too high the strategy should NOT trade - this should be configurable in points as seen in the Market Watch pane.
Martingale Option
Due to high win-rates of this strategy I would like to incorporate martingale as an option when ‘Static TP/SL’ or ‘Static TP/Trailing SL’ is selected to analyze it’s effects.
I would like the multiplication factor to be a float rather than the standard 2 here if possible i.e. I can increase position size by 1.4 or 2.5 if necessary.
Code Availability
I would like the EA source code to be made available as I am trying to use this project as a learning resource as I am only proficient in pinescript but will use this a reference.