- 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 some manual intervention.
- At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
- To trade this robot, you have to understand:
- the trading strategy posted at http://www.forexfactory.com/showthre...89#post4887789
- the trading strategy posted at http://www.forexfactory.com/showthre...89#post4887789
Introduction
Eamonn pm'd me asking if I thought KelvinM's strategy could be automated; it is a prime candidate. Warm round of applause, Kelvin, for posting it.
A strategy rarely comes along that is more simple than this. It will consume little of your time and computer resources; run the platform a few minutes before the start of your next D1 candle and for about 15 minutes afterwards, then it can be shut down for the rest of the day (unless you want PTT to carry out step 8 below). There are three key posts in Kelvin's thread:
- http://www.forexfactory.com/showthre...89#post4887789
- http://www.forexfactory.com/showthre...68#post4898168
- http://www.forexfactory.com/showthre...99#post4898199
So, my understanding of all this is:
- Load a D1 chart with a 50 EMA.
- Pull out as far as possible to see as many candles as possible. Ascertain the overall trend from this.
- When I can see a visible trend, trade the bounce off the 50 EMA in the direction of the trend, as long as the market is the right side of EMA and EMA has a decent slope in the direction of the trend, so the requirements are:
- Buy:
- rising trend
- upward EMA slope
- market is above EMA
- market has bounced off the EMA
- place a buy_stop trade at the high of the IB
- Sell:
- falling trend
- downward EMA slope
- market is below EMA
- market has bounced off the EMA
- place a sell_stop trade at the low of the IB
- Buy:
- Stop loss 30 pips.
- No take profit.
- Use the hi-lo of the previous candle as a jumping stop once the trade is in profit.
- Rinse and repead steps 3 to 6 whenever a new IB presents.
- If a filled trade hits its stop loss, replace the pending trade at the same price as the original. Disable this feature by turning ReplaceTradeAfterStopLossHit to 'false' if you do not require it.
It is only possible to code an approximation of Step 3. The more a strategy depends on eyeballing charts, the less accurate automation becomes. I am going to leave PTT as a semi-automated robot, so to use it:
- Carry out steps 1 & 2 from the list above.
- Once the bounce has occurred (step 3) drag the robot onto the chart:
- Select your lot size.
- Select your trend direction.
From here, PTT will do the rest. Check your charts once a day so you can decide whether to leave PTT running or remove it.
Unless there are any bloops in the code, this EA should run ootb apart from the lot size and trend selection inputs. There is a TP option, but using it is not part of the strategy; I include it only because I know some people like to have the option.
Swap costs
Watch the swap display. If you trade the high negative swap AUD, CAD & NZD pairs, the swap costs are shocking.
Avoiding overtrading
To help avoid overtrading, I have included the usual margin filters:
- ScoobsMarginCheck: will stop trading if your account margin > your free margin divided by 100
- ForexKiwi: will stop trading if your margin percent drops below your selected input in FkMinimumMarginPercent.
I also suggest that users pay heed to balanced trading. There are two filters to help with this:
- 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 rapidly towards their stop loss. 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.
- 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.
Two versions
There are two versions of the bot available:
- The semi-automated version that works as described above.
- A fully-automated version:
- this needs the All Averages indi residing in your indicators folder. You do not need it on your chart. Go to the Spider thread linked at the end of this post to read about it.
- you will find the full panoply of trend-detection. The one that approximates most closely to the manual method is the All Averages D1 50 - the default. Note that this does not detect a decent slope, only a rising/falling moving average.
- it is hard to code bounce detection. I have attempted to do this with the LookBackCandles input. When PTT finds an inside bar that is the correct side of the MA and is in accordance with the trend, it looks for a bounce. Taking a potential buy as an example:
- the Low of one of the previous LookBackCandles must have been at or below the moving average.
- if so, then one of the highs in the previous candles up to LookBackCandles x 2 must have been higher than the MA.
The potential fly in the ointment is the bounce-detection routine. The lower your LookBackCandles input, the closer the market is likely to be to the MA and so the trade will be safer, but the more bounces you are going to miss. The further back in time you go to spot a bounce, then the further from the MA the market could be, with the trade correspondingly more risky. I can always code ludo's max pips from MA filter if this proves to be a problem.
If the automated version misses a bounce, then run the semi-auto version for a while instead.
Hanover
The Hanover module allows us to trade in the direction indicated by hanover's Recent Strength indi. I consider this to be the most significant development in my time at FF. Details in the Hanover thread athttp://www.forexfactory.com/showthread.php?t=31970. Only the fully automated version is Hanovered.
In conclusion
Have fun.
Read this post:
http://www.forexfactory.com/showthre...11#post4923611 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.
EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here at FF. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthre...94#post4431794, at the bottom of the post.
Useful utilities/EA's/scripts
- 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#post4693716 Also at http://www.forexfactory.com/showthre...98#post4709098, which includes a template for both USD and the Euro.
- Past-trades display indi by squalou; shows a graphical display of the success/failure of trades in your History tab. Breathtaking piece of work. http://www.forexfactory.com/showthre...10#post3830610
Most promising trading EA's
- Spider: http://www.forexfactory.com/showthread.php?t=313680. I am trading this live.
- BigBob: an implementation of Nanningbog#b V10. http://www.forexfactory.com/showthread.php?t=309980
- Trendy: http://www.forexfactory.com/showthre...82#post4840182, but should be left behind by BigBob.
- Reversi: http://www.forexfactory.com/showthread.php?t=294255 – I am trading this live.
- Rip: http://www.forexfactory.com/showthre...98#post4777998
- The Beast: http://www.forexfactory.com/showthre...=1#post4135863