Advanced system #5 (Trend Lines Breakout System)

Post your new strategies, discoveries or just ideas for development

Re: Advanced system #5 (Trend Lines Breakout System)

Postby zylootino » Wed Aug 25, 2010 3:44 am

Hi,

I have tested extensively the strategy and here are the results. I used a simple money mgmt strategy: 3% risked on each trade calculated with the stop loss. If my max loss per lot is 100$ and my capital is 10k$, then I will invest 3 lots on a trade.
2005: EURUSD: -30%
2006: EURUSD: -70%
2007: EURUSD: -5%
2008: EURUSD: 184%
2009: EURUSD: -9%
2010: EURUSD: 167%

Reports are attached.
Did you have these results too?

The features used during the testing were:
- only trade with the trend (indicated by the pivot point: short if bid < PP, long if bid > PP). On EURUSD it was significantly increading the results, so I applied it to EURGBP (which I did not testing without).
- A trade can be initiated as soon as the trend is identified, i.e. it can start after before 5am.
Attachments
StrategyTesters.zip
(119.82 KiB) Downloaded 490 times
zylootino
 
Posts: 1
Joined: Wed Aug 25, 2010 3:11 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby szgy74 » Wed Oct 27, 2010 9:57 am

Hi,

here I attach the EA I have created in the last few months. It is not ready, still under testing and development.
The EA was originally based on the previous indicator but I have reprogrammed almost every parts of that code.
you may find the source more complicated than necessary, this is because it includes parts of my other programs.
The EA is quite complex. Here I write the parameters, if anything is not clear ask, I will try to answer asap.

The EA still has some points to be corrected, for example SL calculation or more precise trade entries - sometimes it misses trades.
Order management also should be restructured, simplified. I will add parameters for handling sideways pattern and inside bar.
I will also add some kind of risk/reward calculation/filter based on SL and TP size.
So please don't expect something perfectly ready product :-)
but it may be used as good visual aid. (maybe it is easier to understand after looking at some charts.)
I did not try to backtest, only forward tests. But since there are the points to correct mentioned above,
these results do not mean anything now.

----
Perhaps the most interesting addition to the EA is: H1, H4 and D1 inside bars and sideways patterns are displayed.
extern bool DisplayInsideBars = true;
extern bool DisplaySidewaysPattern = true;

inside bars are blue, sideways pattern is colored red. only the first bars (H4 - 4 bars, D1-24 bars)
are colored, and the highs and lows are marked with a dotted line.
the lines are named IB or SW-line-H/L and timeframe, eg. "SW-lineH-D1" or "IB-lineL-H4"
the color may be purple where both patterns are displayed :-)

the patterns are similar. inside bars start with a bar that has high and low values within the previous bar's high and low.
2 bars are enough for this pattern.
sideways pattern is formed by at least 4 bars that have open OR close values within the first bar's high and low.
both patterns are broken when a new price bar opens AND closes outside the first bars H/L.
inside bars are a kind of early-warning sideways pattern.

Sideways channels may cause losses as discussed here (and the next page):
http://forex-strategies-revealed.com/ad ... t/cpage-11

I think it is useful to have dispalyed these on the chart.
I did not figure it out completely so far, but it seems targets outside the channels
are not too safe to trade. H1 patterns do not cause as much "trouble" as H4 or D1.

----

Pip values must be set as on 4 digit platform, 5 digits platform automatically handles these values.

Strategy versions:

extern int strategy_version = 2; // 1: original, 2: +3 bars w EMA200

The EA trades the trendlines calculated as discussed. this is version 1.
there is an experimental addition by Edward, this is version 2.

V2:
http://forex-strategies-revealed.com/ad ... t/cpage-30
Submitted by Edward Revy on November 12, 2009 - 13:00.

If strategy V2 is used then the one TL will be colored yellow.

I attach some indicators and a pdf what may be useful.
The settings detailed are attached because does not fit in reply window.
These are my settings for GMT+2 FXOpen 5 digits ECN demo account.
the pdf is from here:
http://www.trade2win.com/boards/attachm ... estion.pdf
I also attach some screenshots from today as illustration.

Regards,
Gyula
Attachments
snapshots.zip
(3.57 MiB) Downloaded 455 times
attachments.zip
(156.92 KiB) Downloaded 487 times
szgy74
 
Posts: 32
Joined: Sat Mar 20, 2010 5:14 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby szgy74 » Thu Oct 28, 2010 8:41 am

Hi,

thanks for the testing. The time settings are OK for GMT+2.
The other settings are definitely not the best, it is optimal for development testing.
In fact I really found some points to fix in SL or TP modification, and a few little other problems.
In a few days I will post a new version.

regards,
Gyula
szgy74
 
Posts: 32
Joined: Sat Mar 20, 2010 5:14 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby cpr » Sat Oct 30, 2010 2:04 pm

szgy74 wrote:Hi,

thanks for the testing. The time settings are OK for GMT+2.
The other settings are definitely not the best, it is optimal for development testing.
In fact I really found some points to fix in SL or TP modification, and a few little other problems.
In a few days I will post a new version.

regards,
Gyula


Gyula, Great to see you back again in action on this forum. Did not get a chance to read and experiment the EA you just posted.. I will try to cover this durng weekend.. I see Rom is already working on it.
cpr
 
Posts: 77
Joined: Fri Jul 10, 2009 11:58 pm

Re: Advanced system #5 (Trend Lines Breakout System)

Postby strongbear0 » Sat Nov 06, 2010 11:16 pm

