Stuck with my EA (and frustrated)

Hello,

I’ve been trading with my EA for the last couple of months and now I’m seriously got stuck with it. More specifically said my account is stagnating between being -6% and + 2 % in the last month.
Before I tell you more about case allow me to introduce my trading strategy:

I have coded a EA that uses alligator and CCI (14) as it’s technical foundation. The CCI above level is 100 and bellow level is -100. I have added a news stopper which prevents the ea from opening orders of there is a upcoming news with in the last 3h (this can be changed if needed). The time frame I use is 1 Hr.
I currently use a stop loss / take profit limit of 20/20. Previously I’ve tested with TP20/SL40 and TP40/SL20. I’ve found out that TP20/SL20 works best since my win rate is around 57%. When I’m at home I tend to monitor my SL and TP levels manually. Is it recommended to stay flexible with sl and tp levels or keep it as it is now i.e sl: 20 and tp:20?

Pairs that I trade: eurusd, usdjpy, usdchf, usdcad,nzdusd, audjpy, Nikkei index (rarely).

And now to the real deal.
My goal is to trade with the trend, it hasn’t really worked since my ea opens trades that are totally against the trend or it opens a new trade before a pullback ( which even I’m able to spot), sometimes I’ve encountered that it has opened a trade within a reversal which is totally not cool since all of these scenarios are against the major trend.

I’ve also encountered situations were my EA has opened a trade when alligator is at sleep meaning it hasn’t showed any directions were the market is going. All of these situations are scenarios that I want to avoid at all cost, since my goal is to trade with the trend and not against it or some “special event”. To be honest I couldn’t care less for some special event’s or short term quick profits, only thing I care about is the long term trend and making money out of that with the smallest risk possible.

Some trades that my EA opens are totally un-market wise if I my put it like that, they do not make any science and that is what is frustrating me since I know from past experience that trading the alligator indicator is a extremely good indicator for trend trading.

So I’m desperately in need of help / advice what to do to fix it so that it shows more consistent profits but more importantly that it trades with the trend. I don’t know if the problem lies in CCI which I use to confirm the trend , now it’s set that the upper level is 100 and the lower is at -100. Can those affect my trading since according to my research that I’ve done I’m kind of trading when the market is oversold and overbought, this can have a affect on my trading?

Can this also explain why my drawdown is so high? I’ve noticed that I have pretty high volatility which also would bee a nice thing lower it. It makes me wonder if that has something to do with CCI setups since my doesn’t trade during news. I’ve also lowered my spread levels from 5 to 1.

Through this link you can find more info about my EA and key financial data:

Picture of my backtest that I did on the weekend, not that I used default setings.

Ideal situation would be :

CCI;

Ideal Alligator;

Long

Short

What would be the most suggested thing to do? For example adjust CCI levels or just keep on keeping on and one day find the right combination by luck? My own conclution would be to adjust the CCI so that at buy it’s 0 and shell the CCI would be - 10 (for example).

I have a couple links I can send to you if needed, you’ll find it useful.

Thank you for the time you invested in reading this post and I hope hear what’s your opinion since I’m always open for new ideas.

Hi, and welcome to the forum.

My overall feeling is that you’re actually doing pretty well with it, in the circumstances, if you’re getting a win-rate of 57% with a 1:1 risk/reward ratio. I understand your frustration with the thing, of course, but I think it’s quite unlikely that you’re going to do a [I][U]lot[/U][/I] better out of an EA based on the alligator indicator with CCI (and with or without RSI).

It strikes me that there are two big issues here, with possible solutions, either of which might offer improvements (though to what extent I don’t know), and you’ve identified one of them already.

  1. [B]Trading with the trend …[/B]

As you’ve rightly commented, this indicator-combination, used in this way, is inherently a trend-following method, so it’s going to do well in trending markets and suffer whipsaws leading to drawdowns in ranging markets. The way to change that is to use it only in trending markets. The problem with this reasoning is that the more clearly the market is trending, the less you need an indicator combination like this in the first place.

[I][U]Possible solution[/U][/I]: use it only when there’s a significant trend on a significantly higher time-frame, and only in the direction of that trend. In other words, incorporate an add-on which you use only as a bias indicator, along the lines of “under these circumstances identify only potential long trades; under those circumstances identify only potential short trades; under circumstances not fitting either set of parameters, don’t trade at all”.

