Expert in non-trending market

 
I'm currently working on an expert advisor, and I'm having some problems trying to figure out how to break the following down into programming concepts.

I want the expert advisor to be able to notice when the market is moving sideways, and not trade during that. It uses two moving averages, RSI indicator, Slow Stochastic and MACD with histogram.

One of the problems is, that very small fluctuations might set off the expert advisor, where I would have seen that there was little happening. Any ideas how I can make the expert see it too?

Cheers guys,
Pete.
 
It's difficult to understand your problem. Every tick is calculated by the expert if it works online, so every fluct will be seen. It can't be more precise :) If U use expert in tester U can use smaller timeframe and multiply indicators parameters.
Try to describe problem more, so we'll figure out the solution

Cheers
Rafael
 
Pete, the RSI is there for that.. a low RSI means chop = dont trade, a higher RSI means trend so trade.

Try optimising your expert advisor with different RSI cut-off settings to see what happens.

hugues
 
Thanks for the replies.

Rafael: My problem is that the expert sometimes manages to meet all the conditions for entering a trade during times when the market is dead, or where it is only a very minor fluctuation in a prevailing trend in another direction. I need to find some suitable criteria for eliminating most of these bad trades.

Hugues: Does a low RSI (under 30) not mean oversold, and suggest entering a long position?

I have just had a quick look back through the charts, and the RSI is generally moving lower in a downwards trend. My experience is limited though, so it may well be that I have missed something.

Pete.
 
RSI under 30 mean strong trend and oversold market - like every oscillator.
You can use it for signal when it leaves 0-30 or 70-100 zone.

Market is dead during time periods we know, so you can filter entry by time functions. For example
if (Hour( ) >8 && Hour( ) <18)....
This makes your trades work only during NY trading time (I think), but be carefull with time zones shift.
If you have problems with system sensivity during minor fluct... Well if the system is too sensitive it will give many false signals - there is no help for this.
You can filter them or make system less sensitive, but generating less signals. So it depends on system concept.

Do you work on this system http://www.tradecurrency.ca/daytrade.htm ?

R
 
Yes, that's the system I use, Rafael.

I will try to incorporate the time functions into my expert and see what happens.
 
I strongly suggest you to look there:
http://www.strategybuilderfx.com/forums/showthread.php?t=14293&page=51&pp=8

There is a long thread about this system with many codes and suggestions
Reason: