Code idea to filter out ranging markets in H4 timeframe?

 

Hi,

I try to filter out unfavorable conditions in my EA. Has anyone a suggestion or a code idea to filter out ranging markets in H4 timeframe?

Thanks,

JB

 

You can only design a filter, once you have properly defined the primary strategy. Define your strategy first.

 
Fernando Carreiro #:

You can only design a filter, once you have properly defined the primary strategy. Define your strategy first.

Sure that is all in place. My goal is to skip buy/signals coming from my strategy that have less probability due to unfavourable market conditions, like news, ranging market, wild candle sticks, etc. We have that now for news and unstructured pattens setup but not yet for flat or ranging markets

 
janbartbergers # My goal is to skip buy/signals coming from my strategy that have less probability

That requires knowing the future.

 

Yes and no. I don't want to take trades during news releases, so I can switch off my EA prior to a news event. This could save me from some bad trades, same switching off my EA during a period of frantic market conditions or days that give me statistically less results. It is all about probabilities. For the rest you are right, we don't know what the future brings.

 
janbartbergers:

Hi,

I try to filter out unfavorable conditions in my EA. Has anyone a suggestion or a code idea to filter out ranging markets in H4 timeframe?

Thanks,

JB

There is one thread with indicators for MT4 and MT5:
Filters indicators