stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Daily Fibonacci Signals
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4100
Page 2 of 21
Author:  snailbeard [ Thu Mar 12, 2015 8:06 am ]
Post subject:  Trade copier

I have experimented with trade duplication before and spent some time trying to compile a convoluted C++ program requiring another library and then another library which had to be compiled but didn't :arrrg:
So I gave up on that.

But what am I trying to achieve?

I have several brokers on the same PC so that only requires one shared folder on the same disk,
but I also have several brokers on other PCs linked by a network.

So what will allow me to have a master on one PC and slaves both on the same PC and on other PCs?

Part of the answer is bitTorrent-sync which I already use to share data over the network. Not everybody likes their approach to security. Many people are using an alternative called syncthing:
https://github.com/syncthing/syncthing/releases. I am sure there are others as well.

The other part is to have the same shared folder on each PC
e.g. c:\Users\Public\mt4trades\

I found some examples of reading and writing orders to CSV and example of generic file operations outside the Empty4 folders.

This is the link to a file which wraps Windows file operations. There are a couple of issues that the compiler complained about but after a couple of tweaks it compiles even though the source is from 2009.

https://dl.dropboxusercontent.com/u/543 ... inFile.mqh
Update: This method of calling WINAPI file operations nolonger seems to work.

There is an example of reading and writing orders here but it is quite out of date now and is limited to Empty4 sandbox folders:
http://code.google.com/p/Empty4-trade-copy/
but if we combine these two sources it might be possible to get a basic trade copier working without too much work.
Update: This does the basic job of updating a CSV file in response to a change in the orders.

It now looks like it won't be possible to use a common shared folder on each harddisk. The next task is to see if the sync-app can sync files from mt4Terminal_1\MQL\Files to the same folder of several slaves.

To be continued...
Author:  snailbeard [ Fri Mar 13, 2015 3:23 pm ]
Post subject:  usdjpy, fxpro untuned losses

Limited back data on M1 and holidays at Christmas means holes in the data until the end of year, so a fairly limited back test and the first entry was on the 6th January 2015. This a good entry, but with a large TP and breakeven on reverse it was likely to fail.

Looking at the chart below there were two good setups but ZB5 fails to take profit and runs back to breakeven. Either we need less pips or we don't need the breakeven setting. On rangy pairs setting breakeven is almost guaranteed to waste a trade:

There was a correct entry at 'A' and it would have been good to take profit before 'B'. Note that price is approaching the green long term moving average, so there is a reason to reduce the take profit setting:
fxpro-usdjpy-untuned-losses-6Jan2015.png
Author:  snailbeard [ Sat Mar 14, 2015 8:23 am ]
Post subject:  USDJPY D1 ranging

Looking at USDJPY on a higher time frame (daily bars): it is quite clear that price stops trending in the beginning of December. Although, there were a few winning trades, it is simpler to just not trade while the daily bars are ranging, better to switch off this pair and focus on more interesting pairs or markets. Since the method is generic I am wondering if I can use it on metals, commodities and indexes.

I added more filters based on D1-MA-60 and no trading takes place at all in this period. To properly check this pair I am going to have to use a broker with at least 6 months of M1 bars. So my message to FxPro is
So long and thanks for all the fish
usdjpy-D1-ranging-from-Dec14-to-Mar15.png
Author:  snailbeard [ Sun Mar 15, 2015 8:04 am ]
Post subject:  FxOpen and GlobalPrime variations

Before you read too much into these results I should say that often my EAs do much better on GlobalPrime than some other brokers, so this is in no way a general comparison of two data streams, it might be a coincidence that the first two winning trades on FxOpen are different on GlobalPrime. It is hard work and time consuming without proper statistical analysis to make any sense of these differences. So the following only helps understand why moving indicators and EAs between different brokers could be a headache.

In this particular case I am trying to get USDJPY to be worth trading. Having run out of data on FxPro, I have plenty of history for FxOpen and GlobalPrime but the results are more different than for other trade filtering methods.

First of all FxOpen results with the same setup as FxPro produces wins in the beginning but increasing losses in the latter part of the back test:
FxOpenEcn-usdjpy-run14Mar2015.png
The results for GlobalPrime are even worse with hardly any trading at all:
GpFx-usdjpy-untuned-run14Mar15.png
Author:  snailbeard [ Sun Mar 15, 2015 8:41 am ]
Post subject:  Trade: FxOpen, GlobalPrime

In the first case the same trade that won on FxOpen produced a loss on GlobalPrime. For the M1 chart we can see that the loss was caused by pip leakage twice. The first time was due to a slip of several minutes before the entry satisfied the filters on GP. The second issue was GPs liquidity provider pushed the price further down by several pips more than FxOpen's liquidity provider. This could be a one off or it could be systematic: if you have the tools to analyze several data streams then you could answer this question, or if you notice that the same entries hit the stop-losses more frequently on one broker than another then we would know to avoid that broker. Perhaps it would not be that difficult to have an EA work this out, since we are not trying produce a profitable EA. We need a method of entering trades with as few dependencies as possible but we need enough entries for the results to be meaningful. For example, if we use say 10 pip levels and enter a trade when say price has crossed say 3 levels in the same direction. It might be necessary to anchor the first level to the same initial price on all brokers. Clearly too small or too large a stop loss would give useless results. So the aim would be find a stop loss which causes 2 distinct sets of results. We also need to adjust take profit to have minimal impact on the number of times a trade hits a stop loss. We might also obtain the same information from an existing EA if the entries are sufficiently similar.

