Need to know the trend

 

Hi all, inside an expert advior I need to know the trend.

Which is the best solution for this?

Should I use two EMAs with different periods?

Should I use just an EMA and check the current value against previous values?

Should I use an indicator? Any recommendation?

This ea is going to run in any time frame.

Thanks for your help.

 

You can try experimenting

1. Single MA

2. Multiple MA

3. MACD

your suggestion is good enough

 

u can use zigzag

 

You could use 2 MAs and calculate their difference. When the difference is above a certain treshold, then you could consider the trend to be valid.

 
gatornuke:

You could use 2 MAs and calculate their difference. When the difference is above a certain treshold, then you could consider the trend to be valid.


Thanks all of you.
Reason: