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-11I 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-30Submitted 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.pdfI also attach some screenshots from today as illustration.
Regards,
Gyula