- long term MACD 30,60.30
- Short term MACD 12,26,5
- 5/15 min candle chart (optional)
The long term MACD is used to give the direction in which it can take trades, eg when the histogram is positive take long trades and when negative only take short trades.
Once there is a trend going on the long term MACD look for a pullback on the short term MACD, it must go negative on the histogram for a least 2-3 bar.
The original thread is this :https://www.forexfactory.com/showthread.php?t=163700
So i wanted to make an EA to auto trade with those conditions,so i Hired a professional MT4 coder to do it.
During the tests with TickData in M5/M15,i had some good results but when we talk about grid,the main problem is how to control the DD.
This EA has parameters 4 parameters to do that which you might want to play while testing,or make any improvement in the code.
Some of Parameters which you might need explanations :
1.//Add lot - when the price goes against your order,it will open another order with initial lot + //AddLot
2.//One trade per acc by magic :
- false > same magic number for all pair,each one works for its own. Its a waste of time giving different magic number to all pairs.
- true > same magic number for all pairs,the Ea will check if any other pair has a order opened and if not it will open the order,
but if there is another opened,it will not open another. This way only 1 pair will trade,the one who opens first.
For those who want to keep the DD in control,i thought this is a good feature.
3.//X bars before (minimum average distance) - It will check the open/close price for last X bars of TF below and open a order if the price has gone against you and the distance is >= than this average.
//X bars before TF = I prefer H1 or H4.
============ Close part from grid ============
4.//Start close part when we have X orders (0 - not use)
//Ammount of orders for close = 2
//Minimum sum for close = 5
If the grid has opened 6 Sell Orders and the profit of order 5,6 is = 5,it closes 5,6 .
For the coders out there, you might see in the code that this EA is also a manual trader which respects the grid conditions. You can tweak the code as you like.
Lets see what happens.