Thanks dusktrader and jcl for your help! The problem with HTTrendMode is that it returns an int and I was assigning a var to the result thus when asking 1.0 == 1 it always returned false. My bad...I'm halway in my studies of computer engineering but it seems forex concepts are filling my head and I forgot the basics of programming wink This works:

Code:
int market_mode = HTTrendMode(series(price());



Originally Posted By: jcl

"Sensibility" means the bar period on which the DominantPhase function is most sensible. F.I when you only want to consider bar periods greater than 30 bars, give 40 or 50 here to make DominantPhase insensible for smaller bar periods.


jcl, your answer bring two more questions then:

1) So that period parameter is like a center of a
right-skewed bell shape of dominant periods? ie: If I set it to 40 it will find more likely dominant periods of 30-60 bars and more unlikely of less than 30?
Or is it like a minimum point from which it starts iterations (in ascending steps) to find the dominant period?

2) Anyway, if I want to find the dominant period as in Ehlers books, that is the dominant period of all periods how can I do it? According to what you said I should set Period to 1 to scan all periods greater than one bar. Is this correct?

Last edited by Mithrandir77; 02/05/14 22:50.