second try, the previous post will be deleted.
Well, here's my problem: I am bad at programming and I have this indicator (see attached file), which I would like to automate for trading with. So I was hoping some of you guys out there can help out.
Here's what I want to happen when I run the EA:
it should use the indicator "SimpleEntry" to decide what to do. The indicator colours the bars of the chart in two colours: red and green.
1- Now, when the EA sees a green bar, it should enter a trade (BUY) and do nothing until a red bar appears.
2- As soon as this happens it closes that trade, then enters a new trade (SELL) and holds that until a green bar appears.
3- At this point it will close that trade and we're back to square one.
If that's too simple, maybe you can insert a trailingstop command, for which I can set a value to my liking in the EA's properties.
And here's a tricky question: when I use the EA, do I need to apply the indicator to that chart window? What if I want to change the indicator's settings?
Thanx a million.
Looks like this indicator was created with one of those EX4 to MQ4 conversions.
However, it is possible to use an indicator in an EA without engaging in the illegal act of de-compiling the .ex4
From an inspection of the MT4 Data Window I see that there are two buffers. The first step is to get the data in those buffers...
data0[i] = iCustom(NULL,0,"SimpleEntry",5,3,1,5,0,i);
data1[i] = iCustom(NULL,0,"SimpleEntry",5,3,1,5,1,i);
if( data0[i]>data1[i] ) color[i]="green" else color[i]="red";
Then there is the logic of how to trade these colors, which is explained by the OP (original poster).
Would be a shame. I recompiled the code he/she sent us, then used the compiled version to build an EA that has the following features:
It's a trend-following system with less lag than MA-cross, but suffers whipsaws like all trend systems do.
The overall result was negative. If you attach a filter to avoid whipsaws it would be very good.
For example, if the SAR filter is set to true, the results are break-even with 25 pip trailing stop and positive with 40 pip TS.
If you use the EA just for entry and monitor the exit manually (can't be done in back testing), it is highly profitable.
hi, even if the code is removed by the OP the code is still in the database of the forum.
you can change the link of some other post, or if you don't want to guess the original filename you could ask the cache of a search engine ;)
Please enable the necessary setting in your browser, otherwise you will not be able to log in.