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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user