last works ...
This commit is contained in:
@@ -1542,7 +1542,7 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
|
||||
// Initialize POIs ...
|
||||
|
||||
//
|
||||
int poiRequired = 10;
|
||||
int poiRequired = 40;
|
||||
|
||||
//
|
||||
// Trigger ...
|
||||
|
||||
@@ -53,6 +53,10 @@ class XC121SMCCycleHelper : public XCBase
|
||||
// XCHSAR ...
|
||||
XCXCHSARHelper *mXCHSARHelper;
|
||||
|
||||
//
|
||||
// POI Detector ...
|
||||
XCPOIDetector *mPOIDetector;
|
||||
|
||||
//
|
||||
// Constructor(s) ...
|
||||
XC121SMCCycleHelper()
|
||||
@@ -192,6 +196,14 @@ class XC121SMCCycleHelper : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
mPOIDetector = new XCPOIDetector(
|
||||
symbol,
|
||||
period //
|
||||
);
|
||||
mPOIDetector.MaxNumberOfRequiredPOIs(0);
|
||||
mPOIDetector.Init();
|
||||
|
||||
//
|
||||
// Initialize Bar Analyser Class Instance ...
|
||||
mBarAnalyser = new XCBarAnalyser();
|
||||
@@ -204,6 +216,61 @@ class XC121SMCCycleHelper : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Specified Bar ...
|
||||
*
|
||||
* @param source: XOHCL instance, Source Bar ...
|
||||
* @param bar: XOHCL instance, Dest Bar ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool GetBar(
|
||||
XOHCL &source,
|
||||
XOHCL &bar //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
string symbol = GetSymbol();
|
||||
ENUM_TIMEFRAMES period = GetPeriod();
|
||||
|
||||
//
|
||||
result =
|
||||
IsValid(symbol) &&
|
||||
IsValid(period) &&
|
||||
source.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int index = iBarShift(
|
||||
symbol,
|
||||
period,
|
||||
source.time //
|
||||
);
|
||||
result = bar.Init(
|
||||
symbol,
|
||||
period,
|
||||
index //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
bar.Clean();
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Cycle Conditions ...
|
||||
*
|
||||
@@ -620,59 +687,4 @@ class XC121SMCCycleHelper : public XCBase
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Specified Bar ...
|
||||
*
|
||||
* @param source: XOHCL instance, Source Bar ...
|
||||
* @param bar: XOHCL instance, Dest Bar ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool GetBar(
|
||||
XOHCL &source,
|
||||
XOHCL &bar //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
string symbol = GetSymbol();
|
||||
ENUM_TIMEFRAMES period = GetPeriod();
|
||||
|
||||
//
|
||||
result =
|
||||
IsValid(symbol) &&
|
||||
IsValid(period) &&
|
||||
source.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int index = iBarShift(
|
||||
symbol,
|
||||
period,
|
||||
source.time //
|
||||
);
|
||||
result = bar.Init(
|
||||
symbol,
|
||||
period,
|
||||
index //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
bar.Clean();
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -748,6 +748,15 @@ struct X121SMCStrategyConditions
|
||||
X121SMCCycleConditions consolidationConditions;
|
||||
X121SMCCycleConditions visionConditions;
|
||||
|
||||
//
|
||||
double sl;
|
||||
string provider;
|
||||
XCOrderBlock *visionBullOB;
|
||||
XCOrderBlock *visionBearOB;
|
||||
XCOrderBlock *consolidationBullOB;
|
||||
XCOrderBlock *consolidationBearOB;
|
||||
ENUM_X_DIRECTION marketStructureDir;
|
||||
|
||||
//
|
||||
void X121SMCStrategyConditions()
|
||||
{
|
||||
@@ -767,6 +776,15 @@ struct X121SMCStrategyConditions
|
||||
period = NULL;
|
||||
time = NULL;
|
||||
|
||||
//
|
||||
sl = 0;
|
||||
provider = NULL;
|
||||
visionBullOB = NULL;
|
||||
visionBearOB = NULL;
|
||||
consolidationBullOB = NULL;
|
||||
consolidationBearOB = NULL;
|
||||
marketStructureDir = X_DIRECTION_NONE;
|
||||
|
||||
//
|
||||
triggerConditions.Clean();
|
||||
decisionConditions.Clean();
|
||||
@@ -795,6 +813,14 @@ struct X121SMCStrategyConditions
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Conditions has Ddirection or not ...
|
||||
*
|
||||
* @param dir: ENUM_X_DIRECTIOn member ...
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool HasDirection(
|
||||
ENUM_X_DIRECTION &dir,
|
||||
XOHCL &bar //
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user