update to my mt5 libs to include better comments
This commit is contained in:
@@ -12,6 +12,18 @@ class OrderTracker {
|
||||
int count_pending_orders(string symbol, ENUM_ORDER_TYPE order_type, long magic);
|
||||
};
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Counts the number of open BUY or SELL positions for a given symbol.
|
||||
//
|
||||
// Parameters:
|
||||
// - symbol : Trading symbol (e.g., "EURUSD").
|
||||
// - order_side : 1 = BUY, 2 = SELL.
|
||||
// - magic_number : Magic number identifying strategy group.
|
||||
//
|
||||
// Returns:
|
||||
// - Number of matching open positions.
|
||||
// ---------------------------------------------------------------------
|
||||
int OrderTracker::count_open_positions(string symbol, int order_side, long magic_number) {
|
||||
int count = 0;
|
||||
|
||||
@@ -32,6 +44,16 @@ int OrderTracker::count_open_positions(string symbol, int order_side, long magic
|
||||
return count;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Counts all open positions for a symbol regardless of direction.
|
||||
//
|
||||
// Parameters:
|
||||
// - symbol : Trading symbol.
|
||||
// - magic_number : Magic number identifying strategy group.
|
||||
//
|
||||
// Returns:
|
||||
// - Total number of matching positions.
|
||||
// ---------------------------------------------------------------------
|
||||
int OrderTracker::count_all_positions(string symbol, long magic_number) {
|
||||
int count = 0;
|
||||
|
||||
@@ -46,6 +68,17 @@ int OrderTracker::count_all_positions(string symbol, long magic_number) {
|
||||
return count;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Counts pending orders of a specific type for a symbol and magic number.
|
||||
//
|
||||
// Parameters:
|
||||
// - symbol : Trading symbol.
|
||||
// - order_type : Type of pending order (e.g., ORDER_TYPE_BUY_STOP).
|
||||
// - magic : Magic number identifying strategy group.
|
||||
//
|
||||
// Returns:
|
||||
// - Number of matching pending orders.
|
||||
// ---------------------------------------------------------------------
|
||||
int OrderTracker::count_pending_orders(string symbol, ENUM_ORDER_TYPE order_type, long magic) {
|
||||
int count = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user