Unorthodox idea for an EA

So I am dipping my toes into making my own EA, right now based on RSI, CCI, and bollinger. But through my brainstorming I had an idea. Would it be possible to create an EA based on moving averages, but would calculate the “volume” of space between the 2 averages? So as that space increases after a crossing of averages, once they start to move closer together it would automatically close that trade, and open a new one once they cross again.

I’m not sure if this actually makes sense, and if it does I don’t know if it could be programmed into an EA. Anyone know if this would be workable?

a-b = c where a is the first MA, b the second, c the difference

if c[0] > c[1] buy
else if c[0] < c[1] sell.

Think what your refereing to is the MACD indicator bro and entry, exit is only part of the story, best of luck, sounds like you’ll need it bro.

1 Like

Hey mz, don’t forget to add the following h / (2π)) hehehe, just kidding, I have no clue what you and _bob are talking about, but I wish you well.

The Ever Plank VIPER

1 Like

I figured I was over complicating it, that is way easier than what I had in my head. Thanks for the info! Although I guess it just boils back down to a MA crossover EA again.

I guess the idea is a little more complicated than that, since I would want it to automatically close once a and b started to move back toward each other. But what you gave me is a good start.

In theory (only), it sounds reasonable because what you are effectively describing is using MAs to firstly define the direction and then secondly to act as a momentum indicator measuring them as they first diverge and the converge, I.e. measuring their difference as a histogram.

The problem here is that it would only work consistently if markets always moved in nice smooth sine-wave style waves. But that is not the case. Sometimes a trend will develop slowly and over a prolonged period and then end with a sudden drop over one or two bars. Conversely,sometimes the market will surge on a news release and then stand still and reverse back without any follow-through. Trouble is your MA differential will not react in the same way as it always requires the average of the same number of historical bars.

In other words, it will work whilst the market cycles in synch with your choice of MAs but will fail immediately when the market moves sharply or erratically.