implement valeSupSWL Pivots ...
This commit is contained in:
@@ -559,6 +559,21 @@ bool DetectXCAEAConditions(
|
||||
double p2Vale = conditions.valeBuffer[p2IDX];
|
||||
double p3Vale = conditions.valeBuffer[p3IDX];
|
||||
|
||||
//
|
||||
// VIDYA ...
|
||||
double zVidya = conditions.vidyaBuffer[zIDX];
|
||||
double cVidya = conditions.vidyaBuffer[cIDX];
|
||||
double pVidya = conditions.vidyaBuffer[pIDX];
|
||||
double p2Vidya = conditions.vidyaBuffer[p2IDX];
|
||||
double p3Vidya = conditions.vidyaBuffer[p3IDX];
|
||||
|
||||
//
|
||||
double zVidyaState = conditions.vidyaStateBuffer[zIDX];
|
||||
double cVidyaState = conditions.vidyaStateBuffer[cIDX];
|
||||
double pVidyaState = conditions.vidyaStateBuffer[pIDX];
|
||||
double p2VidyaState = conditions.vidyaStateBuffer[p2IDX];
|
||||
double p3VidyaState = conditions.vidyaStateBuffer[p3IDX];
|
||||
|
||||
//
|
||||
// RSI ...
|
||||
double zRSI = conditions.rsiBuffer[zIDX];
|
||||
@@ -776,8 +791,11 @@ bool DetectXCAEAConditions(
|
||||
|
||||
//
|
||||
// Detect Selected Box ...
|
||||
XBoxZone oscBoxes[];
|
||||
XBoxZone lastOSCBox;
|
||||
double providedSL = 0;
|
||||
bool isBoxFVG = false;
|
||||
bool hasOSCBox = false;
|
||||
bool hasPivotBox = false;
|
||||
bool isBoxPeakVale = false;
|
||||
bool isBoxRejected = false;
|
||||
@@ -831,6 +849,32 @@ bool DetectXCAEAConditions(
|
||||
isBoxPeakVale;
|
||||
if (!has)
|
||||
{
|
||||
//
|
||||
bool isOSC = Contains(
|
||||
"XCA_CCI_VALE",
|
||||
iBox.type //
|
||||
) ||
|
||||
Contains(
|
||||
"XCA_CCI_PEAK",
|
||||
iBox.type //
|
||||
) ||
|
||||
Contains(
|
||||
"XCA_RSI_VALE",
|
||||
iBox.type //
|
||||
) ||
|
||||
Contains(
|
||||
"XCA_RSI_PEAK",
|
||||
iBox.type //
|
||||
);
|
||||
if (isOSC)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
iBox,
|
||||
oscBoxes //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
|
||||
@@ -918,33 +962,78 @@ bool DetectXCAEAConditions(
|
||||
Clean(tmp);
|
||||
}
|
||||
|
||||
//
|
||||
// Check OSC Boxes ...
|
||||
bool hasOSCBoxes = HasChild(oscBoxes);
|
||||
if (hasOSCBoxes)
|
||||
{
|
||||
//
|
||||
// Detect Newest OSC Box ...
|
||||
idx = GetYoungest(oscBoxes);
|
||||
has = IsValidIndex(idx);
|
||||
if (has)
|
||||
{
|
||||
lastOSCBox = oscBoxes[idx];
|
||||
}
|
||||
|
||||
//
|
||||
// Validate OSC Box is Valid or not ...
|
||||
has = lastOSCBox.IsValid();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Check Bar is Inside OSC Box or not ...
|
||||
has = cBar.time > lastOSCBox.from &&
|
||||
cBar.time <= lastOSCBox.to;
|
||||
if (!has)
|
||||
{
|
||||
lastOSCBox.Clean();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
hasOSCBox = lastOSCBox.IsValid();
|
||||
if (hasOSCBox)
|
||||
{
|
||||
// //
|
||||
// XCBoxObject *iObj;
|
||||
// has = helper.poiDrawer.DrawBox(
|
||||
// lastOSCBox,
|
||||
// iObj //
|
||||
// );
|
||||
// if (has) {
|
||||
// iObj.BoxWidth(4);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Force Conditions to Have Selected Box ...
|
||||
hasPivotBox = hasBoxes &&
|
||||
pivotBox.IsValid();
|
||||
if (hasPivotBox)
|
||||
{
|
||||
//
|
||||
pivotBox.to = TimeCurrent();
|
||||
// //
|
||||
// pivotBox.to = TimeCurrent();
|
||||
|
||||
//
|
||||
// Draw Pivot Box Here ...
|
||||
if (isBoxPeakVale)
|
||||
{
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
pivotBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iObj.BoxWidth(5);
|
||||
iObj.BoxColor(clrDodgerBlue);
|
||||
Print("Draw Pivot Box ...");
|
||||
}
|
||||
}
|
||||
// //
|
||||
// // Draw Pivot Box Here ...
|
||||
// if (isBoxPeakVale)
|
||||
// {
|
||||
// //
|
||||
// XCBoxObject *iObj;
|
||||
// has = helper.poiDrawer.DrawBox(
|
||||
// pivotBox,
|
||||
// iObj //
|
||||
// );
|
||||
// if (has)
|
||||
// {
|
||||
// //
|
||||
// iObj.BoxWidth(5);
|
||||
// iObj.BoxColor(clrDodgerBlue);
|
||||
// Print("Draw Pivot Box ...");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
//
|
||||
@@ -977,6 +1066,7 @@ bool DetectXCAEAConditions(
|
||||
//
|
||||
bool isCond1Bullish =
|
||||
//
|
||||
false &&
|
||||
hasPivotBox &&
|
||||
isBoxPeakVale &&
|
||||
isScoreBullish &&
|
||||
@@ -992,6 +1082,7 @@ bool DetectXCAEAConditions(
|
||||
//
|
||||
bool isCond1Bearish =
|
||||
//
|
||||
false &&
|
||||
hasPivotBox &&
|
||||
isBoxPeakVale &&
|
||||
isScoreBearish &&
|
||||
@@ -1023,19 +1114,25 @@ bool DetectXCAEAConditions(
|
||||
}
|
||||
|
||||
//
|
||||
// Cond2 Act Using Box Rejection ...
|
||||
// Cond2 Act Using OSC Box and Vydia ...
|
||||
|
||||
//
|
||||
bool isCond2Bullish =
|
||||
//
|
||||
false
|
||||
hasOSCBox &&
|
||||
// cVidyaState < 0 &&
|
||||
lastOSCBox.IsBullish() // &&
|
||||
// lastOSCBox.upper < cVidya
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCond2Bearish =
|
||||
//
|
||||
false
|
||||
hasOSCBox &&
|
||||
// cVidyaState > 0 &&
|
||||
lastOSCBox.IsBearish() // &&
|
||||
// lastOSCBox.lower > cVidya
|
||||
//
|
||||
;
|
||||
|
||||
@@ -1052,6 +1149,8 @@ bool DetectXCAEAConditions(
|
||||
|
||||
//
|
||||
Print("Cond2");
|
||||
isCond2Bullish = false;
|
||||
isCond2Bearish = false;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1168,6 +1267,7 @@ bool DetectXCAEAConditions(
|
||||
p2Bar.Clean();
|
||||
p3Bar.Clean();
|
||||
p4Bar.Clean();
|
||||
Clean(oscBoxes);
|
||||
pConditions.Clean();
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user