angomes:
I first tried to compare the doubles of both prices but I realized that there is something tricky about comparing doubles so I decided to apply some math instead but still cant make it work.
and yet you are still comparing Doubles.
if(Close[0] - L3 == 0){ } if(Close[0] - H3 == 0) { }
If you want to determine if a level is hit, you first need to know whether price starts above or below the level.
If it starts above the level, check for if price is <= the level, then you will know that price has hit or crossed the level.
When comparing doubles you should avoid using the "==" operator. Only use ">" or "<" operators.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Guys I have no ideia why I cant make this simple operation in my EA code work.
I first tried to compare the doubles of both prices but I realized that there is something tricky about comparing doubles so I decided to apply some math instead but still cant make it work.
Please Help.