Hello, I have started learning some MQL4 but I'm running into issues and I can not seem to find a fix.
I'm only trying to use a simple indior like Willi Twist Range (WPR) to enter and exit trades.
Prior to a transaction is entered, I would like it to close any open trades.
The WPR indior is used to brief if price crosses below -20 and long when it crosses above -80. I have put this at the OnTick() section.
Where can I put the near function so that it is not opening and closing trades on each tick?
Attached is my code so far. I really don't know if the function that is close is even correct. Any help is appreciated.
https://www.forexsoutheast.asia/atta...1146696142.mq4