how to calculate FLATness of a MA using MA slope independence to timeframe

 

hi, can someone give me any effective idea or code for identifying Flat MA? i can not use somethings like: if(iMa[1]-iMa[3]< X pips) or (iMa[1]-iMa[3])/(1-3) because at methods like this, the pip difference for assuming MA as FLAT or not, is different for each timeframe and since i want this indicator to be MTF you need to set it for each timeframe separately. also i tried the MathArctan() too, but the same problem exist.

i tried some googling and reach to these topics, but finally i did not get my answer:

https://www.mql5.com/en/forum/102495
https://www.mql5.com/en/forum/138726
https://www.mql5.com/en/forum/219495
https://www.mql5.com/en/forum/152103
https://www.mql5.com/en/forum/152085
https://www.mql5.com/en/forum/122852

thanks for you help.

 
Alireza Yadegar:

hi, can someone give me any effective idea or code for identifying Flat MA? i can not use somethings like: if(iMa[1]-iMa[3]< X pips) or (iMa[1]-iMa[3])/(1-3) because at methods like this, the pip difference for assuming MA as FLAT or not, is different for each timeframe and since i want this indicator to be MTF you need to set it for each timeframe separately. also i tried the MathArctan() too, but the same problem exist.

i tried some googling and reach to these topics, but finally i did not get my answer:

https://www.mql5.com/en/forum/102495
https://www.mql5.com/en/forum/138726
https://www.mql5.com/en/forum/219495
https://www.mql5.com/en/forum/152103
https://www.mql5.com/en/forum/152085
https://www.mql5.com/en/forum/122852

thanks for you help.

Instead of X pips, use ATR.
 
Alain Verleyen:
Instead of X pips, use ATR.
thanks!  i didnt think about that, i will check it
 
Avoid Choppy Markets With Bollinger Band Squeeze
Avoid Choppy Markets With Bollinger Band Squeeze
  • www.netpicks.com
In this article I’ll focus on one of those indicators that help us determine if we are in a trending or consolidating market, the Bollinger Band Squeeze. I’ll recap the components of The Squeeze, describe the rationale behind the indicator, and present an approach you can use to develop a customized Squeeze trading indicator. After reading...