I will always update this POST #1 with the latest information.
So if you do not want to read all the posts then just read this one.
I will also keep the EAs up to date here.
The rest of the posts are interesting and I love flame wars
*******************************
Very basic summary
*******************************
1) Buy 1 unit GBPJPY
2) Sell 1 unit GBPUSD
3) Sell ?? units using the USD in point (2) in USDJPY to balance everything out
Buy low and sell high.
Rinse and repeat.
Can this work or what is the pitfalls with this idea ?
*******************************
Detail
*******************************
OK I am still new in this, but must say triangular arbitrage looks interesting.
I made an EA to trade GBPUSB, GBPJPY and USDJPY
Basically
1) Buy 1 unit GBPJPY
2) Sell 1 unit GBPUSD
3) Sell ?? units using the USD in point (2) in USDJPY to balance everything out
This basically ZEROs your position minus spread, commission and swap.
Just hold on to this until in profit.
It will oscillate around the ZERO point.
Once I make profit I swap the above 123 points to Sell, Buy, Buy.
My entry can be random and then go from there, but since I started I changed it so that I calculate what the low and high is and use those calculations as entry points.
Now sometimes you do accidentally get in at just the wrong time.
Basically buying at the highest point and it never gets back to that point.
In 2 years time I found it about 9 times.
You can see these in the load spikes at the bottom of the chart.
This problem is solved by a minor grid.
Basically once you unluckily buy at the highest point then you will be stuck, but no worries, because it can only fall so far before coming back, but never past that point again so just wait a bit and let it fall and once it fell enough then Buy again the same amount and leave it for a guaranteed profit a bit more than half way back so just wait a bit.
Now as I said My speciality is maths and programming, but I am new to the forex market.
The demo EA I wrote I ran from 2015-06-23 till 2017-06-16.
I started with $1000 and ended with $2,725,839.38
Maximum drawdown during this time was 25% of the account.
I did have a safety catch in the system to prevent losses from going beyond 25% which was hit 2 times during the 2 year run, which does not affect the EA seeing that it will adapt itself to the next balance as needed.
The cause for the 25% drawdown spikes was weekend gaps on the Monday.
I tried preventing Friday trades which caused the maximum drawdown to drop to 15%, but the ending profit also dropped to about $1,800,000.00
Other things to note was that I was maxing out my Metatrader 5 back test lot size at 99 lots after the 1 year mark at about 2016-06-28 and from there it stopped growing exponentially and started a slower sequential growth.
In the live environment you can split your account into multiple accounts long before it reaches the limit for even more profit.
The 25% drawdown hits will probably also increase if you can keep the exponential growth growing from 2 hits to about 4 hits, maybe 5 at most, but the EA is designed for it and can handle about 20 times 25% hist before starting to show a loss, because the growth rate is about 100% every 2 months and at worst it hit the 25% drawdown 2 times in one year..
I do not have funds to test this live, but demo testing seem quite good.
Any advice will be great.
I even found this to be profitable using a starting capitol of only $100, but at this price all 3 pairs will start at the same 0.01 lots, which is a bit off in balance seeing that the USDJPY can not be the same as the other, but once it breaks the $1000 profit mark it works good and the $10,000 mark is just rocket fuel for it.
Ignore the upward spikes in the charts.
The EA is told to start selling the highest profitable once first.
What matters to me is the equity and how far it falls after opening a 3 pair group.
The 2 pair 25% drawdown happened in the beginning of the chart and therefore is almost invisible when compared to the profit of the rest of the chart.
*******************************************************************************
RULE UPDATE : 2017-09-23
*******************************************************************************
Ok this is a MAJOR update.
Rules changed a bit.
Still triangular on the 3 symbols.
But.
I now calculate what the average profit would be if I did a BUY, SELL, SELL and also SELL,BUY,BUY.
This gives me 2 lines.
Call the higher line the ASK line and the lower line the BUY line.
Between the 2 lines is the average line calculated over some time, which if mostly a straight line as the buy and sell lines basically cancels each other out there.
Now from time to time you will notice the ASK line cross the average line and this is the time you must open a Buy(Sell, Buy, Buy) to profit from the inevitable up movement.
Close the open buy once the SELL line cross the average line.
Do the opposite for opening a sell(Buy,Sell,Sell).
One more thing is that I do not just open when it crosses the middle average line, but I only open once it crosses the average line for some distance before opening.
Ok there is a lot more checks and stuff I put in the EA, but that is the basics.
I tested this on MyFxchoice with a leverage of 1:200 so try and keep to those settings.
I might work on other settings and I did try and build in intelligence to adapt to other brokers, but I had limited time and it might not work properly.
Backtest to make sure it works properly before a forward test.
DO NOT USE ON LIVE ACCOUNT.
Other things in the EA are :
1) Do not trade weekend gaps for the Monday slippage can be big.
2) Do not trade between midnight and 2 am for the same reason as (1).
3) Move all display and log coding after the system calculations to increase trade calculation performance.
4) Use only 50% of ac
count for trading, which only mean that 50% of the account must be converted to used margin.
Draw-down is about 5% then, but I can not increase it for fear of getting a margin call.
20% might be better, but I will test it one day.
5) Check for failed trades and kill them to start over.
6) Check for weekend and inactive markets to prevent system failure.
7) Check commission using single 0.01 lot trade.
8) Massive amounts of logs and graph code to display what is happening.
This uses a lot of memory so I must probably move it into another EA for display reasons only seeing that it is not needed to do trading with, but looks nice and you can see why the EA does what it does.
Then there can be one EA to do trading with and another display EA which you can load somewhere else to show the workings, without the display EA affecting the trade processing.
Problems:
1) Slippage and trade delays.
I am getting close to 500 milliseconds delay on opening 3 trades for the 3 symbols at a time.
This can cause some major slippage, especially on the 3rd trade, but luckily I still make profit on most trades seeing that the EA does cater for some slippage.
I'm still trying to find ways to decrease the time delay, but it seem to be a limitation on how metatrader works.
1.1) I might be able to improve the trade speed using 4 metatrader terminals and I have already created programs to allow EAs communicate with the outside world within less than 1 millisecond, but there is still a delay of about 300 milliseconds for a single trade to start.
On the bright side I have now developed a driver that can connect an EA to anything else from other EAs to other terminals or even outside programs like java and even to other PCs in other countries or any other device for that matter or even making a metatrader EA use things like the FIX api.
The possibilities are big for this driver.
1.2) Delayed trade starts seem to be caused by the terminal logging out if there is no trade action for some time and when a new trade is needed then the terminal for have to take some time to log back in before the trade can be opened or closed.
I could not find a way to prevent logout, EXCEPT by sending dummy trades or impossible pending trades or trade modifications every 20 to 30 seconds.
Problem with this might be that broker will not appreciate receiving so many trade signals.
1.3) FIX API.
I have been playing around with FIX api and it might be a solution to this trade delay, but I need to test it first and .... well... time is not on my side
*******************************************************************************
RUNNING THE EA
*******************************************************************************
Do not run on live account.
Just attach the EA to a chart ....... That is it
Some more details.
The EA is made to run with symbols GBPUSD, GBPJPY, USDJPY
Exactly and it is case sensitive.
If those symbols is not in your market watch or trade able then it will not work, UNLESS...
There are a couple of parameters in the EA you can set.
Mostly the trade symbols.
Keep in mind the EA is only made for GBPUSD, GBPJPY, USDJPY
BUT if your broker contains symbols like GBPUSD#e ex.. then you can use the parameters to change the EA to use your broker's symbols.
Keep in mind it is case sensitive and therefore if your broker lists GBPUSD#e and you put in GBPUSD#E then the EA will not work.
To view the chart drawn by the EA I suggest making the chart window background BLACK and zoom the chart out by dragging down on the right hand vertical price bar till u can see all the lines the EA draws on the chart.
I'll even suggest making everything black as the chart price gives no useful information.
So if you do not want to read all the posts then just read this one.
I will also keep the EAs up to date here.
The rest of the posts are interesting and I love flame wars
*******************************
Very basic summary
*******************************
1) Buy 1 unit GBPJPY
2) Sell 1 unit GBPUSD
3) Sell ?? units using the USD in point (2) in USDJPY to balance everything out
Buy low and sell high.
Rinse and repeat.
Can this work or what is the pitfalls with this idea ?
*******************************
Detail
*******************************
OK I am still new in this, but must say triangular arbitrage looks interesting.
I made an EA to trade GBPUSB, GBPJPY and USDJPY
Basically
1) Buy 1 unit GBPJPY
2) Sell 1 unit GBPUSD
3) Sell ?? units using the USD in point (2) in USDJPY to balance everything out
This basically ZEROs your position minus spread, commission and swap.
Just hold on to this until in profit.
It will oscillate around the ZERO point.
Once I make profit I swap the above 123 points to Sell, Buy, Buy.
My entry can be random and then go from there, but since I started I changed it so that I calculate what the low and high is and use those calculations as entry points.
Now sometimes you do accidentally get in at just the wrong time.
Basically buying at the highest point and it never gets back to that point.
In 2 years time I found it about 9 times.
You can see these in the load spikes at the bottom of the chart.
This problem is solved by a minor grid.
Basically once you unluckily buy at the highest point then you will be stuck, but no worries, because it can only fall so far before coming back, but never past that point again so just wait a bit and let it fall and once it fell enough then Buy again the same amount and leave it for a guaranteed profit a bit more than half way back so just wait a bit.
Now as I said My speciality is maths and programming, but I am new to the forex market.
The demo EA I wrote I ran from 2015-06-23 till 2017-06-16.
I started with $1000 and ended with $2,725,839.38
Maximum drawdown during this time was 25% of the account.
I did have a safety catch in the system to prevent losses from going beyond 25% which was hit 2 times during the 2 year run, which does not affect the EA seeing that it will adapt itself to the next balance as needed.
The cause for the 25% drawdown spikes was weekend gaps on the Monday.
I tried preventing Friday trades which caused the maximum drawdown to drop to 15%, but the ending profit also dropped to about $1,800,000.00
Other things to note was that I was maxing out my Metatrader 5 back test lot size at 99 lots after the 1 year mark at about 2016-06-28 and from there it stopped growing exponentially and started a slower sequential growth.
In the live environment you can split your account into multiple accounts long before it reaches the limit for even more profit.
The 25% drawdown hits will probably also increase if you can keep the exponential growth growing from 2 hits to about 4 hits, maybe 5 at most, but the EA is designed for it and can handle about 20 times 25% hist before starting to show a loss, because the growth rate is about 100% every 2 months and at worst it hit the 25% drawdown 2 times in one year..
I do not have funds to test this live, but demo testing seem quite good.
Any advice will be great.
I even found this to be profitable using a starting capitol of only $100, but at this price all 3 pairs will start at the same 0.01 lots, which is a bit off in balance seeing that the USDJPY can not be the same as the other, but once it breaks the $1000 profit mark it works good and the $10,000 mark is just rocket fuel for it.
Ignore the upward spikes in the charts.
The EA is told to start selling the highest profitable once first.
What matters to me is the equity and how far it falls after opening a 3 pair group.
The 2 pair 25% drawdown happened in the beginning of the chart and therefore is almost invisible when compared to the profit of the rest of the chart.
*******************************************************************************
RULE UPDATE : 2017-09-23
*******************************************************************************
Ok this is a MAJOR update.
Rules changed a bit.
Still triangular on the 3 symbols.
But.
I now calculate what the average profit would be if I did a BUY, SELL, SELL and also SELL,BUY,BUY.
This gives me 2 lines.
Call the higher line the ASK line and the lower line the BUY line.
Between the 2 lines is the average line calculated over some time, which if mostly a straight line as the buy and sell lines basically cancels each other out there.
Now from time to time you will notice the ASK line cross the average line and this is the time you must open a Buy(Sell, Buy, Buy) to profit from the inevitable up movement.
Close the open buy once the SELL line cross the average line.
Do the opposite for opening a sell(Buy,Sell,Sell).
One more thing is that I do not just open when it crosses the middle average line, but I only open once it crosses the average line for some distance before opening.
Ok there is a lot more checks and stuff I put in the EA, but that is the basics.
I tested this on MyFxchoice with a leverage of 1:200 so try and keep to those settings.
I might work on other settings and I did try and build in intelligence to adapt to other brokers, but I had limited time and it might not work properly.
Backtest to make sure it works properly before a forward test.
DO NOT USE ON LIVE ACCOUNT.
Other things in the EA are :
1) Do not trade weekend gaps for the Monday slippage can be big.
2) Do not trade between midnight and 2 am for the same reason as (1).
3) Move all display and log coding after the system calculations to increase trade calculation performance.
4) Use only 50% of ac
count for trading, which only mean that 50% of the account must be converted to used margin.
Draw-down is about 5% then, but I can not increase it for fear of getting a margin call.
20% might be better, but I will test it one day.
5) Check for failed trades and kill them to start over.
6) Check for weekend and inactive markets to prevent system failure.
7) Check commission using single 0.01 lot trade.
8) Massive amounts of logs and graph code to display what is happening.
This uses a lot of memory so I must probably move it into another EA for display reasons only seeing that it is not needed to do trading with, but looks nice and you can see why the EA does what it does.
Then there can be one EA to do trading with and another display EA which you can load somewhere else to show the workings, without the display EA affecting the trade processing.
Problems:
1) Slippage and trade delays.
I am getting close to 500 milliseconds delay on opening 3 trades for the 3 symbols at a time.
This can cause some major slippage, especially on the 3rd trade, but luckily I still make profit on most trades seeing that the EA does cater for some slippage.
I'm still trying to find ways to decrease the time delay, but it seem to be a limitation on how metatrader works.
1.1) I might be able to improve the trade speed using 4 metatrader terminals and I have already created programs to allow EAs communicate with the outside world within less than 1 millisecond, but there is still a delay of about 300 milliseconds for a single trade to start.
On the bright side I have now developed a driver that can connect an EA to anything else from other EAs to other terminals or even outside programs like java and even to other PCs in other countries or any other device for that matter or even making a metatrader EA use things like the FIX api.
The possibilities are big for this driver.
1.2) Delayed trade starts seem to be caused by the terminal logging out if there is no trade action for some time and when a new trade is needed then the terminal for have to take some time to log back in before the trade can be opened or closed.
I could not find a way to prevent logout, EXCEPT by sending dummy trades or impossible pending trades or trade modifications every 20 to 30 seconds.
Problem with this might be that broker will not appreciate receiving so many trade signals.
1.3) FIX API.
I have been playing around with FIX api and it might be a solution to this trade delay, but I need to test it first and .... well... time is not on my side
*******************************************************************************
RUNNING THE EA
*******************************************************************************
Do not run on live account.
Just attach the EA to a chart ....... That is it
Some more details.
The EA is made to run with symbols GBPUSD, GBPJPY, USDJPY
Exactly and it is case sensitive.
If those symbols is not in your market watch or trade able then it will not work, UNLESS...
There are a couple of parameters in the EA you can set.
Mostly the trade symbols.
Keep in mind the EA is only made for GBPUSD, GBPJPY, USDJPY
BUT if your broker contains symbols like GBPUSD#e ex.. then you can use the parameters to change the EA to use your broker's symbols.
Keep in mind it is case sensitive and therefore if your broker lists GBPUSD#e and you put in GBPUSD#E then the EA will not work.
To view the chart drawn by the EA I suggest making the chart window background BLACK and zoom the chart out by dragging down on the right hand vertical price bar till u can see all the lines the EA draws on the chart.
I'll even suggest making everything black as the chart price gives no useful information.
Attached File(s)
2017-09-18 09h00 JVB Arbitrage Auto Profit16 backtest.ex5
123 KB
|
2,336 downloads
|
Uploaded Sep 24, 2017 7:55pm
2017-09-18 09h00 JVB Arbitrage Auto Profit18.ex5
126 KB
|
1,940 downloads
|
Uploaded Sep 26, 2017 4:53pm
2017-09-18 09h00 JVB Arbitrage Auto Profit18.ex4
68 KB
|
3,243 downloads
|
Uploaded Sep 26, 2017 4:53pm
2017-09-18 09h00 JVB Arbitrage Auto Profit19.ex5
127 KB
|
2,853 downloads
|
Uploaded Sep 28, 2017 4:04am
2017-09-18 09h00 JVB Arbitrage Auto Profit19.ex4
68 KB
|
5,887 downloads
|
Uploaded Sep 28, 2017 4:04am