Needing MA Filter ideas

lbranjord

Well-known member
Messages
453
Likes
15
Hello all,

I have an EA based on 5 Moving Averages that is going pretty well. What I need is a filter that actually works. Each criteria I use has limited or no effect. Are there any creative ideas out there? I can code most anything, but things like RSI/Stochastics above this, below that, just don't have any effect. Once it's done I can post it up here for people too, I'm not hogging this one.

FYI: I'm going with the trend by the way. This is intended to hedge my range-bound system that is complete so I'd like to keep it trend-based.

Thanks in advance geniuses
 
Why not code something that draws trendlines then make your EA only buy in the direction of the trendline?
 
Wouldn't that take the place of the Moving Averages? Do you think I'd want both trendlines and MAs?

If so, that would give me a nice place to buy/sell, I'd wait for maybe 5pips within the line and call that a touch. They also give up a good R/R which I like. Thanks
 
2nd thought, it may be easier to search the last x number of bars looking for higher highs & lower lows. Then I would have a pseudo direction filter.
 
I used to look at trending systems, I would trade them on a lower time frame the 4 hour.
I used a filter that I got off another system on forex factory. It involved looking at a higher time frame the weekly.

Ive cut and past this part below in bold out of the method.

Create a weekly chart [bar or candle] of a currency pair. On this chart overlay a 21 EMA [(H + L)/2], and a 5 SMA [(H + L)/2]. Note that the 21 period is an exponential moving average and the 5 period is a simple moving average.

Now, look at the difference between the two. As a market rises over time on the weekly chart, the 5 will rise faster relative to the 21. As the market goes down, the 5 will lose faster relative to the 21. The difference, in pips between the two, measures relative momentum of the market in real time. Each week, as long as the number of pips keeps rising [SMA 5 – EMA 21] from the previous week, the market continues in a bull run. Once a bull run loses pips [SMA 5 – EMA 21] from the previous week, it signals a medium-term top in the market. Conversely, once a bear run loses pips [EMA 21 – SMA 5] from the previous week, it signals a medium-term bottom in the market.

This now gives us [with only one week lag] a positive probabilistic model in determining which side [long or short] to initiate trades in a defined time period. We are identifying market momentum
.

On my 4 hr chart I would only take long positons if the weekly chart indicated an overall up trend and I would only take short positions if the weekly chart indicated a down trend.
 
So do you consider only the momentum (difference between the 5sma and 21ema) as the filter?

How would I apply this in a static approach? Would it be plausible to say that I Take bullish trades only when the 5 is over the 21 and that momentum is on the rise from the last measuring point?
 
So do you consider only the momentum (difference between the 5sma and 21ema) as the filter?

How would I apply this in a static approach? Would it be plausible to say that I Take bullish trades only when the 5 is over the 21 and that momentum is on the rise from the last measuring point?

Yup the momentum is the only filter I used, u can wait for the cross over if u like. I did use this as a filter and it worker out well, better than most filters I used.

On the pic below ive put in some vertical lines. After the green lines I would only take long trades and after the red line only short trade. The trades are on lower time frames like the 4hr.

At the end of every week all u need to do is take alook at the weekly chart and determine which direction u will take for the folowing week.
 

Attachments

  • weekly mo eg.jpg
    weekly mo eg.jpg
    278.4 KB · Views: 193
So the 21EMA is not really that big of a factor in this? Unless one wants to wait for them to cross?
 
It is a big factor cos u r measuring the distance between the two mas to give u the momentum
 
It is a big factor cos u r measuring the distance between the two mas to give u the momentum

Oh I see. i got lost there because I was already in another world with the idea. I was thinking of using a shift value of 1 or 2 and that tells me how far/fast the MA moved. Measuring between the MA's is good too, maybe better.
 
My thinking on TLs was that MAs alone give you longs and shorts whereas, perhaps, the best trades come from trading in the direction of the the parallel channel.
 
Hmm, you could try the Hodrick-Prescott Filter. Not sure how good your math/programming background is, but you can find more details on here:

http://en.wikipedia.org/wiki/Hodrick-Prescott_filter

It actually does an excellent job on smoothing any time-series. I haven't run any backtests on it, but you said you would post the results here if you were interested.

If you want to mess around with it before getting serious, don't bother trying to program it in Excel. Download the statistical software R from this website: http://www.r-project.org/

R already has a built-in Hodrick-Prescott Filter command you can apply to historical data. Furthermore, it also has built in commands for various moving averages. Just upload the .csv data into R, type in the codes to calculate the moving averages and the HP-filter, and then generate your trading signals and see if it produces good results.

Hope it helps! :D

Hello all,

I have an EA based on 5 Moving Averages that is going pretty well. What I need is a filter that actually works. Each criteria I use has limited or no effect. Are there any creative ideas out there? I can code most anything, but things like RSI/Stochastics above this, below that, just don't have any effect. Once it's done I can post it up here for people too, I'm not hogging this one.

FYI: I'm going with the trend by the way. This is intended to hedge my range-bound system that is complete so I'd like to keep it trend-based.

Thanks in advance geniuses
 
I don't want to program in R or .csv/excel. I am working with EAs right now. This moving averages one is not coming around. Not with divergence, weekly pivots, needless to say I won't likely be posting it.

Only one system I've gotten to work good enough to use thus far and it's rangebound. Everything else is doomed. All the online resources are garbage too, full of grails. Only hope is to make another one myself and that is NOT EASY! I struck oil once and I don't expect to do it twice.
 
If there was a mechanical trading system online that was really good, do you honestly think it's profitability would last long? I don't know why you even bothered to look for something online. Mechanical/Algorithmic trading systems are best developed individually through rigorous testing and experience.

Nobody said it would be easy...

Amit


All the online resources are garbage too, full of grails. Only hope is to make another one myself and that is NOT EASY! I struck oil once and I don't expect to do it twice.
 
If there was a mechanical trading system online that was really good, do you honestly think it's profitability would last long? I don't know why you even bothered to look for something online. Mechanical/Algorithmic trading systems are best developed individually through rigorous testing and experience.

Nobody said it would be easy...

Amit

I look for ideas from other systems though. Many people have great ideas they cannot finish. I don't plan to take one and run it cold without adding all my own filters and adaptations.

The one I use now actually is freely available online and not profitable. The only thing I kept was the main idea of the entries. My money management & a few unique filters saved it. Either way, without that base code I would have never thought to use the entry that DC2008 used.
 
Fair enough! I forgot to mention that one must draw inspiration from somewhere, but I figured you'd already know that as you just mentioned.

Best of luck to you!

Amit
 
Fair enough! I forgot to mention that one must draw inspiration from somewhere, but I figured you'd already know that as you just mentioned.

Best of luck to you!

Amit

Thanks Amit. I studied up on the Hodrick Prescott filter. I must say, it rekindled my love/hate relationship with mathematics :)

It's a little bit beyond me, but sparked my curiousity.
 
Top