This commit is contained in:
2025-04-13 11:46:41 +03:30
parent d1ab32ffb8
commit 1d91d3be1b
5 changed files with 1618 additions and 23 deletions
+156 -8
View File
@@ -40,6 +40,7 @@ class XCXSTRCCISignaller : XCBase
double rfReward;
bool isPassedBoxes;
XSTRCCIInputs inputs;
XBarTracker barTraker;
XCXSTRCCIHelper *helper;
bool continuesRFTillTarget;
XSTRCCIStrategyConditions mConditions;
@@ -96,6 +97,117 @@ class XCXSTRCCISignaller : XCBase
//
bool result = false;
//
// Check Bar Processing ...
if (!barTraker.CanProcessBar())
{
return result;
}
//
bool isBullish = false;
bool isBearish = false;
//
int zIndex = 0;
int cIndex = zIndex + 1;
int pIndex = cIndex + 1;
int ppIndex = pIndex + 1;
//
int loopback = 10;
//
double ask = GetAsk(symbol);
double bid = GetBid(symbol);
datetime cTime = TimeCurrent();
double points = GetPoints(symbol);
//
mConditions.symbol = symbol;
mConditions.period = period;
//
XOHCL zBar;
XOHCL cBar;
XOHCL pBar;
XOHCL pPBar;
result = zBar.Init(
symbol,
period,
zIndex //
);
result =
result &&
zBar.GetPreviousBar(cBar);
result =
result &&
cBar.GetPreviousBar(pBar);
result =
result &&
pBar.GetPreviousBar(pPBar);
if (!result)
{
//
zBar.Clean();
cBar.Clean();
pBar.Clean();
pPBar.Clean();
//
return result;
}
//
// Setup Conditions ...
double sls[];
double sl = 0;
double pivot = 0;
double point = 0;
double targets[];
XBoxZone signalBox;
bool hasSignalBox = false;
ENUM_X_DIRECTION signalBoxDir = X_DIRECTION_NONE;
//
// Checking Conditions ...
//
hasSignalBox = DetectXSTRCCIConditions(
signalBox,
signalBoxDir,
helper,
zIndex,
loopback //
);
//
isBullish = hasSignalBox &&
IsBullish(signalBoxDir);
//
isBearish = hasSignalBox &&
IsBearish(signalBoxDir);
//
result = isBullish ||
isBearish;
if (result)
{
//
// Do What we Want ...
barTraker.Waits();
}
//
// Cleanup Resource ...
//
zBar.Clean();
cBar.Clean();
pBar.Clean();
pPBar.Clean();
//
return result;
}
@@ -303,6 +415,12 @@ class XCXSTRCCISignaller : XCBase
isPassedBoxes = false;
continuesRFTillTarget = true;
//
barTraker.Init(
symbol,
period //
);
//
inputs.Default();
@@ -317,21 +435,48 @@ class XCXSTRCCISignaller : XCBase
// XCT ...
inputs.ctInputs.showCandleTime = true;
//
// XPV ...
inputs.pvInputs.showSar = false;
inputs.pvInputs.showPeaks = false;
inputs.pvInputs.showVales = false;
inputs.pvInputs.showTrend = false;
inputs.pvInputs.showSwingLows = false;
inputs.pvInputs.showSwingHighs = false;
inputs.pvInputs.showGoldenZones = false;
inputs.pvInputs.showSupports = false;
inputs.pvInputs.showResistances = false;
//
// XSTR ...
inputs.strInputs.showStr = true;
inputs.strInputs.showVidya = true;
inputs.strInputs.showStr = false;
inputs.strInputs.showVidya = false;
inputs.strInputs.showStrUpper = false;
inputs.strInputs.showStrLower = false;
inputs.strInputs.showStrSMLow = true;
inputs.strInputs.showStrSMHigh = true;
inputs.strInputs.showStrSMLow = false;
inputs.strInputs.showStrSMHigh = false;
//
// X3MA ...
inputs.ma3Inputs.showX3MaFast = false;
inputs.ma3Inputs.showX3MaMid = false;
inputs.ma3Inputs.showX3MaSlow = true;
//
// XICH ...
inputs.ichInputs.showKumo = false;
inputs.ichInputs.showKijunSen = true;
inputs.ichInputs.showTenkanSen = true;
inputs.ichInputs.showChikouSpan = false;
inputs.ichInputs.showSenkouSpanA = false;
inputs.ichInputs.showSenkouSpanB = false;
//
// XOSCS ...
inputs.oscsInputs.rsiLength = 5;
inputs.oscsInputs.mfiLength = 5;
inputs.oscsInputs.rviLength = 5;
inputs.oscsInputs.cciLength = 5;
// inputs.oscsInputs.rsiLength = 5;
// inputs.oscsInputs.mfiLength = 5;
// inputs.oscsInputs.rviLength = 5;
// inputs.oscsInputs.cciLength = 5;
//
// Oscillators Views ...
@@ -367,6 +512,9 @@ class XCXSTRCCISignaller : XCBase
//
mObjects.Clear();
mBarObjects.Clear();
//
barTraker.Clean();
}
//