That will increase your win-rate significantly, but it will also reduce your trading opportunities significantly, and how much it benefits the bottom line, overall, is another matter.

(If you want that part to be automated as well, I can offer one suggestion, which will at least illustrate the kind of thing I mean: if you’re trading this from H1 charts, then use as a bias indicator simple (or exponential) moving averages of the close set at 60 and 200 periods (equivalent to 15 and 50 periods on an H4 chart); identify long trades in the way described above only when the short MA is above the long MA, both are rising, and the two are diverging; identify short trades in the way described above only when the short MA is below the long MA, both are falling, and the two are diverging; when neither set of conditions is fulfilled, don’t trade.)

  1. [B]Ignoring volatility …[/B]

This problem isn’t quite so easy to do anything about, and relates particularly to the underlying reason why multi-indicator systems of this kind, [U]especially[/U] when you try to automate them, aren’t very well-suited to trading forex from timed charts.

If you used constant-volume bars instead of timed bars, you’d be going a long towards resolving this problem. Unfortunately, however, those aren’t available for spot forex, which is one reason why methods of this kind tend to do better in the forex futures market than they do in the spot forex market (because volume is available).

[I][U]Possible solutions[/U][/I] …

(a) Trade forex futures instead!

(b) Take volume into account, as much as you can, by trading major pairs only during their RTH (this may well help a little)

© Try to allow for volume variance by using different time-settings at different times of day (for example, use shorter periodicity in the morning, in Europe, when trading the EUR, because volume’s higher then) - this is a second-best solution, but may still help

(d) Relate the targets and stop-losses to the ATR at the time of entering the trade, rather than trying to use a fixed number of pips regardless of current volatility (this should be comparatively easy to do, compared with the other possibilities mentioned above, and could be quite helpful)

Good luck!



the signals your posting for the buy and sell are not the same strategy.
?

Your either going to take the trade on the bid/ask cross of the purple in sell, on every tick mode, or you have to take the next open below the purple. but tick is static, so your going to run into problems with that.

Why are you showing 5m charts if your trading 1 hour? Or the 1 hour u use just for direction of trend?

You need to recognize the pullback on smaller time frame, which can be added to your EA. Or a short CCI period.

Are you using mt4 builder for this?

Use can also use ATR for entry variable. You dont really want to enter a trade if the last bar was 40 pips, and Experts are better to enter on only last bars smaller then **…

CCi 4 is really good to use for short term pullbacks,

Hi lexys’s Avatar
FX-Men Honorary Member,

Thank you so much for your solution. What I really liked is that you really put the time and effort to produce the result, which by the way shows. I have been basically baning my head against the wall to find the right combo to work with my EA. And your answer really got me thinking.

I have few questions on my mind regarding your answer:

"Possible solution: use it only when there’s a significant trend on a significantly higher time-frame, and only in the direction of that trend. In other words, incorporate an add-on which you use only as a bias indicator, along the lines of "under these circumstances identify only potential long trades; under those circumstances identify only potential short trades; under circumstances not fitting either set of parameters, don’t trade at all

(If you want that part to be automated as well, I can offer one suggestion, which will at least illustrate the kind of thing I mean: if you’re trading this from H1 charts, then use as a bias indicator simple (or exponential) moving averages of the close set at 60 and 200 periods (equivalent to 15 and 50 periods on an H4 chart); identify long trades in the way described above only when the short MA is above the long MA, both are rising, and the two are diverging; identify short trades in the way described above only when the short MA is below the long MA, both are falling, and the two are diverging; when neither set of conditions is fulfilled, don’t trade.) " - That sounds like a good indicator to support my current plan. If I were to use your MA idea ( which by the way I will) do I have to skip the alligator totally or can I use MA’s as an parallel indicator to confirm the trend. Would definitely use it as an trade entry rule. And I’m currently trading with the 1 Hr frame. Would it also be a recommended thing to add an don’t trade tab in to my algo and also a RSI to advance my strategy or will the MA’s you described do the trick?

Possible solutions …

“(a) Trade forex futures instead!” - Recommended broker? I currently use Axitrader and they don’t offer fx futures.