Here is the M1 chart showing the pip leakage:
globalprime-loss-fxopen-win-4Sept2014.png
In the second chart the filters work better on FxOpen than they do on GP for this particular day, the reverse might be true on other days:
missing-entry-gpfx-usdjpy-m1-8Sep2014-run14Mar15.png
It is too soon to draw any conclusions from just two trades.
Author:  snailbeard [ Tue Mar 17, 2015 4:18 pm ]
Post subject:  bugs and finger trouble

After finding and fixing several issues relating to buy side trades it now seems that the previous very poor results were only partly to do with the data. For the time being I have decided to go with FxOpen as the reference broker. The results for USDJPY have improved more than expected after implementing extra ways to separate ranging-reversals from resting-trends:
fxOpEcn-Pf3-NPf1120-Dd3.5-runA16Mar15.png
However, there was poor performance at the end of the test when ranging is persistent over a long period of time resulting a high-ish draw-down of 3.5%. Many pairs tread water at the same time so multiply the draw-down by 10 in case we have 10 do-nothing pairs then 35% is quite a large dip in equity. Keeping individual DD under 3% is important for running many pairs.

More analysis of ATR can help in detecting poor trading conditions. After implementing more ranging analysis some months have no trades at all but the net results is better in terms of profit and draw-down:
usdjpy-h1-eliminate-endofswingbyatr100-Dec2014.png
Here two trades at the end of a swing (one winning, one losing) have no net benefit therefore better to leave the equity free for pairs with better trading conditions.

The final results on FxOpen is a Net gain of 15% in often poor trading conditions with a draw-down of less than 3%. Unfortunately this is not transferable to other brokers with different data.

Although the EA still performs well on GlobalPrime the net profit is somewhat diminished to below 11%. Using a trade-duplicator may or may not improve the results depending on the reasons for the difference. If I could clone myself I would have my clone set up a database to collect and manage results from multiple brokers for multiple pairs and scripts to compare the results...
globalprime-results-using-tuned-EA-from-fxopen-usdjpy-run17Mar15.png
Here is the result of running the FxOpen tuned EA on GlobalPrime:
Author:  snailbeard [ Sat Mar 28, 2015 10:38 am ]
Post subject:  White Rabbit Syndrome

Although moving averages are providing some helpful information about direction and counter swings there is always the inherent problem of lagging. This can manifest either in the same broker or when running the same EA on different brokers.

In the following chart one broker had an early entry which was profitable and the other broker's data caused a delay in spotting the entry resulting in a very late entry which resulted in a loss. So in this particular case using a trade duplicator would be preferable to running EAs on different brokers. To be more specific the entry signals were not delayed but the entry filters were late in letting through the trade.
GBPUSD_FxOpen_Earlybird_ReEntry_12Mar15.png
Author:  snailbeard [ Sat Mar 28, 2015 10:50 am ]
Post subject:  M1 view of early and late entries

According to this M1 chart we can see the fast MAs looking good but there is a slow MA in green giving cause for concern, until there is a confident break lower at 16:52. Near the end of the chart is the late entry at 20:01 after the price has moved for the afternoon in the same direction:
gbpusd_m1_fxopen_whiterabbitsyndrome12Mar2015.png
The filter that delays entry checks the candle position. If candles are on the wrong side of a moving average this is usually a bad thing but the MAs on higher time frames are always behind price action. So it is sometimes necessary to let price action take priority of slow MAs.

From the log file "bH1MaWrongSideBar" indicates that one of the MAs on H1 has a bar on the opposite side to the trend. There is another test for reEntry into the trend, when this occurs there is another flag "bH1DojiReEntryDownFlag: 1" which takes priority over "bH1MaWrongSideBar" and the candidate entry is allowed through to the next filter.

I have recently been wondering if a computational neural network would help in finding the best outcomes since we have to constantly modify our EAs and settings to adjust for all the variations between pairs, brokers and time. I am finding the current approach too time consuming.

http://en.wikipedia.org/wiki/Models_of_ ... l_networks

After manually tuning the EA again for GBPUSD the results are as follows:
fxopen-tuned-gbpusd-Pf5_6NetPf1553_run19Mar15.png
Author:  snailbeard [ Mon Mar 30, 2015 11:59 am ]
Post subject:  M1 Sma-cluster emerging trend

After looking at the EURUSD M1 time frame I thought it might be useful to experiment with some additional entry methods. This method requires several SMAs to be clustered together in the same direction. This gives a direction in which to monitor for some kind of breakout or increasing price action. The next stage looks for M1 bars with increasing length and a V formation. IE a short pull back followed by increasing price action.

We can turn these signals into trades if other conditions are met. On the following chart the SMAs line up almost parallel with a general downward bias. There is an ideal entry at 'A' before the main move of the morning and a late signal at 'B' after the main move which is only useful for a few more pips:
eurusd-M1-SMA-cluster-emerging-trend-27Mar2015.png
The above signals came in the main trading session, however, we can probably discard the following signals which occur at the end of the day. However, it turned out that they were consistent with today's price action:
eurusd-out-of-hours-m1-sma-signals-2331-27Mar15.png
Author:  snailbeard [ Tue Mar 31, 2015 1:45 pm ]
Post subject:  Surprising profits

Using this very simple method unfiltered can sometimes produce very good results even against the main trend. I am wondering if there is a bug somewhere because a higher proportion of counter trades won and the proportion of winning shorts is too low. Also the draw-down is high so it would only make sense to combine these signals with other rules.
eurusd-D1-Dec14-toMar15-surprising-profits_run31Mar15.png
All times are UTC Page 2 of 21