need help in programming

 

Hello,

I am a (very) beginner in mql programming. I am trying out simple ideas, and I would need help with one of them. How could I put a condition that new position opening only if previous one was closed?

Thanks,
Richard

 
Read through today's posts, there has been one already about something similar.