(b) “Take volume into account, as much as you can, by trading major pairs only during their RTH (this may well help a little)” - Okay so during overlapping like the London NYC etc?

© Try to allow for volume variance by using different time-settings at different times of day (for example, use shorter periodicity in the morning, in Europe, when trading the EUR, because volume’s higher then) - this is a second-best solution, but may still help” - Hmmm in that case I’ll just prevent my EA to open trades on the EUR

(d) “Relate the targets and stop-losses to the ATR at the time of entering the trade, rather than trying to use a fixed number of pips regardless of current volatility (this should be comparatively easy to do, compared with the other possibilities mentioned above, and could be quite helpful)” - Do you mean that if ATR is high I should use higher SL like for example set my SL to 60 and lower it as the ATR curve goes down? I noticed a pattern yesterday related to the ATR and what I found I that the higher it got the sharper the candle moves got. Do you have any clue if it’s possible to automate you SL level so that it correlates with ATR or is it just to risky.

For further explanation of my situation and for you to get a even better picture of my situation may I send you a link private message or email to my signal at mql5 community where you can take a look at my performance? Since one thing that really needs some improvement is to lower my draw down so that my equity curve is more stable and not fluctuates as it does now, since that kills my profits like it did yesterday due to hacksaws and ranging market. That really doesn’t get me any were and it feels like an ongoing chase that I just can’t get a head of.

All the best.

Kind regards,
Philip

No the picture is just to illustrate my strategy, I use the on 1Hr timeframe to trade the alligator + cci 100. It’s just for visualization. Do mean with statistical that what ever I do I’ll run into problems using the alligator method, please explain further?
I trade with 1Hr time frame but use 1 week time frame to confirm the trend. No I don’t use mt4 builder but I would love to try it out, I’m always open for new ways to improve myself. Where can I download mt4 builder? I’m a bit unfamiliar with the ATR so please correct me if…if the ATR curve is high or at the uperband then I shouldn’t enter a trade and if I do so I’d had to have a high stop loss and vice versa?
Nice I’ll definetly will try CCI (4) out…

Thanks man for the reply and hope to hear from you as soon as possible

Hi Philip,

Sorry - I’ve only just seen your post now …

Yes, I was meaning to try the pair of MA’s as a parallel indicator to try to confirm the trend.

I’m guessing that it would, but I have little real experience of algorithmic trading.

I [I]think[/I] they will. For myself, I’d try without also adding an RSI.

Fair enough. That comment was a little bit tongue in cheek - switching over to forex futures would be a huge change, anyway.

Yes - I do think that’s the best and most reliable part of the day. (You have to think about things like “lunchtime”, to some extent, as well, when volumes are much lower.) I always found 1.30 - 4.30pm UK time best, overall, for exactly the reason you mention.

I would, yes. I think you can only gain, overall, from this approach, not lose.

I don’t have enough experience of automation to know. It sounds quite an attractive proposition to me, if it’s possible to do that.

On the other hand, the shorter the time-frame concerned, the less variable the ATR will tend to be, overall, presumably?

The relation between time-frame and ATR, overall, is a “square-root relationship”: if you halve the time-frame (divide it by two) the ATR “should” reduce by a factor of 1.4, because that’s the square root of 2. Or, to exress it the other way round, if you double the time-frame, the ATR “should” be 1.4 times the size. (However, this doesn’t allow for things like lunchtimes, and so on, and is only ever going to be an approximation, mathematically valid though it is.)

Yes, of course … though I can’t promise to be able to say anything helpful. But happy to try, and no problem at all with private messages.

*You can NOT hide from surprise liquidity, remember that. This whole business is about manipulating the trader. Thats how the money is made for them. When you see what the ratio is for success, you have to find out why people lose. The best way to gain an upper hand, is catching the opponent by surprise. You have to be aware, that at ANY moment, aslong as the price is moving, you could be slapped and not even see it coming. Ive seen jumps come out of nowhere, and many on days that there is no news on the calendar. This is when the lackadaisical traders are caught sleeping. This is why many Expert advisors lose over the long run. They need to adapt INSTANTLY to the ACTION, and not necessarily boundaries, as the alligator represents. You could be looking off the Week chart, but there could be 600 pips in that one candle, whipping both ways, which means, your EA is going to be wrong almost simultaneous 50% right off the bat.

