Actually I'm searching for a solution for weeks. I've been posting this problem in another way before. Now it's urgent ;-)
I try to build an EA with the following function:
1. One basis variable called "trend"
2. If the next tick is higher than the last, the variable "trend" increases +1
3. If the next tick is less than the last, the variable "trend" decrease -1
4. When the variable "trend" reaches 50 a buy trade with sl and tp is set
5. When the variable "trend" reaches -50 a sell trade with sl and tp is set
I'm an absolute greenhorn on MQL and general programming, so I tried a lot of programming the last days but nothing works yet...
I would bee glad to get some hints how to solute this. Thanks a lot!
Look at Mql5 wizard