How Can I Detect Side Market Using Indicatros in my Programm?

I am Python programmer and was doing FX trading once a while, recently ( after pandemic and lost of Work from Home), I decided to automate my strategy,

I am using EMAs ( exponential moving average) and MACD,

It works well, but it looses money in the side market, Any advice how can i detect side market ( range market) using any indicator?

I am good to disclose the strategy, it is very simple.

I tried to use ADX but wasn’t helpful,

please don’t blame because EMAs are very simple and garbage :slight_smile:.

I am looking to see how can I detect range market using indicators :slight_smile:

Look into building a ROC (Rate of Change) indicator. That can help you detect trending vs. range.

For a quick and dirty check, you can also take a measure of how wide your upper and lower second standard deviation Bollinger bands are from each other. Tight bands = range. Wide or widening bands = trend.

2 Likes

Hi, check also ATR . Regards Greg

2 Likes

You can try some other indicator for a better result. If ADX didn’t work, you can go for ATR ( Average True Range). You can add the ATR with a 20 period Moving Average of the ATR. When ATR is below the Moving Average, then only allow the trade. With that big bull and big bear will get filtered out.

Or go with RSI and trade when it is between 40 and 60. Hopefully, they’ll work.

I use the Average Directional Index or ADX to determine if an instrument is moving in a clear direction (either up or down) or is moving sideways. High ADX values (around 30 or higher) mean that the instrument’s price is predominantly moving up or down. Low ADX values (around 25 or lower) mean that the instrument’s price is predominantly moving sideways.