OrderClose Closes an open trade with the matching ticket number at the specified price.īool OrderClose(int ticket, double lots, double price, int slippage, color Color=CLR_NONE)
![mathmod mql4 mathmod mql4](https://i.ytimg.com/vi/eZWcnWOPYvY/hqdefault.jpg)
![mathmod mql4 mathmod mql4](https://i.ytimg.com/vi/AG7dnDBKz5Q/hqdefault.jpg)
This should guarantee it working with all brokers.Trade Operation (OP_BUY, OP_SELL, OP_BUYLIMIT, OP_SELLLIMIT, OP_BUYSTOP, OP_SELLSTOP) No need to check for time, no need to check for weekends because both ibarshift and itime ignore weekends.
![mathmod mql4 mathmod mql4](https://image.slidesharecdn.com/mql4manual-140501033911-phpapp02/95/mql4-manual-51-638.jpg)
Now you have the correct sum of the high and low of that time. Start the loop at this, add 24 (because it's on an hourly chart and because we want to know the highs between specific times (08:00 and 16:00 in this case), a day chart can't be used) each cycle. If ((closetime) <10) Find out the barshift to find the first bar at 16:00.