- 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.
Welcome to Brijon, an attempt to automate Brijon's trading system posted at http://www.forexfactory.com/showthread.php?t=242404.
Don't try to read Brijon's thread; it is a nightmare to read and makes what is just about the simplest system I have come across here at FF look like rocket science. Thankfully, a contributor put the 'concept of threes' into a pdf that makes sense; I have attached this and thank this contributor (whom I shall name when I remember).
Brian has posted a fantastic video explaining how to trade in 'game' mode. View this a couple of times before using the ea:
Here is a link to a download site for the Camtasia software you will need to view the video:
When viewing, find the 'toggle full screen' button to make the screen readable. Subsequent edit: better and easier is to set up the file so you can view it in any of the formats you already have. The post at http://www.forexfactory.com/showpost...&postcount=798 explains how; it is quick and easy to do.
Do not trade this EA live yet: we need to be sure that all the code is watertight; we need to know that an EA can successfully trade this system. There is a lot of development to do.
As I understand it, here is the system:
- 15 minute charts (experiment with other tf's, why not?)
- at the start of a new candle:
- draw a blue horizontal line at the high of the previous candle
- draw a blue horizontal line at the low of the previous candle
- draw a horizontal line at the open of the current candle. Colour this line:
- Gold if the candle opens higher than the previous candle's open. The trend is long and we are looking to buy
- Red if the candle opens lower than the previous candle's open. The trend is short and we are looking to sell
- Trade direction: Brijon appearsto use double tops to confirm short direction, and double bottoms to confirm long direction. To see the charts as he sees them:
- turn the chart to Line Chart type.
- you can see the classic M and W patterns that constitute the double tops (M) and bottoms (W) that Brijon is looking for. The more difficult ones can take a bit of imagination.
- In a confirmed upwards moving market, we are looking for the market to rise above the upper blue line; when this happens we buy.
- In a confirmed downwards moving market, we are looking for the market to fall below the lower blue line; when this happens we sell.
- Stop loss is the hi/lo of the previous candle. The EA also allows for a 'hard' stop loss.
- There is no take profit. Trades are allowed to run until closed by manual interevention. Many here would use mptm to manage these trades. The ea also offers:
- a 'hard' take profit
- a tp based on the length of the previous candle - set UseCandleLength to 'true' to use this.
From here on, 'Brijon' or 'B' refers to the EA, not the human trader.
Automated trade direction confirmation
I know of no way to detect the M and W configurations shown up by a line chart; instead I have adopted these 4 strategies, using different combinations of the UseD1Close and UseW1Close inputs:
- UseD1Close is true and UseW1Close is false: B compares the close of yesterdays D1 candle with that of two days ago. Whatever direction these closures have gone returns a trend direction.
- UseW1Close is true and UseD1Close is false: B compares the close of last weeks W1 candle with that of two weeks ago. Whatever direction these closures have gone returns a trend direction.
- UseW1Close is true and UseD1Close is true: B compares the close of last weeks W1 candle with that of two weeks ago and the close of yesterdays D1 candle with that of two days ago. When these agree, a trade direction is established. When not, no direction is established and B cannot trade.
- UseW1Close is false and UseD1Close isfalse: B trades 'naked' threes as described in post 1 of Brian's thread.
- UseSquareFilter: set this to 'true' and B will consult the square values in its directional calculations:
- Market is above the Square high: the trading direction is up.
- Market is below the Square low: the trading direction is down.
- UseVolume: if enabled, B consults the volume up and down ticks in the chosen time frame to confirm the trading direction. By default this is turned off. It gives the processor a real hammering and freezes my platform if if put B onto more than half a dozen charts.
- VolumeTickCountPeriod tells B to wait for this amount of time before restarting the count. Your input needs to represent a chart time frame i.e. 15, 30, 60, 140, 1440 etc
- MinTicksDifference is the difference between up and down ticks before this becomes significant.
- TicksCountBeforeTrading is the number of ticks you want the chart to receive before it will consider trading. The idea is to give B some time to 'bed in' after a restart.
- UseLSMA: if enabled, (note: disabled by default) B uses two settings of LSMA to confirm the trading direction - the default inputs of 21 & 336. You do not need the indi; the code is inside B, thanks to Squalou. Take care with loading the indi onto a chart; is is a resource hog and will hammer your processor.
- B consults the Bosun lines when deciding on a trade direction. It will not send a trade if the market is < AllowablePipsFrom_S_RAllowablePipsFrom_S_R away from the next line. Set this to zero to turn off this filter.
Good luck deciding which to use. Frankly, if this decision were an easy one to take, then we would all be rich by this time next week.
Trade direction control
You can control the direction in which B trades with the TradeLong and TradeShort inputs.
By now, you should have viewed Brian's video about drawdown management through trading hedged pairs. In case you do not understand this, partial hedging means buying one currency in one pair whilst selling it in another. For example, if you are buying GU, then aim to sell GJ; this way, if the pound has a fainting fit then one of the pairs you are trading will profit to offset the loss on the other.
Brian recommends these pairs:
- Buy pairs: AUDUSD, NZDJPY, GBPCHF, EURUSD, EURCHF, CHFJPY, USDJPY
- Sell pairs: USDCHF, EURGBP, NZDUSD, GBPUSD, EURJPY, AUDJPY, GBPJPY
So, when trading B, set up these 14 charts and set AutoDecide to true. B will automatically set TradeLong and TradeShort correctly for you.
B as an aid to manual trading
Setting SendAlertNotTrade to 'true' tells B not to send a trade, but to notify you with an Alert when it considers a trade-trigger to have happened. If you know how to set up your platform to send emails, it will also send you an email alert.
B comes with the usual trading hours inputs. Input these in your own local time. I suggest you turn off trading for two hours after the start of your new D1 candle, to give the trend time to settle down and establish itself. My trading times will be reflected in the default settings, so alter these to suit yourselves.
Open trade management
B comes with the usual mptm features that are common to all my ea's. You can download the full manager by following the link in my signature. B will also manage trades you have opened manually so long as they have the same magic number.
One feature that is new and not found in mptm is the trailing stop based on a percentage of the size of the Square. This is a feature the Brian requested. To use it, scroll down the inputs to the trailing stop section:
- set TrailingStop to true
- set UsePercentageOfSquare to true
- set SquarePercentToUse to your percentage of the square to use. The default is pure blind guesswork.
Leave the other trailing stop inputs alone unless you are familiar with mptm.
B is sleeping
When you first load up B, it will show a 'sleeping' message. This is to stop it kicking in a trade as soon as it starts up, possibly when the market has already moved too far for the trade to be a success. B will awake at the start of the next candle.
B will also sleep after a trade closure, waking up again at the start of the next candle.
Line colour codes
- Blue: previous candle open and close.
- the current candle:
- Gold: opened higher than previous open.
- Red: opened lower than previous open.
- White: opened = previous open.
- Turquoise, dotted line: yesterday's low.
- Chartreuse: Bosun lines.
- Yellow: short and thick: Square hi/lo
Currently, there are two successful ways of trading B:
- in full automatic mode, treating all the codes as a basket and closing the entire position at a pre-set overall profit. We use mptm Global Closure or basket features for this. Attached is a zip with my set files; remember to adjust the lot sizes.
- Brian is using B as a trade signaller for manual trading. When he receives a trade signal, he looks at all the other elements of his trading decision and pulls the trigger if everything he is looking for matches up.
I have no idea if this robot can be a successful live trader. Let's give him a whirl and try a few different time frames etc and see. We will know quite soon; on the M15 B is a trading trollop.
As usual with manual systems, please discuss this EA here, and ask questions about Brijon's manual trading in his thread. This avoids confusion about whom is discussing what.
All I have done here is hack together an ea that performs the basic functions. Far more significant contributors are the real stars:
- Brian: the strategy designer. Without him, none of this would have happened.
- Squalou: sq supplied the code for calculating the Square and Volatility. Sq is a professional programmer whose expertise makes me look idiotic. His contributions here are breathtaking, especially the Volatility stuff; this is mind-blowing. It is fantastic to be able to call on him to sort me out when I lack the ability to code something.
- MbKennel: Matt supplied the code to avoid duplicate trades that result from the mt4 platform being total crap. This is a far better approach than my solution to send an ea to sleep for, say, 5 minutes after sending a trade to avoid the duplicate-trade thingy.
- Dryclean: for coming up with a way of using Brian's Game strategy - see further down.
B's development section
Here is a list of further trade criteria from Brijon (http://www.forexfactory.com/showpost...postcount=1159). Anything I have done is marked 'Done' in red:
- FIRST 1 YESTERAYS CLOSE AND TODAYS PRICE GIVES YOU THE TREND OF TODAY DONE. (I have interpreted this as: market > yesterday close, trend is up and vice versa.)
- LAST WEEKS CLOSE AS PER BOSUNS LINE IS AN IMPORTANT COMPONENT DONE. (Going to make more use of the other lines in the future).
- THE CROSSING OF BRIANS INDEX WITH THE DOLLAR INDEX Cannot do anything with this.
- THE NUMBER OF BUYERS TO SELLERS AS PER TICK SEPERATED VOLUME DONE
- THE CONFIRMATION OF THE OVERALL LONG TERM TREND MONTHLY AS VIA THE 4 BAR BREAKOUT SQUARE ON THE MONTHLY FIB LEVEL Sort of done, in my own individual way, Not entirely sure what this means and have not received confirmation that what I have done is 'correct'. Haven't received denial either, so make of it what you can.
- THE LSMA 21 INDICATER Done. Seems pretty useless to me.
- FINALY I CHECH WITH THE THREE CORELATIONS ON AN OFFLINE CHART OF THE THREE Not a clue what this means.
- AND THE 3MW VISUAL Impossible to code into an ea. Well, not by me given my current skill level. Who knows what the future might hold?
And then came Dryclean.
DC played with Brian's concept of balanced buy/sell trades and played with leaving just six of the hedged pairs to trade and closing the basket at x dollars profit for the basket overall. His pairs are derived from Brian's original Game set. If you have done the reading, then you know what I am talking about.
To get the idea, take the simplest example of two hedged pairs. This is over-simplistic, but will do as an example.
- buy gbpusd
- buy eurgbp
- if the gbp strengtjens, gu will rise whilst eg falls, and vice versa. At some stage, one move will outweigh the other and you will be able to scalp a few pips profit. When you can see the fallacy of such a simple example, you will be on the way to stopping losing money as a trader. When you can also see how you can make money by extending the example, you are on the right track.
The defaults in the DC version of the bot trade all 14 of Brian's pairs. I have learned from grim and bitter experience the futility of spoon-feeding people here, so I leave you to work out for yourselves why:
- DC's version can often move into profit more quickly than the full version. Hint: think about the spread.
- The full version occasionally moves into profit more quickly than the DC version. Hint: think about volume.
DC' pairs are:
There is an input that allows you to automatically trade DC's pairs - UseDrycleanPairs. This defaults to 'true'.
The ea is Dryclean's Brijon game playing multi-pairauto trader by SteveHopwood.mq4
In response to Nicastro's post at http://www.forexfactory.com/showpost...&postcount=960, I have added a pre-pared version of mptm:
- managing all trades
- trailing stop of 30 pips, locking in 10 at the first trail
- hedging at double the lot size at -40. HedgingIncrementPips set to a ridiculous level to avoid this kicking in.
- Hedging the hedge enabled at a further doubling
The hedging stuff could get messy. We can only experiment and see.
If using the adapted mptm and trading as Brijon suggests in Nicastro's post, I recommend you make these changes to the DC ea:
- reduce your lot sizes and cash profit target
- set PipsToSecondTrade to zero to turn off second-trade addition
- set AllowHedging to false, as mptm will be handling this
Traders familiar with my work need read no further.
A little note to newbie traders
My approach to some contributors will leave you a little confused. It will appear to you that some contributors can say whatever they want, whilst others will get blasted to perdition. It will look as though there is some sort of 'club' here. There is. I have been on quite a journey since discovering that any old so-and-so can trade Forex - including me. At around the same time I joined FF, so did a number of others. As I learned to code mql4, so others started to help and contribute to my learning process. We are old friends now, and understand each other so yes, we are a club and the club members can indeed say whatever they want. They have earned the right to do so. It does not take much to join the club; be useful, intelligent and positive and you too can join.
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 one and Nanningbob's 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 - just not necessarily me.
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.