Swing Highs and Swing Lows

 

Hello,

If I wanted to use swing highs and lows to determine fibonacci ratios and to set trailing stop losses from in an expert advisor, what algorithm would I use to determine these swing highs and lows?

I put a chart below indicating what I mean:

Thank You

ThemBonez

Files:
 

"Swings" are usually very similar to what is zigzag indicator when it comes to metatrader - so you could use zigzag indicator to find out those swings

 

Hey ThemBonez,

IMO you are asking for a defintion of swings not for an algorithm. mladen already has pointed out the zigzag, which is a possibility for swings. But there are others. Choose one which fits your style/strategie then it would be easy to translate in algorithmic language. i am just guessing, but you should concentrate on how markets work before you think about expert advisors.

Cu

Joe

 

That is a classical zigzag (if the start and the end of the swing are where that lines starts and ends)