Dear Fellow Traders and MT4 coders:
Like many of you, I have marveled at the potential of martingale systems only to find myself disappointed at the inevitable wiped account.
Similarly, grid systems have that same trading sex appeal. I have used many manual grid systems and have come to the conclusion that grid trading is probably the way to have somewhat the feel of a martingale, and with the right tweaking, maybe avoid the feared account wipe. As always, you should test and tweak in a demo account and arrive to your own conclusions.
I have been playing with a profitable technique that hopefully one day may become a very profitable tool in any forex-trader’s arsenal. Hopefuly some good coders from this great community will take on this project. My mql4 coding techniques are very raw and poor, so I cannot be of any coding help, however, I can contribute with my ideas on my manual grid system and code it into an EA.
First of all, I am sure many have their own theories on how grid systems work, should work or "just don’t work". Please, don’t ridicule my ideas or bash me, I am not here for that. If you don’t like my ideas or the ideas of those who decide to join this thread, then just stop reading and find a thread that is to your liking. Just give it a try and do your own testing and tweaking, who knows, you might be the one to find the hidden code
Ok here it goes:
My system is a combination of ideas from many grid systems that I have looked into and many readings on grid trading theories. It is a very simple system in that there is no need for indicators or technicals. In developing this system i've had my share of many frustrations, many sleepless nights and many Aha! Moments.
What I have noticed is that to keep my manual grid system “profitable” I have to do a lot of work. This is where a well coded EA on the simple principles of this manual system would be very valuable.
The finished EA should have varied options to allow all testers to tweak the system and “find” the right formula!
The system is simple. I call it the NY grid trader system…
Any pair ( I prefer Eur/Usd because of the usual low spreads), 1H time frame
1. Open a chart and look at the current pair quoted price.
2. That price is the center of our grid.
3. I usually place 20 limit orders for my grid ( 10 buy limits and 10 sell limits) this is a number that should be tweaked by the trader in the EA for testing.
4. Starting from the center price, I count 10 steps(pips) up for each SELL limit order and 10 steps(pips) down for each BUY limit order... Yes…I am placing sell orders on top of the center price and buy orders under the center price. This technique has shown me better returns. It is essential for this system.
5. As limit orders are hit and closed I keep placing duplicate limit orders to keep grid active and fresh.
6. I set the TP on each order to between 5 and 8 pips.
7. I set up a target profit grid in $$$ ( I find it easier than pips, its just my choice). What I mean by this is that once my grid reaches the target profit, I close all active orders and all pending orders and I am done with that grid. I then start a new one! I start from step one all over again.
8. If during my ACTIVE grid I noticed that prices move OUTSIDE the grid, I cancel all PENDING orders and redraw a new grid (start from step one).
9. I, of course, set my own drawdown tolerance and when I am not feeling easy, I close all open and pending orders and start all over again.
10. What has made my system profitable is that I don't get greedy and I keep my $$$ profit goal for each grid very modest. Then I redraw a new grid with a new current center price. This allows me to use "many" smaller profitable grids instead of one huge profit grid that eventually blows itself out.
11. Of course, money management is essential and you should either utilize a MM technique or use a fixed lot size depending on your account funds.
So there it is…My NY grid system…simple yet full of potential.
Here is my Idea on coding rules for my NY Grid system into an EA.
When the user decides to attach the EA to a chart, the EA should give the user the following options:
1. Panic (true/false) – if set to true, well, it will close and cancel ALL current and pending orders. Default should be false
2. Close open trades (true/false) – if set to true, it will close ONLY open orders Default should be false
3. Close pending trades (true/false) Default should be false.
4. Reverse system (true/false) – if true, system will place BUY limits ABOVE the center price and SELL Limits BELOW the center price ( this is the opposite of the original system) Default should be false.
5. Profit – Enter the $$$ amount that the grid should work towards reaching. Once this money amount is reached, the grid will follow rule number 6 from my manual system.
6. Profit Auto Grid Redraw – (true/false) this will tell the EA if it should automatically redraw a new grid with the same parameters as the previous one, if the EA had to close the previous one due to reaching the PROFIT goal. If this is set to “true” The EA should use the “open” price of the “next” candle as the “Center Price” to redraw the new grid. Otherwise, if set to false, the EA is done and you will have to manually restart the EA with a new grid. Default should be false
7. Max DD – Enter the $$$ amount of maximum drawdown the trader is willing to take. Once reached, EA closes all active and pending orders.
8. Max DD Auto Grid Redraw - (true/false) this will tell the EA if it should automatically redraw a new grid with the same parameters as the previous one, if the EA had to close the previous one due to reaching the MAX DrawDown levels. If this is set to “true” The EA should use the “open” price of the “next” candle as the “Center Price” to redraw the new grid. Otherwise, if set to false, the EA is done and you will have to manually restart the EA with a new grid. Default should be true
9. Close if Outside Grid – (true/false) if set to true, EA will close all active and pending orders if the chart pricing moves away from the grid size. Default should be false
10. Outside Grid Auto Redraw - (true/false) this will tell the EA if it should automatically redraw a new grid with the same parameters as the previous one, if the EA had to close the previous one due to chart pricing moving outside the grid goal. If this is set to “true” The EA should use the “open” price of the “next” candle as the “Center Price” to redraw the new grid. Otherwise, if set to false, the EA is done and you will have to manually restart the EA with a new grid. Default should be false
11. Broker pricing system – Enter 5 or 6. this are the amount of digits your broker uses to price all pairs. It would be nice if the EA could use this field to automatically calculate and work with any broker pricing.
12. Center Price – Enter the current pair price here. This will be the center of the grid.
13. Grid Size – If for example, we use 20 the EA will place and draw 10 sell limits above the center price and 10 buy limits below the center price. The orders will be distanced by the following input.
14. Orders Distance - Enter here the amount of pips that will separate each order set forth on “Grid Size” Default should be 10 but tweak to test.
15. Stop loss - I don’t use it but it is nice to have in order to test
16. Take profit – Each order will close when this pip amount is reached. Default is 8
17. Lots – amount of lots to be traded per order
18. Money Management (true/false) – if set to true, EA will determine percentage of funds to risk in each trade. Default is false
19. Investment Risk – this number is the percentage of risk you are willing to take from your funds. If you are going to use MM a good rule of thumb is 2% but it is up to you. The EA should be able to calculate and modify each pending order lot size as money is accumulated.
20. It would be nice if user had an option in the input tab to buy only, sell only or both buy and sell
Well, I hope this inspires some coders to tackle this project and I hope this systems (the manual version or the future EA) makes all of you very profitable some day!