I need a code
mohsenvix: I need a code that if price was higher than the open buy position to close position(for buy mode)
Babel. What price was higher? What closed position? If you can't post a concrete question, you can't code it.
learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
thanks