When you draw your pivot points on your graph what time are you basing those pivot points off of? The previous daily candle? The previous hourly candle?

Adam
strongbear0
 
Posts: 1
Joined: Sat Nov 06, 2010 11:06 pm

Re: Advanced system #5 (Trend Lines Breakout System)

Postby szgy74 » Mon Nov 08, 2010 7:20 pm

strongbear0 wrote:When you draw your pivot points on your graph what time are you basing those pivot points off of? The previous daily candle? The previous hourly candle?

Adam


you can set these parameters:

extern bool PivotBrokerTime = true;
extern string PivotStartingHour="00:00";
extern bool UseMidPivots=false;
extern bool UseWeeklyPivots=true;
extern bool UseMonthlyPivots=true;

if PivotBrokerTime is true the points are calculated based on the previous daily candle, the "day" is based on the broker timezone
(the base values are as you can see the previous candle on the D1 chart).
if PivotBrokerTime is false then daily pivots are calculated from "PivotStartingHour="00:00"; " (format: "hh:mm"), based on hourly candles.
pivot starting hour or broker timezone is not interesting when calculating weekly or monthly pivots.

you will find new version in the next post.
szgy74
 
Posts: 32
Joined: Sat Mar 20, 2010 5:14 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby szgy74 » Mon Nov 08, 2010 7:38 pm

Here is the newer version. I fixed some problems with order management. However, it is still not perfect.
SL calculation needs to be done better and there is too much order modification (trailing).
Pending orders mode is not ready.

I made much backtesting on the period 2010.07.15-10.30. I tried several variations of the parameters.
EURUSD seems to be quite good, but the others seem to be losing. I did not test the other pairs very carefully.

I analyzed several loser trade entries and noticed that sometimes a trade is losing because the trade opens 20-30 pips "later". Maybe it is because of the 90% backtesting quality, maybe the variable spread is this high in breakout situations. (I noticed by accident when "loggingsnapshot" is true then backtester also creates a snapshot of the trade setups - but the backtesting runs much slower.)

I backtested EURUSD and find this:
- tried strategy version 1 and 2, the performance of the original is better.
- added TL slope filter and find that net profit is a bit bigger but the ratio of losers is approx. the same. with EURUSD the best slope is 4 or 5 (pips/bar), values above 10 make not much difference. (MaxSlope=0 means it is not used.)
- TLBreakoutMinPips and TLBreakoutMaxPips is the min. and max. distance from the TL where an order is opened. I noticed results are much better with values 1,5 than 5,15.
- I am not sure if using weekly and monthly pivots is of good use but visually they seem to be useful.
- The use of 30 pips trailing makes very little difference.

I did only tested a few 10 variations of the settings but did not find yet out how could I improve the results. The NET profit increased much but the winner trades are never over 70%.

I cut out trade details from backtesting results because of too big filesize. I work on improving this EA and will post significant modifications.
Attachments
ADV5-H1TL Breakout.mq4
(137.35 KiB) Downloaded 568 times
backtests.zip
(33.49 KiB) Downloaded 466 times
szgy74
 
Posts: 32
Joined: Sat Mar 20, 2010 5:14 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby szgy74 » Mon Nov 08, 2010 8:00 pm

Rom wrote:Hi

It is so much to learn from the program code, maybe 1800 lines of code, while the average EA is 400 lines, but the amount of debugging takes time. I only know about one larger EA, that is Forex Bulletproof.

regards kjell


Hi,

I am glad you like the code :-) in fact I am a software developer by profession and I do not make block copy/paste code with minimal modifications. I have seen many EAs and indicators written repeating the same block of code resulting for example 1400 lines of code. I did the same in 40 lines and some arrays and loops. The number of lines itself does not mean much but in this code you may find useful fuctions, details. For example the pivot or TL calc. or the general filter module may easily be adapted or modified and widely used. (Unfortunately there are also some ugly parts what I am not proud of, for example where I find the start and end of the first 3 hours of the orders.) These are parts of my another big program (under development) what is preparing to be a coding framework of TLs, channels, S/R, breakout/bounce and divergence strategies. The testing of the last big divergence part is almost ready with regular and hidden divergence "spotting" and I am excited to find out how the results may be applied with other strategies or only "standalone".

If you have any question of code details just PM me.

regards,
Gyula
szgy74
 
Posts: 32
Joined: Sat Mar 20, 2010 5:14 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby dazzdude » Wed Nov 10, 2010 9:59 am

Hi Gyula,

Good to see you back. I check the forum every now and then to see if there have been any updates. You have done some great work on this method so far. Well done.

Darren.
dazzdude
 
Posts: 2
Joined: Wed Aug 18, 2010 5:43 pm

Re: Advanced system #5 (Trend Lines Breakout System)

Postby von » Mon Nov 29, 2010 10:31 pm

Hello Everyone,

I am new to forex trading and have been reading up a lot on it and practicing on demo accounts. I came across this strategy a month ago and have been trying it out. So far it looks good. With the proper position sizing, I think it can be really profitable.

However, I feel that I can't use a system properly unless I truly understand how it works. I've seen that the system works based on trying it out but I still don't understand the reasoning behind it. Is it purely psychological and based on the fact that when markets open they try to drive the prices up to a certain level? Is there some other logic behind this breakout system?

Thanks for the help guys! I'm really trying to gather as much info as I can from other more experienced traders.
von
 
Posts: 6
Joined: Mon Nov 29, 2010 10:22 pm

PreviousNext

Return to Forex trading strategies and systems