This commit is contained in:
2025-04-23 05:07:10 +03:30
parent 7c8cb9e237
commit 5316d60869
2 changed files with 112 additions and 8 deletions
+104
View File
@@ -698,6 +698,110 @@ bool DetectXCAEAConditions(
}
///////////////////////////////////////////////////////////////////////////////////
//
// Detect Trend Lines ...
//
// RSI ...
bool canLookupValeTrendLine =
detector.HasRSIValePivots() &&
detector.CountRSIValePivots() >= 2;
if (canLookupValeTrendLine)
{
//
XBoxZone rsiVale;
XBoxZone rsiValePrev;
count = detector.CountRSIValePivots();
has = detector.rsiValePivots[count - 1].AsBox(rsiValePrev);
has = has &&
detector.rsiValePivots[count - 2].AsBox(rsiVale);
bool hasTrend = has &&
rsiVale.lower > rsiValePrev.lower;
//
if (hasTrend)
{
//
string valeTrendLineName = "RSIValeTrendLine";
CChartObjectTrend *iVTLine;
iVTLine = new CChartObjectTrend();
has = iVTLine.Create(
0,
valeTrendLineName,
0,
rsiValePrev.from,
rsiValePrev.lower,
rsiVale.to,
rsiVale.lower //
);
if (has)
{
//
iVTLine.RayRight(true);
iVTLine.Width(2);
iVTLine.Color(clrAqua);
iVTLine.Style(STYLE_SOLID);
//
mObjects.Add(iVTLine);
}
}
//
rsiVale.Clean();
rsiValePrev.Clean();
}
//
// CCI ...
// canLookupValeTrendLine =
// detector.HasCCIValePivots() &&
// detector.CountCCIValePivots() >= 2;
// if (canLookupValeTrendLine)
// {
// //
// XBoxZone cciVale;
// XBoxZone cciValePrev;
// count = detector.CountCCIValePivots();
// has = detector.cciValePivots[count - 1].AsBox(cciValePrev);
// has = has &&
// detector.cciValePivots[count - 2].AsBox(cciVale);
// bool hasTrend = has &&
// cciVale.lower > cciValePrev.lower;
// //
// if (hasTrend)
// {
// //
// string valeTrendLineName = "CCIValeTrendLine";
// CChartObjectTrend *iVTLine;
// iVTLine = new CChartObjectTrend();
// has = iVTLine.Create(
// 0,
// valeTrendLineName,
// 0,
// cciValePrev.from,
// cciValePrev.lower,
// cciVale.to,
// cciVale.lower //
// );
// if (has)
// {
// //
// iVTLine.RayRight(true);
// iVTLine.Width(2);
// iVTLine.Color(clrAqua);
// iVTLine.Style(STYLE_SOLID);
// //
// mObjects.Add(iVTLine);
// }
// }
// //
// cciVale.Clean();
// cciValePrev.Clean();
// }
///////////////////////////////////////////////////////////////////////////////////