last ...
This commit is contained in:
@@ -275,12 +275,64 @@ struct XCATBEAStrategyConditions
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
bool DetectSignalZone()
|
||||
/**
|
||||
* Detect Signal Zone based on Market Conditions ...
|
||||
*
|
||||
* @param helper: XCX121XCatbHelper instance pointer ...
|
||||
* @param barAnalyser: XCBarAnalyser instance pointer ...
|
||||
* @param conditions: X121XCatbConditions instance reference, hold signalling Conditions ...
|
||||
* @param signalZone: XBoxZone instance reference, hold Signal Zone ...
|
||||
* @param barIndex: int, Bar Index ...
|
||||
* @param loopback: int, Loopback for Market Conditions ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool DetectSignalZone(
|
||||
XCX121XCatbHelper *helper,
|
||||
XCBarAnalyser *barAnalyser,
|
||||
X121XCatbConditions &conditions,
|
||||
XBoxZone &signalZone,
|
||||
int barIndex = 0,
|
||||
int loopback = 10 //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Args ...
|
||||
signalZone.Clean();
|
||||
conditions.Clean();
|
||||
loopback = NormalizeInt(loopback, 0);
|
||||
barIndex = NormalizeInt(barIndex, 0);
|
||||
|
||||
//
|
||||
// Validate Args ...
|
||||
result =
|
||||
helper != NULL &&
|
||||
barAnalyser != NULL;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Validate Result ...
|
||||
result = signalZone.IsValid();
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
signalZone.Clean();
|
||||
conditions.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
Reference in New Issue
Block a user