Tactics on how to detect ranging or trending markets - Discussion

 

If your posting code please limit to forum specific MT5 only.


Please take a look at a thought on logic for how to detect ranging or trending markets.


Any thoughts or idea or other logic that I can implement to detect ranging or trending market would be great to hear.

Please discuss your tactics on this issue.

It did occur to me that maybe smoothing the price data before detecting swings maybe a good idea.

And one of the things I don't know how to do is detect if a value is within a certain range of another value so any help there would be appreciated.

I would like it to be able to detect both a large difference in prices ranging market and a small small difference in prices ranging market. So having a ranged value is important.

Also what is you best strategy for detecting trends?

track swings to arrays of high swing price and low swing price
track number of consecutive swings 
so previous swing high low high execute style decision on last swing high
track price distance between swings 
compare price distances to a set value like 1
normalize values so they are smoothed 
compare to each other
if equal market is ranging 
change trading style to averaging
if high1 to low1 distance normalized is equal to low 1 to high2 distance normalized 
	market is ranging
wait for breakout of low1 + normalized high1 to low1 distance or
         breakout of high2 + normalized low1 to high2 distance
check last 10 bars for trend up or down if trending open position in direction of trend         
change trading style to hedging 
 
Sorry this should probably be in a different zone.
 
Benny Addams:


i realise that my response is not specific code that you specificly asked for, however, I think that you have described every breakout strategy that was -- ever -- thought of. I suggest that you check on codebase. There are many many and, even, many many more systems used in every breakout strategy that is used to detect what you have described above.

i -- personlly -- love macd the most. I use it on several periods at the same time -- detects the finish of a trend, and often use a custom qqe or an extra sensitive rsi to detect the breakout and optimal entry price. All of which i find on codebase.
 
Michael Charles Schefe #:

i realise that my response is not specific code that you specificly asked for, however, I think that you have described every breakout strategy that was -- ever -- thought of. I suggest that you check on codebase. There are many many and, even, many many more systems used in every breakout strategy that is used to detect what you have described above.

i -- personlly -- love macd the most. I use it on several periods at the same time -- detects the finish of a trend, and often use a custom qqe or an extra sensitive rsi to detect the breakout and optimal entry price. All of which i find on codebase.

This is the first I have heard of QQE how does MACD stack up against a M1 chart i've found a lot of indicators are not so great due to the extra noise a M1 chart has  

 
Benny Addams #:

This is the first I have heard of QQE how does MACD stack up against a M1 chart i've found a lot of indicators are not so great due to the extra noise a M1 chart has  

no better than the rest. But that is why I use macd, like most of my indicators, on multiple timeframes at the same time. When the higher timeframe is in my favor, then I go down to the closest, lower, timeframe and then, onto the next lower, so long as signal conditions continue to be in my favor on the higher timeframes, continue down to the lower timeframes, until either volume or volatility is also in my favor, and i let the macds tell me which direction to open the trade, altho I am definitely sell biased.
 
Michael Charles Schefe #:
no better than the rest. But that is why I use macd, like most of my indicators, on multiple timeframes at the same time. When the higher timeframe is in my favor, then I go down to the closest, lower, timeframe and then, onto the next lower, so long as signal conditions continue to be in my favor on the higher timeframes, continue down to the lower timeframes, until either volume or volatility is also in my favor, and i let the macds tell me which direction to open the trade, altho I am definitely sell biased.

Like QQE I looked into it and it look proper good