İş tamamlandı
![](https://c.mql5.com/i/avatar/avatar_na2.png)
İş Gereklilikleri
The first section will describe the EAs trading strategy logic and features. The second section is an outline of the inputs that the EA should contain.
1. The idea of the trading system is as follows:
-
This EA enters trades based on fibonacci retracement levels when other (MACD, RSI) conditions are met.
-
It will use a MACD from a particular time frame to establish the swing high and swing lows which the fibonacci tool will draw the retracement levels.
-
The EA will have the option to use fibonacci levels for TP, take profit in pips, or TP in % to take profits.
-
It will have the option to use fibonacci levels for SL, or SL in pips, and SL in % to close losing trades.
-
It should also include an option to set entry, tp, sl , x amount of pips away from the fib level, or at the nearest multiple of 25 (below for long trades, above for short) see Snap to multiple below
-
Snap to multiple - Option to have trades (entry, trades in a string, tp, sl) snap to a nearest multiple above or below retracement levels. (i.g. 25, 50 100 ..ex for 25 1.2425 1.2450, 1.2475 1.2500). Above for long trades, below for short trades.
-
The EA will have the option of trading 2 ways. 1. A single trade (i.e. price retraces to the 61.8 level and opens a trade the price continues to fall and eventually hits the stop loss.) 2. The EA will open a trade when it reaches a retracement level, and open limit orders on other retracement levels and open another trade if price continues to fall (i.e price retraces to 38.2 and opens an order and places limit orders at 50 61.8 and 78.6. The EA will keep previous trades open and open subsequent trades at 50, 61.8 etc)
-
It will have a martingale option (String lot multiplier) in the same trade, and on subsequent entries if the previous was a loss for both types of trades the EA can make. (i.e for trade type 1 if the first trade of .10 lots results in a stop loss, when entry conditions are met for the next trade it will open a trade of .20 lots and continue to multiply the lots until it hits a TP. For trade type 2 it will open the first trade at .10 at 38.2 and limit order of .20 .40 .80 on levels 50 61.8 and 78.6.
-
Ability to set a risk % so the EA will calculate how many lots to trade based on account balance.
-
Option to use trailing stop and trailing step
-
A clock to set trade times
-
Have a display panel on the screen that shows balance, equity, profit or loss on current open trade, profit for today, week, month, and year.
-
Option to close trades when MACDs on a particular time frame goes from positive to negative or vice versa.
-
Ability to edit RSI setting
-
Option to choose multiple MACDs to determine the trend (i.e H4 and D1 macd need to be positive for a long trade)
-
Section for fibonacci tool settings include
-
Option to choose which time frame the FRT will draw retracement levels from using the macd from that times frame
-
Settings for the MACD
-
Space for 7 levels 0.0 23.6, 38.2, 50, 61.8, 78.6, and 100
-
Option to turn on/off entry, tp, and sl for each level
The following is the order in which each feature should appear in the EA inputs. Most are self explanatory. I’ll try to provide an example (ex) of what the feature should do next to it.
-
Money management - there should be a true/false option next to each so the EA knows which one to use when trading.
-
Lot size (.01, .10)
-
Risk size % - it will calculate the risk based on how much the trade could lose at the stop loss. Ex 5% risk - for trade type 1 if the stop loss is 50 pips away and the account balance is $1,000 the EA would make a trade for .10 lots so if it loses it will only lose $50 or 5% of the equity.
-
It will do the same for trade type 2 except it will divide the risk among multiple trades/entries. If there are 5 trades including entry and limit orders, the EA will divide 5% risk among the 5 trades. If martingale strategy is used it will calculate the amount of lots to use so that the total loss does not exceed 5% if the stop loss is hit.
-
Take profit in pips - if this box is marked true then the trade will take profit when it reaches x amount of pips even if it does not make it to the take profit placed at the next retracement level.
-
Ex the take profit is 50 pips, and the TP at the next retracement level is 75 pips away the EA will take profit when it hits 50 pips and close the trade.
-
If the EA is supposed to TP at 50 pips and the TP at the retracement level 40 pips away, The EA will TP at the retracement level 40 pips away and close the trade.
-
So if a TP is selected for a retracement level and a TP in pips is selected the EA will take profit and close the trade at whichever one it hits first.
-
Stop loss in pips - This will follow the same logic as take profit in pips except it will be for the stop loss.
-
Martingale settings
-
Lot multiplier - if there are multiple trades in the string, this determines which each subsequent lot would be. Ex if 2 is entered and the first trade is .10 lots the next trade would be .20 (.10 * 2=.20). If 1 is entered each trade would be .10 or whatever the first trade is.
-
String lot multiplier - This setting is used to tell the EA to multiply the next trade by x amount, if the previous trade hits the stop loss. It will continue to do so until it recovers to the amount the account was at before it stopped out. For trade type 2 it will multiply the initial trade as well as the others until the original balance has been recovered.
-
Multiples
-
Enable multiple - if true, trades will be entered, and TP will be placed on nearest multiple (for long trades, entry nearest multiple above retracement level, TP on nearest multiple below retracement level, SL nearest multiple below retracent. The opposite for short trades) . If false, trades are entered, TP and SL are placed exactly at the retracement level.
-
There should be an input for which multiple is used.
-
Ex 25 trades, TP, SL placed on 1.2400, 1.2425, 1.2450 etc.
-
Ex 50 trades, tp, sl planced on 1.2400, 1.2450, 1.2500
-
Ex 100 trades, tp, sl placed on 1.2400, 1.2500,
-
Indicators - there should be space for all the applicable settings for each indicator.
-
9 spaces for RSI settings for minute 1 time frame to Month 1 time frame
-
9 spaces for MACD settings for minute 1 time frame to Month 1 time frame
-
There should be a true/false option next to each. If The time frame is marked true, a trade can only be entered if conditions are met on each time frame selected. There should be a buy and sell level for each MACD. Ex if the buy level for the MACD is set at .005 the MACD would have to at least be .005 or higher for a long trade to be initiated.
-
Fibonacci retracement tool (FRT) - this is the section for the fibonacci retracement tool. It will use the MT4 default FRT.
-
The FRT will draw its swing high and swing lows from a designated MACD time frame.
-
For long trade setups - When the MACD is in positive territory the FRT will draw from the swing low to the swing high. The swing low should be at the bottom of the lowest candle that occurred when the MACD was in negative territory. The swing high will be at the highest point of the highest candle. The EA should continue to recalculate the FRT as the price continues to reach new highs.
-
For short trade setups - When the MACD is in negative territory the FRT will draw from the swing high to the swing low. The swing high should be at the top of the highest candle that occurred when the MACD was in positive territory. The swing low will be at the lowest point of the lowest candle. The EA should continue to recalculate the FRT as the price continues to reach new lows.
-
FRT time frame - this is the first input in this section - the EA will draw the FRT from the swing high and swing lows of this MACD’s time frame. There should also be an area to provide the indicator settings for this MACD
-
FRT levels - this section is where I will tell the EA which fibonacci levels to use for entries, TP and SL. There should be inputs for 0.0 23.6, 38.2, 50, 61.8, 78.6, and 100
-
There should be 3 inputs under each level, except 0 and 100 which will have 2
-
Entry - Levels - 23.6-78.6 will have true/false options to be used as potential entry points for trades
-
Take Profit - All levels 0-100 will have the option to be used for take profit. If a trade is entered at 61.8 and 50 is selected as a TP the EA will close the trade there. If a trade is entered at 61.8 and 50 is not selected as a TP but 38.2 is the EA will not close the trade until it hits 38.2 (or the nearest multiple if that’s selected).
-
Stop Loss - All levels will have the option to be used as a stop loss.
*Note - only 1 trade should be opened after hitting a level. Ex: if a trade is opened on 38.2, goes up but doesn’t hit tp and then touches 38.2 again, it should not open another trade there. The next trade would open at the next level. If the trade is stopped out, rises and hits the 38.2 again it can open another trade.