Last week I started making some changes which went deeper than expected, but in the process I uncovered some subtle problems in estimating the daily range. Sharing code between the FBATT script and the EA has also resulted in brain strain, but with the help of excessive amounts of coffee, FBATT is hopefully a little more accurate than before and I had some dramatically better results for GBPCHF than expected. GBPCHF has been a pair that has rarely been good for the account balance in the past, so it was very rewarding to retest the EA from July to October.
This was the resulting balance/profit:
Code: Select all
32 2016.10.27 23:59 close at stop 16 0.09 1.20808 1.25167 1.16607 30.20 5713.26
[/size]
This is higher than my target but at the same time you might have noticed that there were only 16 trades over a period of 5 months. Does that seems a little on the low side?
The experienced EA developer never wholly trusts the results of back testing especially when they are better than expected. Any deep code changes are going to introduce unexpected consequences which could remain hidden for sometime. Certain run time parameters can mask a particular kind of bug. Do you terminate you open trades before the weekend? Sometimes it makes sense to avoid the cost and risk of leaving trades open all weekend. However, if you are developing an EA setting this parameter to false might uncover some bugs.
I was so pleased with the balance I almost didn't look closely at the monthly break down. In addition the recent work to skip over poor trading periods could convince me that this was not unreasonable.:
gbpchf-super-long-trade-29Jul-20Sep16.png
Does 7 weeks of poor trading conditions sound unlikely?
Another difficulty here is the large difference between the shown stop-loss, take profit prices and the real stealth prices which can been extracted from the log file.
If we study the following chart it might be possible to come up with some theories about the nature of this bug:
gbpchf-D1-chart-shows-missed-stp-ssl-29Jul-Sep16.png
The period before A is one of those bad trading periods that we are trying to skip over. At A the EA determines it is a good time to allow trading again. The entry looks reasonable on the D1 chart.
Would you consider the stealth-take-profit (STP) price to be too far away from the entry?
So is this the bug or is it a secondary issue?
That depends whether or not the stealth-stop-loss (SSL) is also larger than necessary.
According to the D1 bars at B we should have had an exit by SSL so that is a confirmed bug.
A few days later price travels past the STP level and again nothing happens, so I suspect B and C are the result of a single bug.
We can observe that the D1 bars are small in comparison to the size of take profit, but that might be the value I put in after running the optimization for these values, so not necessarily a bug but something to reflect on.
There appear to be some good trading periods between B and D so it looks like we are missing out on hoovering up some easy pips.
Eventually, price reaches E and the STP code is suddenly working again after a long summer holiday.
Do you have any theories about the nature of the bug?
Where would be a good place to start?
I suspect this is a recent bug and therefore a consequence of new trading hibernation code,
in one of two ways
a) STP, STP checks never get executed
b) They are executed but are dependent on data generated for trading signal generation
It might be enough just to review the source code to pin point the problem.
You do not have the required permissions to view the files attached to this post.