-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathOrders.mqh
44 lines (39 loc) · 1.61 KB
/
Orders.mqh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//+------------------------------------------------------------------+
//| Orders.mqh |
//| Copyright 2022, Homma.tech |
//| https://www.homma.tech |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, Homma.tech"
#property link "https://www.homma.tech"
#property version "1.00"
#include "Operations.mqh"
class COrders : public COperations {
private:
public:
void COrders :: DeleteAllOrders();
COrders();
~COrders();
};
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
COrders::COrders() {
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
COrders::~COrders() {
}
//+------------------------------------------------------------------+
//| Delete all orders function |
//+------------------------------------------------------------------+
void COrders :: DeleteAllOrders() {
ulong ticket = 0;
if(OrdersTotal() != 0) {
for(int i = 0; i < OrdersTotal(); i++) {
ticket = OrderGetTicket(i);
tradeOperations.OrderDelete(ticket);
}
}
}
//+------------------------------------------------------------------+