- 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 strategy guarantees traders will lose their money.
Reversi arises from ideas presented by a poster in The Captain's thread and in a pm from another contributor. In his post at http://www.forexfactory.com/showthre...83#post4601883, mobthehope wrote this:
"As macman brought this up, I like to add my 2 cents....
I normally trade H1 and H4 tf and used the probability distribution of said candle sequences with some success in the past.... The attached indicator visualizes this and allows anybody to play with different candle counts on their preferred tf.
I found that 5 same colour candles on H1 gives a fairly high probability of reversal on most currencies..."
I coded something along these lines soon after reading this, but left it to stew in what passes for my mind; it was a failure in Strategy Tester.
A couple of days ago, Ludo Willems sent me this pm:
"I had a bath and had an idea: to continue on The Captain #58. The guy says that mostly after 5 identical coloured candles, a change in trend occurs. I remember to have seen (and couldn't find it again)an indicator that prints the probability of a series of candles: of the last xxx candles, there are: 25 series of 3 candles, 18 series of 4 candles ,etc.., and 1 occurence of 7 candles. So, if you scan for a series of 7 identical coloured candles, the probability is 1/1000 that the next candle will be of the same colour. So, an EA with user imput selector "look for xxx last candles" and "select probability %" would do the job?"
Stunningly useful thingy's, baths. I gave Ludo's pm some thought and managed to get my head around an algorithm that will allow Reversi to:
- calculate and display the number of x-candle series of moves in the same direction, over a users-selected period of x candles.
- respond to either the user or an auto-calculated input that will tell it how many candles must move in the same direction, before triggering a trade in the opposite direction to take advantage of the impending reversal.
- offer trade exits at take profit, stop loss, or any of the usual mptm features.
- use Recovery instead of stop loss. In ST, 1.2.6 is fantastically successful.
Some of the inputs will need a brief explanation:
- TakeProfit and StopLoss: these allow you to use Reversi as an 'I am right or I am out' trader. Do not set a stop loss and use Recovery both at the same time - chaos will result.
- CriminalIsECN: set this to 'true' if your crim enforces 2-stage order sending i.e. first the trade then modifying it with a sl/tp. Note that IBFX are Ecn even though they try to hide the fact, for reasons best known only to those privy to their darkest dreams.
- Candle stats inputs have the greatest potential for confusion:
- CandlesInSeries: this is the number of candles you want the market to move in any one direction before R sends an exhaustion trade in the opposite direction.
- AutoCalculateStats: leaving this set to 'true' tells R to do all the calculations for you. Setting this to false and customising the CandlesInSeries input allows you complete control over the number of same-direction candles required to trigger a trade.
- CalculationCandlesCount: this is the number of candles to include in the series calculation. Leaving this set to zero counts all the bars in your chart. Adjust this input in light of your chosen time-frame and personal preferences.
- UseLongestSequence tells R to use the longest sequence of same-direction candles as its trade trigger. Using this setting will generate rare trades, but they should be ridiculously profitable - theoretically. The default is 'false'.
- UseMostFrequentSequence and SequenceMinimuCandles work together. UseMostFrequentSequence tells R to look for repetition of the same-direction candle movement that is most frequent over the period defined by CalculationCandlesCount. Typically, this is 1, so a further filter is needed. SequenceMinimuCandlesis is the lowest number of candles that must move in the same direction to be considered a series. The default of 6 tells R to consider series with a minimum of 6 candles same-direction movement as worthy of consideration for trading.
- MinimumCandleBodySize: TB calculates the size of the body of the candle, and rejects it from the calculations if the body is smaller than this figure. The 'body' of the candle is that solid block in between the open and close price; the 'wicks' are ignored.
- ShowStats tells R to show all the statistics. Turning this to 'false' hides some of the display detail.
- Recovery inputs: for details go the The Beast's thread at http://www.forexfactory.com/showthre...=1#post4135863 and download the user guide. This has a reasonable description of Recovery. In truth, you need to follow the links in the guide to the thread that first introduced the rest of us to Recovery, but that is up to you. Newbies have so much work to do before even contemplating becoming profitable traders that it is frightening to consider. The good news is that The Beast is up an running profitably on our live accounts, and has been for some time.
- Trade management module: the functions here are the guts of mptm. Those of you unfamiliar with mptm, go to http://www.forexfactory.com/showthread.php?t=89371 and download the user guide for details. Candlestick trailing stop is not part of mptm, although it will be when I get around to adding it; I leave readers to work out for themselves what it does.
A note about series calculation
- Reversi calculates whether a candle is an up or down literally. Even if a candle only closes 1 pip higher than it opened, it is a rising candle and interrupts a falling series.
- Candles that open and close at the same price are ignored.
- CalculationCandlesCount will probably result in the first series in the calculation being incorrectly calculated. I am ignoring this.
A note about Recovery
I am not sure if UseRecoveryTrailingStop is working properly. When enabled, it appears never to close a group of Recovery trades. In ST, the result is fantastically profitable. This may be good luck. I am not sure yet.
Trading decisions are made at the start of each new candle, as are the candle series calculations. This makes cpu usage light and makes backtesting easy using the Open prices only option in ST. Once a trade is open, cpu usage is heavier as the management features are called at every tick.
Trading with the trend - trend detection/setting
You can use R as a pure trend trader, entering the market after a substantial reversal. The inputs have a whole trend-detection module with these options:
- Trading 'original' style i.e. after x candles have moved in one direction, trade in the opposite direction to the move regardless of the overall trend:
- set erything in the trend detection module to false - this is intended to be the default.
- Manual trend setting: use this when you are happy in your own mind that you know the direction of the prevailing trend:
- set either RisingTrend or FallingTrend to true and UseTrendDetection to false.
- You wish to let Reversi calculate the trend for you. Set UseTrendDetection to true, then choose the method you want to use. There are three:
- scooby-doo's D1 20 period Rsi. The market is trending up is this is > 55, down if < 45 and ranging if in between.
- slowkey's MA system from The Beast. If the 100 SMA is > 200 SMA, trend is up or vice-versa.
- the W1 10 period SMA "Single moving average". If this is clearly rising, then the trend is up. If it is clearly falling, then the trend is down. To decide on direction, R compares the MA now with that of CompareWithCandles candles ago. There has to be a minimum movement of MinimumAcceptableMovement pips to be considered significant. The default is pure guesswork. Remember, it is the rising or falling of the MA not the relationship of the market to the line that determines the trend. There is a 'confirmation' MA whose inputs begin with 'Con'. Typically, this should default to a 2-3 weeks period less than the main MA. This shorter MA 'confirms' the trend when it is moving in the same direction. When it is not, it shows that there is a possible trend change starting and R should not be trading.
All the automated trend-detection functions have their own inputs; you need to understand how to use the Rsi and moving average indicators in order to be able to play with the inputs confidently.
The third function, "Single moving average" comes from a book called "Trading Day by Day - Winning the Zero Sum Game of Futures " by FH Goslin. I do not think that I can post a link to the book here as it is copyright, so google it and see if you can find your own copy. Just looking at it on a W1 chart is highly convincing, so I is the one I am going to experiment with on demo.
A note about hedging
The time will come when R gets caught in a trend change. Trust me; it will happen.
When this happens, R will try to hedge its way out of trouble. I am bored with explaining myself and will leave you all to work out for yourself how this function works. Anyone who has not intervened long before automated hedging kicks in should not be trading Forex, so my lack of explanation will not cause difficulty.
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 at http://www.forexfactory.com/showthread.php?t=319709
I have traded this robot on my live account.
Our old friend scoobs has added some extra code to enforce a trade-one-pair-at-a-time safety. Read about it from
http://www.forexfactory.com/showthre...post4885957and download it for now from http://www.forexfactory.com/showthread.php?p=4887417#post4887417
f451 has done a lot of work on the statistics of all this. Read his post at http://www.forexfactory.com/showthre...02#post4833702 then download the latest version at http://www.forexfactory.com/showthre...24#post4842824
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.
- 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
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 thread to this and other 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. I opened it for Nanningbob traders, but feel free to ask about this robot as well.
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.