if (MathCeil(CurTime()/60/Period())!=MathCeil(TradeTime/60/Period())) { // do trade ... if (ticket>0) TradeTime=CurTime(); // only if trade operation done }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
new to mql4. writing so code to try out all aspects of mql4.
wrote simple buy/sell code that work of last candle open and close. just have one problem as soon as trade is close buy stop loss or profit limit it opens up new trade; how do i code so it only open trade again on next candle.