last ...
This commit is contained in:
@@ -1596,6 +1596,57 @@ class XCXCATBEATradeManager : public XCBaseAlert
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Specified Positions ...
|
||||
*
|
||||
* @param positions: XPosition instance Reference Array, which holds Founded Positions ...
|
||||
* @param symbol: string, Specified Symbol Name ...
|
||||
* @param provider: string, Specified Provider Name ...
|
||||
* @param period: ENUM_TIMEFRAMES, Specified Period ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int GetPositions(
|
||||
XPosition &positions[],
|
||||
string symbol,
|
||||
string provider,
|
||||
ENUM_TIMEFRAMES period //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
Clean(positions);
|
||||
|
||||
//
|
||||
bool has =
|
||||
IsValid(symbol) &&
|
||||
IsValid(period) &&
|
||||
IsValid(provider);
|
||||
if (!has)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = trader.GetPositions(
|
||||
positions,
|
||||
symbol,
|
||||
provider,
|
||||
period,
|
||||
NULL, // All Types ...
|
||||
true, // Filter By Magic ...
|
||||
true // Force Clean ...
|
||||
);
|
||||
|
||||
//
|
||||
result = ArraySize(positions);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Position Take Profit ...
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user