工作已完成
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
I have EA that were coded fairly recently.
After testing in forward trading environment, I need to add or Modify to change couple of trading rules in the EA.
I will provide the EA once coder is selected and assign the project to coder.
In a nutshell, this project is 1) add Grid space between order 2) Add an option to select number of indicators to look for signal 3) add comment on the screen
======Below is detail example for current situation and what I am looking for after modification. My description seem like lots of request, but it's more of explanation than request ====
(1)
Currently, EA opens when signal comes in xx number of bar.
As an example: If I set the EA --> TF = 5min, DelayGridOrderSettings = 12,
At current bar's closing, price = 1.50000, if rules are met and signal is to take long order, EA will open long order @ 1.50000
then, after 12 bars (which is 1 hr later), price is 1.50100. If rules are still met to go Long, then, EA will open 2nd Grid order @ 1.50100 at the closing of the bar.
(or if price is 1.49910, as long as rules to take long order, EA will open 2nd long order at the closing of the bar, which in this case, 2nd order will be place at 1.49910)
So, I have 2 long orders at this point: 1st order @ 150000 and 2nd order @ 1.50100 (or 1.49910 depends on the market price)
--> I need to add following options.
add: extern int MimGridSpace = 30 pips. (or whatever the settings that I use) ** Make sure to change Point to NewPoint for 5 digits. It's already in the code.
using example above, after 12 bars' later (when DelayGridOrderSettings = 12), if rules still met and signals to take long, I want EA to open
ONLY IF closing of the bar's price at this time is bigger or equal Grid distance settings,
So, 1st order was at 1.50000, so 2nd order should only be placed after 1 hr later (because I used DelayGridOrderSettings = 12 on 5 min TF), if Market price at the closing of this bar is less than 30 pips from the first order, EA will not place order.
So, in a nutshell, Checked for the signal per DelayGridOrderSettings. If price is equal or greater than MinGridSpace from previous order, then, 2nd, 3rd, 4th+++ orders.
(2) Current EA has the rules to find signal based on price movement patterns + 4 indicators combined. (mom, psar, macd, rsi). Based on this signal, EA opens orders and also exit orders if AutoExit = true. When rules changes from Long to Short, all opened orders will close if AutoExit = true. So, if I have Long orders that are not yet closed, if signal changes to take 'short', then EA will close all open orders and initiate first Sell orders.
Code for this is poorly written and I would like to modify, so that I can select which indicators (how many indicators) should give signal in order to open orders and AutoExit.
Current EA has the code written as below (example):
------ if price pattern.... (code here is for the price pattern )
&& (
((MacdSig(1)=="GoLong"||!EnableMacd)&&(MomSig(1)=="GoLong"||!MomFilterEnabled)&&(SARSig(1)=="GoLong"||!PSAR_Filter_Enable)&&(RSISig(1)=="GoLong"||!RSI_Filter_Enable))||
((MacdSig(1)=="GoLong"||!EnableMacd)&&(MomSig(1)=="GoLong"||!MomFilterEnabled)&&(SARSig(1)=="GoLong"||!PSAR_Filter_Enable))||
((MomSig(1)=="GoLong"||!MomFilterEnabled)&&(SARSig(1)=="GoLong"||!PSAR_Filter_Enable)&&(RSISig(1)=="GoLong"||!RSI_Filter_Enable))||
((SARSig(1)=="GoLong"||!PSAR_Filter_Enable)&&(RSISig(1)=="GoLong"||!RSI_Filter_Enable)&& (MacdSig(1)=="GoLong"||!EnableMacd))||
((RSISig(1)=="GoLong"||!RSI_Filter_Enable) && (MacdSig(1)=="GoLong"||!EnableMacd)&& (MomSig(1)=="GoLong"||!MomFilterEnabled))
) &&
-----
What I want in modification is:
add:
extern int SelectNumOfIndySignal = 2;
So, if I set this to 2, EA will look for entry if 2 indicators signals met rules.
Note: I want EA to look for indicator's signal in order of importance. Momentum,--> PSAR,--> RSI -->, MACD in this order.
So, if I SelectNumOfIndySignal = 2; EA will look for Momentum and PSAR signal only
if I SelectNumOfIndySignal = 1; EA will look for Momentum signal only
if I SelectNumOfIndySignal = 3; EA will look for Momentum and PSAR and RSI signal only
if I selectNumberOfIndySignal = 0; then EA will only look for price pattern only and disregard any of indicators' signal.
(3) Current EA displays comments on the screen.
There is BE (BreakEven) and AutoExit comments. It is now display as 0 or 1. I would like this to show 'yes' or 'no".
Also, add the new comments to show above modifications to the screen comments:
MimGridSpace = xx pips
SelectNumOfIndySignal = x (x can be display per my settings. So, I know if this is show 0, I don't monitor indicators. if this shows 1, I only look at the momentum indicator, etc)