I believe the reason your failing with this EA, is by the time it takes the trade, the move is over. Thru allllll the angles Ive made with experts, its better to build it, then reverse it,lol…

But seriously, You have to find the best possible places for PULLBACKS with the Trend. And you also need to find another why to confirm the trend. 1 week is just to large of a playing field. JMO

There are only 2 ways to go about the EA’s/ Long term or very short term.

Small Tops, or large stops, low margin, high margin per trade.

Drawdown represents failure. How wrong do you want to be? Imagine taking a trade, and for every pip it goes against you, you got whipped on the back of your hands. Drawdown is NOT ok…

MT4 builder isnt available anymore,at least last time i checked,… it was a web based expert creator, but Ive learned to build them over the last 6 years.

ATR is a tricky indicator. Personally, If I had to use it, Id set at 1. Use it to read ACCUMILATION on candle.

So at 1, using this, if the last candle was a 50 pip move, you most likely wouldnt want to enter a trade in that direction, because it holds a high chance of pullbacks, youd be a sitting duck, and could see instant drawdown.

So you wait for the CC! to pullback, then enter in that strong direction.

Even the 0 value off CCI cross would be viable then the 100 or -100,… You can look in hide sight, it looks good, thru visual backtest, but over the long haul, even hours, looks totally different .

Im a strong believer, that an Expert should take small profits, grindable over the long term. Compounding, and time. Like I said, its either large time frames, and 500 pips stops and targets, or small chunks, small take profits, tight stops, and methodicly cranking over a year or 2, taking every trade that is available.

What if you took 1 pip, every single fractal change over a year, on the 5 minute chart? Humm, Im going to make that and run a test for something to do today. lol…

Man, everything I wrote, probably is going to get speared by the BP posse, lol, so take it all with a grain of salt.

Good luck bud,

and yes, you can use the ATR to regulate Sl and TP.

also want to add something about the ATR.

The ATR shows you the cooling period, the small candles, is when the price takes that deeeeeppp breath,because price doesnt like to be stagnet. So those small breathe the price takes, is a strong indication of movement on the horizon.

So looking at that point of view, using this as a varible to get in on the small candles, and not the large candles, which represents the candle moving strong, you get in BEFORE the move.

If this intrests you, look into the doji candle and its workings and representation to price.

Hey no problem, it also took sometime for me to reply.
I actually did remove cci and replaced it with rsi and now it has performed a bit better than normally. One thing that might help the ea not to trade in ranging market is if I were to add an adx indicator. But so far so good. I think I’m on the right track and I’ll let you know if its possible code ATR so that it automatically adjusts sl and tp…don’t see the reason why it wouldn’t work. Never the less algo trading is a whole lot more technical than manual trading:59:

I’ll answer all your posts here.
No offence taken of the comments you made as I took them with a grain of salt. All I can say that I’l do my best and forget the rest, now I’m on the right track and it’s good to continue from here. Will take ATR under serious consideration but first I’ll have to make some minor changes in my robot.

If robot is changeable as you wish , you can use it at your own will then it should not frustrate trader.Otherwise you should do trading with your own skill . EA are not for stable income they can cause a great loss any time which you had not plan.

Yes the EA is my own and I done some minor changes to it like replacing CCI with RSI and ADX. Have also thought about using the alligator with stochastic since it would be nice to get my profit factor to at least 1.10, I’m currently at 0.96 ( which is a pathetic result in my mind).

Yeah, RSI seems pretty good, thats what Im using for my EA. be carefull with the Stoch, it can mean over/under, but also can be a rally, and read the same. could be usefull if you can make it adapt, but like manual trading, adaptation if a main factor in being profitable.

keep rollin bud,

Thanks I’ll make it roll like hell.

I agree RSI is pretty cool indicator. I’ve got kinda good results trading alligator and rsi with nzdusd and audjpy. Sure that’s a big problem with stochastic. I’ve actually tried it with 5,3,3 setup and it’s not so messy like using stochastic with a higher frames. Never the lessI’ll test it out since I have nothing to loose but everything to gain.

Most of the EAs usually double the trouble and almost all of them are designed to follow the technical analysis so they need to be monitored during the news release. So any one who wishes to go fully automated should know the fact that EAs can also blow account within no time.