OrderClose(OrderTicket(),Lots,Ask,30,Green);
- What are Function return values ? How do I use them ? - MQL4 forum Find out WHY.
- Lots -> OrderLots()
- Ask -> OrderClosePrice() Don't need to check order type
- 30 - 4/5 digit brokers Problems with a calculation - MQL4 forum

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
I'm a week in so I'm really green with coding. Especially since I have no programming background. Below is section of code I wrote to close an open order at a specific time. Although it compiles fine the orders stay open. I hoped I could get some pointers. I've only got OP_BUY in the section below but the plan is to have OP_SELL as well so it closes all open trades at NY close.
I'm sure I'm missing something simple as that seems to normally be the case hehe.
Cheers,
Dud