newbie - place one order in one bar only

 

Hello,

it is mql script in mt4.

I have finished open 1 long or short position till it is closed,

how could I open order per bar only?

once I modified my codes of opening order part,

it always creates endless orders in one bar.

Thank you

Files:
 
mql4 question have to be posted in appropriate section. I moved your topic.
 
Chihming Tsao: it always creates endless orders in one bar.
  1. Where is your new bar code? learn to code it, or pay (Freelance) someone to code it. 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.
  2. Check your return codes What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
Reason: