- Most Forex traders lose all their money.
- Using the robot posted here in trading Forex does not guarantee success.
- Trading this robot could lead to serious financial loss.
- Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
- This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
- To trade this robot, you have to understand:
- basic support and resistance applied to Forex trading.
- the principles of Nanningbob Recovery trading.
Welcome to Pippo. Pippo is born out of some emails sent to me recently by Pippopotamus and is named in his honour. Step forward and take a warm round of applause, Pippopotamus. Pippopotamus is no longer involved with this project, but he has our undying gratitude for providing the inspiration for it.
Pippo uses Murrey Maths to indicate increasingly strong points of support/resistance, points at which the market is likely to stop and reverse. It is a 'counter-trend' or 'retracement' trader.
Murrey Maths applies to Forex trading thus:
- take the high and the low of any chosen period of time and draw lines at these levels.
- calculate the distance between these two lines and divide this up to create 8 bands of even height. These are often called 'octaves' (incidentally and irrelevantly, on the piano the distance from one note to the next with the same name, is called an octave).
- Label the outer limits of these bands 8/8 (top) and 0/8 (bottom.
- Add two further bands above and below the existing extremes, creating 12 bands altogether.
Have a look at the first picture. It shows all the available lines and bands.
Trading the bands
Most markets spend most of their time wandering around the center of the bands. We are not interested in these. We wait until the market reaches those levels marked L1, L2, L3, L4 ('Level 1', 'Level 2') etc. We trade in the opposite direction to the market movement when it reaches one of these levels so at:
- L1: at the brown 7/8 we sell; tp target is the dashed brown line below. At the brown 1/8 we buy; target is the dashed brown line above.
- L2: at the turquoise 8/8 we sell; tp target is the dashed turquoise line below. At the turquoise 0/8 we buy; target is the dashed turquoise line above.
- L3: at the purple +1/8 we sell; tp target is the purple purple line below. At the purple -1/8 we buy; target is the dashed purple line above.
- L4: at the yellow +2/8 we sell; tp target is the dashed yellow line below. At the yellow -2/8 we buy; target is the dashed yellow line above.
The target line is a user-defined percentage of the octave size. The relevant input is TargetAsPercentofOctave in the Murray Maths Inputs section. The default should be 50, so adjust this if I have left it at 75 whilst developing the bot.
This sounds complicated, so take a few minutes to study the picture and get used to the levels - the label descriptions are helpful (bear in mind also that the lower dashed line colours are incorrect in the pictures). Newbies with trade-the-trend ingrained in your souls need a thought reversal process to take place before you can grasp this.
Lot sizes make use of the Recovery principles we have learned via Nanningbob and The Beast. (Newbs, read 'A note to newbie traders' further down.)
I started from the principle of using Pippopotamus' 1.2.6 Recovery. For the fourth lot size, I decided upon 22.214.171.124. As the market enters each band that contains a trading level, Pippo send a pending limit trade at that level. If the first one triggers and the price then retraces to the tp level, all well and good. If the market continues and triggers successively higher-level trades, then the increasing lot size means that the highest level trade retracing to its tp will automatically mean that the basket is in profit and can be closed.
Time frames and line recalculation
Pippopotamus sent me a trading system to code based on trading H4/D1 charts. I have been demoing on the H1 to generate trades more quickly. On the H1, MM level recalculations happen quite often. When this happens:
- Pippo deletes any unfilled pending trades
- As soon as any basket of existing filled trades reaches breakeven, it closes the basket. It never closes a basket at a loss; sometimes a 2-trade basket is at BE but has turned into a small loser by the time both trades are closed. This is something you simply have to live with, so whinge about it at your peril.
The power of this system and dealing with losing trades
It is the sheer distance that the market has to travel in one direction before triggering a trade that makes this system so powerful. By the time an L1 trade triggers on the H4 chart, it has moved a gazillion pips already and the move is already starting to run out of steam. Therefore, my method of dealing with losing trades is to ignore them and allow Recovery to do its thing.
Ok, so maybe it will become necessary to step in following a ridiculously prolonged retracement-free trend ("Death trade) or several MM line recalcs. Perhaps some manual intervention will be needed then. That apart, this is about as near to a set-and-forget EA that we are likely to reach.
To put the scale of MM levels into context, look at the second picture. This is an H1 chart with ChaserL's Sixths indi included - the yellow arrows highlight the hi-lo of the sixts. MM lines comfortably engulf the Sixths and long trading will only commence long after Sixths trading had left us with one of Bob's 'leaky toilet' trades to deal with.
Then look at the third picture - an H4 chart including Sixths. To show all the MM levels, I had to scrunch the chart up so small you can barely make out the candles and the Sixts are just a coloured line in the middle of the chart. Look at the distance in pips between the hi-lo of the MM grid. Wow.
What this means is:
- Pippo H4 trades are going tobe few and far between. They will be open for much longer than TB trades but will be far more profitable individually.
- Pippo H1 trades will be more frequent and close more quickly, but will be more prone to MM line recalculations.
- Pippo D1: will it ever trade?
Dealing with Death Trades
Note: this code has yet to be tested.
A Death trade is one where the market refuses to retrace, carrying on instead far beyond the outer yellow lines.
Pippo draws dotted red lines an octave above the high and below the low yellow lines. When the market reaches these lines, you have these options:
- Close the entire basket of trades. This is currently the only option available to US traders without an offshore account. Set CloseLosingBasket to 'true' to take this option.
- Hedge the position:
- UseHedging: turn this to 'true' to take this option.
- HedgeLotMultiplier: Pippo multiplies the total lots open over all the open trades by this number to calculate the hedge trade size.
- If the market continues on its merry way, Pippo will eventually be able to close the basket of trades at breakeven.
- if the market chooses this moment to retrace and eventually returns within the yellow lines, Pippo will close the hedge trade and manage the remaining trades as normal. There is an input that will prevent the hedge-trade closure: if CloseHedgeOnReturnToGrid is false, then Pippo will not close the hedge.
Note that once an L4 trade is open, Pippo no longer redraws the MM lines. The idea is that once a position reaches this stage, then it matters not a jot what the MM lines say; traders are hangiong on by the skin of their teeth and praying for a retrace. It remains to be seen whether this approach is a plus or a minus.
Ok, having written the above, I can say this: anyone who imagines they would not be managing the position manually by the time it gets to this stage needs to be involved in more fruitful enterprises than trading Forex - sunbathing at Cape Wrath in January, for example or: persuading domestic pussy-cats to behave altruistically; painting the damp mid-summer lawn red and expecting it to remain red; baying at the moon. I add this section because people want it, not because I have the kind of rabidly deranged dreams in which it could actually prove useful. Have fun playing though; I will be delighted to be proven wrong.
Droland worked out that closing buys at the usual Ask and sells at the normal Bid reduces the profits from a trade quite a lot on the H1 chart (because of the spread). So now:
- Buy trades close when the Bid hits the dashed line.
- Sell trades close when the Ask hits the dashed line. To see this on your charts, you need to have the Ask line showing:
- Press the F8 key to call up the chart properties window
- Click the Common tab
- Tick the Show Ask line box and click OK.
Paul (batemap) has added a take profit function. Thanks Paul; warm round of applause.
If this function is enabled Pippo will close all the trades for the pair in question when the user defined profit level is achieved.
The parameters are: -
- TakeProfitBasket, true to activate this function.
- TakeProfitPercentage, close the basket when the profit reaches this percentage of the current account balance. A future development could be to relate this to the total lots that have been opened on this pair. Use 2 for 2%, not 0.02!
- TakeProfitDollar, close the basket when the profit reaches this dollar value.
Paul has also added an individual trade stop loss feature. When enabled, this tells Pippo to set a stop loss at the octave above the trade (for a sell) and below (for a buy). The relevant input is UseIndividualTradeStopLoss - defaults to false. I strongly recommend that traders do not use this feature as it defeats the object of Recovery and will kill Pippo's profitability potential.
TB margin etc filters
You will find all the usual margin filters to avoid overtrading. They do not operate at pending trade-sending time; we need the pendings in place so that they can fill if the market reaches the appropriate price.
- UseZeljko: this ensures that a second trade including one of the currencies already being traded is 'balanced. The easiest way to explain this is with an example:
- Buy GBPxxx open, so only sell GBPxxx. So, if the buy is GBPUSD, then only sell GBPJPY, GBPCHF etc. The rationale is that forex markets are highly sensitive to big movements caused by international events. If something drastic hits the GBP and you are in two sell positions, then both are heading horribly into drawdown. If one of the trades is a buy and the other a sell, then one is going down the tube but its balancing buy is heading for the stratosphere.
- Once a trade fills, Pippo should then delete any existing pendings whose fill would not result in balanced trades. Imagine there are GJ and GU buy pendings in place and the GU fills; Pippo should then delete the GU trade.
- OnlyTradeCurrencyTwice: using the balanced pair example, the GBP is now involved in two balanced trades. Another trade involving the pound will unbalance the trades and leave the trader exposed to a horrible counter-movement. This filter prevents the GBP from being involved in any further trading of different pairs. It also operates at pending-trade sending time and will prevent the pending being sent if it would violate this filter.
- I have included the swap filters for reasons that will become obvious if you trade the high-cost swap pairs in the wrong direction.
Pippo will generate this error frequently; "Trade context busy". MT4 is the most unmitigated, horrendous crap imaginable. An 18 year old computer studies student presenting it as an examination project would fail the exam. Amongst the legion of things it lacks is any kind of instruction queuing system. When two instances of an ea try to send an instruction to the platform at the same time, or even nearly at the same time, it hangs up its hat and goes on strike. There is nothing I can do about this, so live with it.
Pippo lacks my usual on-screen information. The screen is already rather crowded, so there simply is not room.
Ignore them unless you know what you are doing. The MM inputs correspond with the indi whose code I have pinched to draw the lines; I include them only for the inveterate tinkerers.
One more credit
You do not need any indicators on your chart - Pippo draws the lines. For the code that achieves this, I am indebted to Vladislav Goshkov and his Murrey_Math_Line_X.mq4 indicator; I shamelessly pinched the code from this indi.
A note to newbie traders
Newbies, there are concepts that are second nature to many of us that will leave you confused and possibly frustrated and upset. Start by going to The Beast at http://www.forexfactory.com/showthre...=1#post4135863. Download the user guide and read the section for newbies at the end, and the brief description of how Recovery works. You are unlikely to grasp these principles in this thread and I am not undertaking the task of educating you in concepts that require you to do your own research.
You have a frightening amount to learn; stick with it and you might, just, avoid the fate I describe in my serious warning at the start of this thread.
Please help the newbies
I ask those of you with experience to keep an eye on the partner thread and help out the newbs with their problems.
These are not onerous, so break them and I will ban you:
- Be constructive, friendly and helpful.
- You may be critical:
- You are allowed to say: "This will not work because......"
- You are not allowed to say: "This is lunacy and your are all cretins. Only dimwits trade lile this." Not twice, anyhow.
- Do not ask questions the answers to which are to be found in this post. It took me a looonnngggg time to prepare. Showing by the stupidity of your question that you cannot be bothered to read it properly will annoy me. I will allow my annoyance to show; bluntly; just before banning you from further posting.
I have been ironing out the wrinkles from the code for several weeks. Pippo has been on an H1 demo all this time and has been consistently profitable, averaging the 1-1.5% per week that we achieve with TB but with a fraction of the drawdown.
I cannot make lot-size recommendations because I do not yet know what is safe. The defaults are those I am using on my IBFX Aussie 1:100 demo, start balance $2000; next week I shall bump these up a bit to see what happens.
Have fun. Let's see if this baby really is as good as it looks.
- MaryJane has posted a fabulous utility to allow us to resize EA input windows: http://www.forexfactory.com/showthread.php?t=299017
- Multi purpose trade manager: http://www.forexfactory.com/showthread.php?t=89371
- Account equity analyser: http://www.forexfactory.com/showthre...16#post4693716Also at http://www.forexfactory.com/showthre...98#post4709098, which includes a template for both USD and the Euro.
Most promising trading EA's
- The Beast: http://www.forexfactory.com/showthre...=1#post4135863
- Reversi: http://www.forexfactory.com/showthread.php?t=294255
- Ibuks: http://www.forexfactory.com/showthre...88#post4656888
- FTLR: http://www.forexfactory.com/showthre...85#post3831885
I have restricted the ability to post in this thread to: traders with at least 1 voucher; and traders on my 'buddy' list. I have done this because I do not want the thread cluttered with 'newbie' questions about the basics. New/inexperienced traders, this is not intended as a direct insult. What I want here is discussion with traders who fully understand what it is they are doing; when you newbs have been around a while, you will come to understand what a difference experience makes to the posts a member writes and shudder at the recollection of some of the questions you asked. I do. http://cdn.forexfactory.com/images/s..._the_floor.gif Go to your profile page; there is a link to the FF page that describes the voucher process.
Do not attempt to get around this by sending me pm's asking for help with your basic problems. Doing so will earn you an automatic ban from all of my threads.
I have set up a partner to my restricted threads at http://www.forexfactory.com/showthre...66#post3948666
There, you can post the questions that you cannot post here, about anything you need to know. Someone with the knowledge and experience you need will answer.
Traders/coders with experience who have not yet been vouched for, can get around this restriction be being added to my 'buddy' list; all you have to do is pm me to ask me to do this.