READ MORE ABOUT ITReversi: a dynamically calculated x-candle reversal EA by Steve Hopwood

SERIOUS WARNING

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.

</li>

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 RecoveryI 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.

CPU usageTrading 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.

Future developmentA few things to consider:

does this strategy have a future?

does it have any flaws?

what are the optimum CandlesInSeries and CalculationCandlesCount values?

do we need the balance/max pairs/margin filters from TB et al?

how to find the best trade exit?

In conclusionGiven what we havelearned about counter-trend/reversal trading over recent months, I am optimistic that Reversi has a future. Only time will tell, so give it a run and see what happens.

Posting restrictionsI 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. 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#post3948666There, 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.Real Money Doubling Forex Robot Fap Turbo - Sells Like Candy!ORDER NOW

READ MORE ABOUT ITTraders/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.

READ MORE ABOUT ITI've just been having a play in backtesting, i have dukascopy data for jan-april, and it looks promising. Initial runs show that candlestick trailing stop is required to increase profits. Using all other defaults but using cts and sequenceminimucandles=5 over defaults ofr a $500 account the profit increases from $47 to $200 for 16th Jan to 16th Apr.