last works ...
This commit is contained in:
@@ -3180,6 +3180,52 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Tools ...
|
||||
|
||||
//
|
||||
// Retrieve Last Open Position Ticket ...
|
||||
ulong GetLastOpenPositionTicket()
|
||||
{
|
||||
//
|
||||
ulong result = 0;
|
||||
|
||||
int positionsCount = PositionsTotal();
|
||||
if (positionsCount <= 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = PositionGetTicket(PositionsTotal() - 1);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve Last Placed Order Ticket ...
|
||||
ulong GetLastPlacedOrderTicket()
|
||||
{
|
||||
//
|
||||
ulong result = 0;
|
||||
|
||||
int ordersCount = OrdersTotal();
|
||||
if (ordersCount <= 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
if (mOrderInfo.SelectByIndex(ordersCount - 1))
|
||||
{
|
||||
result = mOrderInfo.Ticket();
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
@@ -3340,49 +3386,6 @@ protected:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve Last Open Position Ticket ...
|
||||
ulong GetLastOpenPositionTicket()
|
||||
{
|
||||
//
|
||||
ulong result = 0;
|
||||
|
||||
int positionsCount = PositionsTotal();
|
||||
if (positionsCount <= 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = PositionGetTicket(PositionsTotal() - 1);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve Last Placed Order Ticket ...
|
||||
ulong GetLastPlacedOrderTicket()
|
||||
{
|
||||
//
|
||||
ulong result = 0;
|
||||
|
||||
int ordersCount = OrdersTotal();
|
||||
if (ordersCount <= 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
if (mOrderInfo.SelectByIndex(ordersCount - 1))
|
||||
{
|
||||
result = mOrderInfo.Ticket();
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Extract Specific Deals Position's Pack ...
|
||||
// this used when a Position SL or TP triggered and we want to close
|
||||
|
||||
Reference in New Issue
Block a user