implement valeSupSWL Pivots ...
This commit is contained in:
@@ -0,0 +1,878 @@
|
||||
///////////////////////////////////////////////////////
|
||||
//
|
||||
// SaherElm IT Center MQL5 Indicator
|
||||
// -------------------------------------------------
|
||||
// Name: XCXCAEASignaller ...
|
||||
// Description: Class for XCAEA Signaller ...
|
||||
//
|
||||
//
|
||||
// Maintainer:
|
||||
// ------------
|
||||
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
|
||||
//
|
||||
//////////////////////////////////////////////////////
|
||||
//
|
||||
// Global Properties ...
|
||||
#property library
|
||||
#property copyright "Copyright 2023, SaherElm IT Center"
|
||||
#property link "https://saherelm.ir"
|
||||
#property version "1.00"
|
||||
#property description "SaherElm Class for XCAEA Signaller"
|
||||
#property strict
|
||||
|
||||
//
|
||||
// Imports ...
|
||||
#include "../../Classes/x-saherelm.base.class.mq5"
|
||||
#include "../../Classes/x-saherelm.x-cobject.class.mq5"
|
||||
#include "../Classes/xcaea.x-poi.detector.class.mq5"
|
||||
#include "../Classes/xcaea.x-poi.drawer.class.mq5"
|
||||
#include "../Helpers/xcaea.helper.mq5"
|
||||
#include "../Libraries/xcaea.signaller.lib.mq5"
|
||||
|
||||
//
|
||||
// Definitions ...
|
||||
|
||||
class XCXCAEASignaller : XCBase
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
//
|
||||
// Props ...
|
||||
bool useGuards;
|
||||
XCAEAInputs inputs;
|
||||
XBarTracker barTraker;
|
||||
XCXCAEAHelper *helper;
|
||||
XCXCAEAPOIDrawer *drawer;
|
||||
bool continuesRFTillTarget;
|
||||
XBoxZone unAvailableBoxes[];
|
||||
XCXCAEAPOIDetector *detector;
|
||||
XCAEAStrategyConditions mConditions;
|
||||
XCAEAStrategyConditions mConditionsCollection[];
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
XCXCAEASignaller(
|
||||
string _symbol,
|
||||
ENUM_TIMEFRAMES _period //
|
||||
)
|
||||
{
|
||||
//
|
||||
symbol = _symbol;
|
||||
period = _period;
|
||||
|
||||
//
|
||||
Init();
|
||||
}
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
~XCXCAEASignaller()
|
||||
{
|
||||
DeInit();
|
||||
}
|
||||
|
||||
//
|
||||
// Properties ...
|
||||
|
||||
string GetSymbol()
|
||||
{
|
||||
return symbol;
|
||||
}
|
||||
|
||||
ENUM_TIMEFRAMES GetPeriod()
|
||||
{
|
||||
return period;
|
||||
}
|
||||
|
||||
//
|
||||
// Signaller Tools ...
|
||||
|
||||
/**
|
||||
* Detect Setup Conditions based on Signalling ...
|
||||
*
|
||||
* @param maxAllowedSLDistanceInPoint: int, Max Allowed SL Distance in Points (if Bigger thn Zero Provided) ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool DetectSignalSetup(
|
||||
double tpReward = 3,
|
||||
double maxAllowedSLDistanceInPoint = 100 //
|
||||
)
|
||||
{
|
||||
//
|
||||
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;
|
||||
|
||||
//
|
||||
int idx = -1;
|
||||
int count = 0;
|
||||
bool has = false;
|
||||
|
||||
//
|
||||
double ask = GetAsk(symbol);
|
||||
double bid = GetBid(symbol);
|
||||
datetime cTime = TimeCurrent();
|
||||
double points = GetPoints(symbol);
|
||||
|
||||
//
|
||||
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 ...
|
||||
XBoxZone boxes[];
|
||||
XBoxZone pivotBox;
|
||||
XBoxZone signalBox;
|
||||
double additionalSL = 0;
|
||||
XBoxZone bullishBoxes[];
|
||||
XBoxZone bearishBoxes[];
|
||||
bool hasSignalBox = false;
|
||||
XCAEAConditions conditions;
|
||||
ENUM_X_DIRECTION signalBoxDir = X_DIRECTION_NONE;
|
||||
|
||||
//
|
||||
// Detecting Pivots ...
|
||||
detector.Update(
|
||||
zIndex //
|
||||
);
|
||||
|
||||
//
|
||||
// Validate Pivots ...
|
||||
detector.Validate(
|
||||
unAvailableBoxes,
|
||||
zIndex //
|
||||
);
|
||||
|
||||
//
|
||||
// Draw Founded Pivots ...
|
||||
drawer.Draw(cTime);
|
||||
|
||||
//
|
||||
// Retrieve Valid Boxes ...
|
||||
|
||||
//
|
||||
// Bullish ...
|
||||
int bullishBoxesCount =
|
||||
detector
|
||||
.FillBullishBoxes(bullishBoxes);
|
||||
|
||||
//
|
||||
// Bearish ...
|
||||
int bearishBoxesCount =
|
||||
detector
|
||||
.FillBearishBoxes(bearishBoxes);
|
||||
|
||||
//
|
||||
Copy(
|
||||
bullishBoxes,
|
||||
boxes,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishBoxes,
|
||||
boxes,
|
||||
false //
|
||||
);
|
||||
int boxesCount = ArraySize(boxes);
|
||||
bool hasBoxes = IsValidSize(boxesCount);
|
||||
|
||||
//
|
||||
// Filter UnAvailable Boxes ...
|
||||
if (hasBoxes)
|
||||
{
|
||||
//
|
||||
// Remove UnAvailable Boxes ...
|
||||
has = HasChild(unAvailableBoxes);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = ArraySize(unAvailableBoxes);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = unAvailableBoxes[i];
|
||||
|
||||
//
|
||||
has = FindBoxIndex(
|
||||
idx,
|
||||
iBox,
|
||||
boxes //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
ArrayRemove(
|
||||
boxes,
|
||||
idx,
|
||||
1 //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
hasBoxes = HasChild(boxes);
|
||||
boxesCount = ArraySize(boxes);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
//
|
||||
// if (hasBoxes)
|
||||
// {
|
||||
// }
|
||||
|
||||
//
|
||||
// Detect Sinal Box ...
|
||||
hasSignalBox = DetectXCAEAConditions(
|
||||
boxes,
|
||||
conditions,
|
||||
pivotBox,
|
||||
signalBox,
|
||||
additionalSL,
|
||||
signalBoxDir,
|
||||
helper,
|
||||
zIndex,
|
||||
loopback //
|
||||
);
|
||||
|
||||
//
|
||||
// Make Pivot Box UnAvailable ...
|
||||
if (pivotBox.IsValid())
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
pivotBox,
|
||||
unAvailableBoxes //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
isBullish = hasSignalBox &&
|
||||
IsBullish(signalBoxDir);
|
||||
|
||||
//
|
||||
isBearish = hasSignalBox &&
|
||||
IsBearish(signalBoxDir);
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
// Do What we Want ...
|
||||
barTraker.Waits();
|
||||
|
||||
//
|
||||
// Draw Signal Box ...
|
||||
XCBoxObject *iObj;
|
||||
bool isCreated = helper.poiDrawer.DrawBox(
|
||||
signalBox,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
mObjects.Add(iObj);
|
||||
ZeroMemory(iObj);
|
||||
|
||||
//
|
||||
Print("Signal Box ...");
|
||||
}
|
||||
|
||||
//
|
||||
// Prepare Conditions ...
|
||||
mConditions.symbol = symbol;
|
||||
mConditions.period = period;
|
||||
|
||||
//
|
||||
double spread = GetSpread(symbol);
|
||||
|
||||
//
|
||||
double entry =
|
||||
isBullish
|
||||
? signalBox.upper
|
||||
: signalBox.lower;
|
||||
|
||||
//
|
||||
double sl =
|
||||
isBullish
|
||||
? signalBox.lower
|
||||
: signalBox.upper;
|
||||
if (additionalSL > 0)
|
||||
{
|
||||
//
|
||||
sl =
|
||||
isBullish
|
||||
? sl - additionalSL
|
||||
: sl + additionalSL;
|
||||
}
|
||||
|
||||
//
|
||||
double risk =
|
||||
isBullish
|
||||
? entry - sl
|
||||
: sl - entry;
|
||||
risk += spread;
|
||||
if (risk >= maxAllowedSLDistanceInPoint * points)
|
||||
{
|
||||
//
|
||||
// Fix Risk in Big Distances ...
|
||||
double hh5 = zBar.FindHighest(5, MODE_HIGH);
|
||||
double ll5 = zBar.FindLowest(5, MODE_LOW);
|
||||
|
||||
//
|
||||
double hhll5Delta = hh5 - ll5;
|
||||
double riskDelta = hhll5Delta / 2;
|
||||
risk = riskDelta;
|
||||
}
|
||||
|
||||
//
|
||||
double rewardTP = risk * tpReward;
|
||||
|
||||
//
|
||||
double tp =
|
||||
isBullish
|
||||
? entry + rewardTP
|
||||
: entry - rewardTP;
|
||||
|
||||
//
|
||||
// Filling ...
|
||||
mConditions.sl = sl;
|
||||
mConditions.tp = tp;
|
||||
mConditions.pivot =
|
||||
isBullish
|
||||
? sl
|
||||
: entry;
|
||||
mConditions.point =
|
||||
isBullish
|
||||
? entry
|
||||
: sl;
|
||||
mConditions.dir = signalBoxDir;
|
||||
mConditions.provider = "XCAEA";
|
||||
mConditions.signalBox = signalBox;
|
||||
mConditions.setupTime = zBar.time;
|
||||
mConditions.conditions = conditions;
|
||||
|
||||
//
|
||||
// Select RF Rewards ...
|
||||
if (continuesRFTillTarget)
|
||||
{
|
||||
//
|
||||
double rfReward = 1;
|
||||
while (rfReward < tpReward)
|
||||
{
|
||||
//
|
||||
double rewardRF = risk * rfReward;
|
||||
double rfTP =
|
||||
isBullish
|
||||
? entry + rewardRF
|
||||
: entry - rewardRF;
|
||||
|
||||
//
|
||||
Add(
|
||||
rfTP,
|
||||
mConditions.targets //
|
||||
);
|
||||
|
||||
//
|
||||
rfReward++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
double rfReward = 1;
|
||||
|
||||
//
|
||||
double rewardRF = risk * rfReward;
|
||||
double rfTP =
|
||||
isBullish
|
||||
? entry + rewardRF
|
||||
: entry - rewardRF;
|
||||
|
||||
//
|
||||
Add(
|
||||
rfTP,
|
||||
mConditions.targets //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Cleanup Resource ...
|
||||
|
||||
//
|
||||
Clean(boxes);
|
||||
Clean(bullishBoxes);
|
||||
Clean(bearishBoxes);
|
||||
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
pPBar.Clean();
|
||||
|
||||
//
|
||||
pivotBox.Clean();
|
||||
signalBox.Clean();
|
||||
conditions.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect Trigger Conditions for Specified Signal ...
|
||||
*
|
||||
* @param conditions: XCAEAStrategyConditions instance Reference, Specified Signal Conditions ...
|
||||
* @param maxAllowedSetupAge: specified Setup Age for Expiration (if bigger than Zero) ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool DetectSignalTrigger(
|
||||
XCAEAStrategyConditions &conditions,
|
||||
int maxAllowedSetupAge = 60 //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = conditions.IsSetuped();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
datetime setupTime = conditions.setupTime;
|
||||
ENUM_X_DIRECTION setupDir = conditions.dir;
|
||||
|
||||
//
|
||||
bool isBullish = IsBullish(setupDir);
|
||||
bool isBearish = IsBearish(setupDir);
|
||||
|
||||
//
|
||||
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);
|
||||
|
||||
//
|
||||
// Check Signal Validation ...
|
||||
// IMPORTANT: since all Validations done in SetUp Process ...
|
||||
// here we only Execute Signal ...
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
|
||||
//
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
conditions.triggerTime = cTime;
|
||||
conditions.type = isBullish
|
||||
? X_POSITION_TYPE_LONG
|
||||
: X_POSITION_TYPE_SHORT;
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect Guards bsed on Signalling Class ...
|
||||
*
|
||||
* @param guards: XCAEAGuard instance Collection, Holds Provided Guards ...
|
||||
* @param positions: XPosition instance Collection, Provides Signalling Based Positions for Apply Guards on them ...
|
||||
* @param provider: X121SMCStrategySignalProviderData instance Reference, Specified Data for Cycles ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool DetectGuards(
|
||||
XCAEAGuard &guards[],
|
||||
const XPosition &positions[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Conditions to Conditions Collection if not Exists ...
|
||||
*
|
||||
* @param maxAllowed: int, Specified Max Allowed Holding Conditions ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int AddConditionsIfNotExists(
|
||||
int maxAllowed = 10 //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
bool isSetuped = IsValid(mConditions.setupTime) &&
|
||||
HasDirection(mConditions.dir);
|
||||
if (!isSetuped)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int count = ArraySize(mConditionsCollection);
|
||||
if (IsValidSize(count))
|
||||
{
|
||||
//
|
||||
// Copy Original Items ...
|
||||
XCAEAStrategyConditions tmpItems[];
|
||||
Copy(
|
||||
mConditionsCollection,
|
||||
tmpItems //
|
||||
);
|
||||
|
||||
//
|
||||
// Prese Item Data ...
|
||||
bool isBullish = IsBullish(mConditions.dir);
|
||||
|
||||
//
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XCAEAStrategyConditions iItem = tmpItems[i];
|
||||
|
||||
//
|
||||
bool canRemove = mConditions.dir == iItem.dir &&
|
||||
mConditions.pivot == iItem.pivot;
|
||||
if (canRemove)
|
||||
{
|
||||
//
|
||||
ArrayRemove(
|
||||
mConditionsCollection,
|
||||
i,
|
||||
1 //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
Clean(tmpItems);
|
||||
}
|
||||
|
||||
//
|
||||
AddRef(
|
||||
mConditions,
|
||||
mConditionsCollection //
|
||||
);
|
||||
|
||||
//
|
||||
// Remove Olds ...
|
||||
CleanupArray(
|
||||
mConditionsCollection,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
result = ArraySize(mConditionsCollection);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
//
|
||||
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
//
|
||||
// Props ...
|
||||
string symbol;
|
||||
ENUM_TIMEFRAMES period;
|
||||
CArrayObj mObjects;
|
||||
CArrayObj mBarObjects;
|
||||
|
||||
/**
|
||||
* Initialize ...
|
||||
*/
|
||||
void Init()
|
||||
{
|
||||
//
|
||||
useGuards = false;
|
||||
continuesRFTillTarget = true;
|
||||
|
||||
//
|
||||
barTraker.Init(
|
||||
symbol,
|
||||
period //
|
||||
);
|
||||
|
||||
//
|
||||
inputs.Default();
|
||||
|
||||
//
|
||||
// Configure Indicators ...
|
||||
|
||||
//
|
||||
// XCC ...
|
||||
inputs.ccInputs.showCandles = true;
|
||||
|
||||
//
|
||||
// XCT ...
|
||||
inputs.ctInputs.showCandleTime = true;
|
||||
|
||||
//
|
||||
// XCA ...
|
||||
|
||||
//
|
||||
inputs.caInputs.supResSmoothingLength = 7;
|
||||
inputs.caInputs.supResSmoothingMode = X_MA_MODE_NONE;
|
||||
|
||||
//
|
||||
inputs.caInputs.showKI = true;
|
||||
inputs.caInputs.showTKI = false;
|
||||
inputs.caInputs.showSar = false;
|
||||
inputs.caInputs.showVidya = true;
|
||||
inputs.caInputs.showTrend = false;
|
||||
inputs.caInputs.showSwings = false;
|
||||
inputs.caInputs.showLongCycle = false;
|
||||
inputs.caInputs.showHindCycle = false;
|
||||
inputs.caInputs.showFiboLevel1 = false;
|
||||
inputs.caInputs.showFiboLevel2 = false;
|
||||
inputs.caInputs.showFiboLevel3 = false;
|
||||
inputs.caInputs.showShortCycle = false;
|
||||
inputs.caInputs.showMediumCycle = false;
|
||||
inputs.caInputs.showPeaksAndVales = true;
|
||||
inputs.caInputs.showPeakAndValeGolden = false;
|
||||
inputs.caInputs.showSupportAndResistance = false;
|
||||
|
||||
//
|
||||
// XOSCS ...
|
||||
// inputs.oscsInputs.rsiLength = 5;
|
||||
// inputs.oscsInputs.cciLength = 5;
|
||||
// inputs.oscsInputs.mfiLength = 5;
|
||||
// inputs.oscsInputs.rviLength = 5;
|
||||
|
||||
//
|
||||
// Oscillators Views ...
|
||||
inputs.showCCI = false;
|
||||
inputs.showRSI = false;
|
||||
inputs.showMFI = false;
|
||||
inputs.showRVI = false;
|
||||
inputs.showADX = false;
|
||||
inputs.showMACD = false;
|
||||
|
||||
//
|
||||
// XCAEA Helper ...
|
||||
helper = new XCXCAEAHelper();
|
||||
helper.Init(
|
||||
symbol,
|
||||
period,
|
||||
inputs //
|
||||
);
|
||||
|
||||
//
|
||||
// Initialize and Configure Detector ...
|
||||
detector = new XCXCAEAPOIDetector(helper);
|
||||
|
||||
//
|
||||
detector.detectSWHPivot = false;
|
||||
detector.detectSWLPivot = false;
|
||||
detector.detectPeakPivot = false;
|
||||
detector.detectValePivot = false;
|
||||
detector.detectRSIPeakPivot = true;
|
||||
detector.detectRSIValePivot = true;
|
||||
detector.detectCCIPeakPivot = true;
|
||||
detector.detectCCIValePivot = true;
|
||||
detector.detectKIBullishPivot = false;
|
||||
detector.detectKIBearishPivot = false;
|
||||
detector.detectFVGBullishPivot = true;
|
||||
detector.detectFVGBearishPivot = true;
|
||||
detector.detectPeakSWHResPivot = true;
|
||||
detector.detectValeSWLSupPivot = true;
|
||||
detector.detectTKIBullishPivot = false;
|
||||
detector.detectCycleSameLLPivot = false;
|
||||
detector.detectCycleSameHHPivot = false;
|
||||
detector.detectTKIBearishPivot = false;
|
||||
detector.detectTrendBullishPivot = false;
|
||||
detector.detectTrendBearishPivot = false;
|
||||
detector.detectTKITRNDBullishPivot = false;
|
||||
detector.detectTKITRNDBearishPivot = false;
|
||||
detector.detectRSICrossedOverOSPivot = false;
|
||||
detector.detectRSICrossedUnderOBPivot = false;
|
||||
detector.detectCCICrossedOverOSPivot = false;
|
||||
detector.detectCCICrossedUnderOBPivot = false;
|
||||
|
||||
//
|
||||
// Initialize and Configure Drawer ...
|
||||
drawer = new XCXCAEAPOIDrawer(detector);
|
||||
|
||||
//
|
||||
// UnActive Pivots ...
|
||||
drawer.drawSWHPivots = false;
|
||||
drawer.drawSWLPivots = false;
|
||||
drawer.drawPeakPivots = false;
|
||||
drawer.drawValePivots = false;
|
||||
drawer.drawRSIPeakPivots = true; // true;
|
||||
drawer.drawRSIValePivots = true; // true;
|
||||
drawer.drawCCIPeakPivots = false; // true;
|
||||
drawer.drawCCIValePivots = false; // true;
|
||||
drawer.drawKIBullishPivots = false;
|
||||
drawer.drawKIBearishPivots = false;
|
||||
drawer.drawFVGBullishPivots = false;
|
||||
drawer.drawFVGBearishPivots = false;
|
||||
drawer.drawPeakSWHResPivots = false; // true;
|
||||
drawer.drawValeSWLSupPivots = false; // true;
|
||||
drawer.drawTKIBullishPivots = false;
|
||||
drawer.drawTKIBearishPivots = false;
|
||||
drawer.drawPVFVGBullishPivots = false; // true;
|
||||
drawer.drawPVFVGBearishPivots = false; // true;
|
||||
drawer.drawCycleSameLLPivots = false;
|
||||
drawer.drawCycleSameHHPivots = false;
|
||||
drawer.drawTrendBullishPivots = false;
|
||||
drawer.drawTrendBearishPivots = false;
|
||||
drawer.drawTKITRNDBullishPivots = false;
|
||||
drawer.drawTKITRNDBearishPivots = false;
|
||||
drawer.drawRSICrossedOverOSPivots = false;
|
||||
drawer.drawRSICrossedUnderOBPivots = false;
|
||||
drawer.drawCCICrossedOverOSPivots = false;
|
||||
drawer.drawCCICrossedUnderOBPivots = false;
|
||||
|
||||
//
|
||||
drawer.drawTicks = false;
|
||||
|
||||
//
|
||||
// Configure Width ...
|
||||
drawer.peakPivotWidth = 1;
|
||||
drawer.valePivotWidth = 1;
|
||||
drawer.ticksBullishWidth = 2;
|
||||
drawer.ticksBearishWidth = 2;
|
||||
drawer.fvgBullishPivotWidth = 1;
|
||||
drawer.fvgBearishPivotWidth = 1;
|
||||
drawer.oscsBullishPivotWidth = 2;
|
||||
drawer.oscsBearishPivotWidth = 2;
|
||||
|
||||
//
|
||||
// Configure Colors ...
|
||||
drawer.peakPivotColor = clrMagenta;
|
||||
drawer.valePivotColor = clrAqua;
|
||||
drawer.ticksBullishColor = clrYellow;
|
||||
drawer.ticksBearishColor = clrOrange;
|
||||
drawer.fvgBullishPivotColor = clrLime;
|
||||
drawer.fvgBearishPivotColor = clrRed;
|
||||
drawer.oscsBullishPivotColor = clrAqua;
|
||||
drawer.oscsBearishPivotColor = clrMagenta;
|
||||
|
||||
//
|
||||
// Configure Style ...
|
||||
drawer.peakPivotStyle = STYLE_SOLID;
|
||||
drawer.valePivotStyle = STYLE_SOLID;
|
||||
drawer.ticksBullishStyle = STYLE_DOT;
|
||||
drawer.ticksBearishStyle = STYLE_DOT;
|
||||
drawer.fvgBullishPivotStyle = STYLE_DASH;
|
||||
drawer.fvgBearishPivotStyle = STYLE_DASH;
|
||||
drawer.oscsBullishPivotStyle = STYLE_SOLID;
|
||||
drawer.oscsBearishPivotStyle = STYLE_SOLID;
|
||||
}
|
||||
|
||||
/**
|
||||
* DeInitialize ...
|
||||
*/
|
||||
void DeInit()
|
||||
{
|
||||
//
|
||||
inputs.Clean();
|
||||
|
||||
//
|
||||
ZeroMemory(drawer);
|
||||
ZeroMemory(helper);
|
||||
ZeroMemory(detector);
|
||||
|
||||
//
|
||||
mConditions.Clean();
|
||||
Clean(mConditionsCollection);
|
||||
|
||||
//
|
||||
mObjects.Clear();
|
||||
mBarObjects.Clear();
|
||||
|
||||
//
|
||||
barTraker.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -463,6 +463,10 @@ struct X121XCAConditions
|
||||
bool isKISwitchedToBullish;
|
||||
bool isKISwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isKIFinishedFromBullish;
|
||||
bool isKIFinishedFromBearish;
|
||||
|
||||
//
|
||||
// TKI ...
|
||||
|
||||
@@ -478,6 +482,10 @@ struct X121XCAConditions
|
||||
bool isTKISwitchedToBullish;
|
||||
bool isTKISwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isTKIFinishedFromBullish;
|
||||
bool isTKIFinishedFromBearish;
|
||||
|
||||
//
|
||||
// VIDYA ...
|
||||
|
||||
@@ -493,6 +501,10 @@ struct X121XCAConditions
|
||||
bool isVidyaSwitchedToBullish;
|
||||
bool isVidyaSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isVidyaFinishedFromBullish;
|
||||
bool isVidyaFinishedFromBearish;
|
||||
|
||||
//
|
||||
// SAR ...
|
||||
|
||||
@@ -504,6 +516,10 @@ struct X121XCAConditions
|
||||
bool isSarSwitchedToBullish;
|
||||
bool isSarSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isSarFinishedFromBullish;
|
||||
bool isSarFinishedFromBearish;
|
||||
|
||||
//
|
||||
// PEAK ...
|
||||
|
||||
@@ -535,6 +551,10 @@ struct X121XCAConditions
|
||||
bool isTrendSwitchedToBullish;
|
||||
bool isTrendSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isTrendFinishedFromBullish;
|
||||
bool isTrendFinishedFromBearish;
|
||||
|
||||
//
|
||||
// SUPPORT ...
|
||||
|
||||
@@ -590,6 +610,14 @@ struct X121XCAConditions
|
||||
bool isPeakIsPivot;
|
||||
bool isValeIsPivot;
|
||||
|
||||
//
|
||||
bool isPeakSwitchedToPivot;
|
||||
bool isValeSwitchedToPivot;
|
||||
|
||||
//
|
||||
bool isPeakFinishedFromPivot;
|
||||
bool isValeFinishedFromPivot;
|
||||
|
||||
//
|
||||
bool isSwingLowSameAsVale;
|
||||
bool isSwingHighSameAsPeak;
|
||||
@@ -704,6 +732,10 @@ struct X121XCAConditions
|
||||
isKISwitchedToBullish = false;
|
||||
isKISwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isKIFinishedFromBullish = false;
|
||||
isKIFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// TKI ...
|
||||
|
||||
@@ -719,6 +751,10 @@ struct X121XCAConditions
|
||||
isTKISwitchedToBullish = false;
|
||||
isTKISwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isTKIFinishedFromBullish = false;
|
||||
isTKIFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// VIDYA ...
|
||||
|
||||
@@ -734,6 +770,10 @@ struct X121XCAConditions
|
||||
isVidyaSwitchedToBullish = false;
|
||||
isVidyaSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isVidyaFinishedFromBullish = false;
|
||||
isVidyaFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// SAR ...
|
||||
|
||||
@@ -745,6 +785,10 @@ struct X121XCAConditions
|
||||
isSarSwitchedToBullish = false;
|
||||
isSarSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isSarFinishedFromBullish = false;
|
||||
isSarFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// PEAK ...
|
||||
|
||||
@@ -776,6 +820,10 @@ struct X121XCAConditions
|
||||
isTrendSwitchedToBullish = false;
|
||||
isTrendSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isTrendFinishedFromBullish = false;
|
||||
isTrendFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// SUPPORT ...
|
||||
|
||||
@@ -831,6 +879,14 @@ struct X121XCAConditions
|
||||
isPeakIsPivot = false;
|
||||
isValeIsPivot = false;
|
||||
|
||||
//
|
||||
isPeakSwitchedToPivot = false;
|
||||
isValeSwitchedToPivot = false;
|
||||
|
||||
//
|
||||
isPeakFinishedFromPivot = false;
|
||||
isValeFinishedFromPivot = false;
|
||||
|
||||
//
|
||||
isSwingLowSameAsVale = false;
|
||||
isSwingHighSameAsPeak = false;
|
||||
@@ -1223,23 +1279,31 @@ struct X121XCAConditions
|
||||
ToString("isKIBullish", isKIBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isKIBearish", isKIBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isKISwitchedToBullish", isKISwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isKIFinishedFromBullish", isKIFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isKISwitchedToBearish", isKISwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isKIFinishedFromBearish", isKIFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIRejectUp", isTKIRejectUp, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIRejectDown", isTKIRejectDown, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIBullish", isTKIBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIBearish", isTKIBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKISwitchedToBullish", isTKISwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIFinishedFromBullish", isTKIFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKISwitchedToBearish", isTKISwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIFinishedFromBearish", isTKIFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaRejectUp", isVidyaRejectUp, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaRejectDown", isVidyaRejectDown, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaBullish", isVidyaBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaBearish", isVidyaBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaSwitchedToBullish", isVidyaSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaFinishedFromBullish", isVidyaFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaSwitchedToBearish", isVidyaSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaFinishedFromBearish", isVidyaFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarBullish", isSarBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarBearish", isSarBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarSwitchedToBullish", isSarSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarFinishedFromBullish", isSarFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarSwitchedToBearish", isSarSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarFinishedFromBearish", isSarFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakSameLast", isPeakSameLast, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakOverLast", isPeakOverLast, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakUnderLast", isPeakUnderLast, ignoreFalseConditions, separator) +
|
||||
@@ -1251,7 +1315,9 @@ struct X121XCAConditions
|
||||
ToString("isTrendBullish", isTrendBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendBearish", isTrendBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendSwitchedToBullish", isTrendSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendFinishedFromBullish", isTrendFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendSwitchedToBearish", isTrendSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendFinishedFromBearish", isTrendFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSupportSameLast", isSupportSameLast, ignoreFalseConditions, separator) +
|
||||
ToString("isSupportOverLast", isSupportOverLast, ignoreFalseConditions, separator) +
|
||||
ToString("isSupportUnderLast", isSupportUnderLast, ignoreFalseConditions, separator) +
|
||||
@@ -1274,6 +1340,10 @@ struct X121XCAConditions
|
||||
ToString("isLastSwingHighRejected", isLastSwingHighRejected, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakIsPivot", isPeakIsPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isValeIsPivot", isValeIsPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakSwitchedToPivot", isPeakSwitchedToPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakFinishedFromPivot", isPeakFinishedFromPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isValeSwitchedToPivot", isValeSwitchedToPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isValeFinishedFromPivot", isValeFinishedFromPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isSwingLowSameAsVale", isSwingLowSameAsVale, ignoreFalseConditions, separator) +
|
||||
ToString("isSwingHighSameAsPeak", isSwingHighSameAsPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isSupportSameAsVale", isSupportSameAsVale, ignoreFalseConditions, separator) +
|
||||
@@ -3322,8 +3392,14 @@ class XCX121XCAHelper : public XCBaseHelper
|
||||
//
|
||||
bool isKISwitchedToBullish = isKIBullish &&
|
||||
!isKIBullishPrev;
|
||||
bool isKIFinishedFromBullish = !isKIBullish &&
|
||||
isKIBullishPrev;
|
||||
|
||||
//
|
||||
bool isKISwitchedToBearish = isKIBearish &&
|
||||
!isKIBearishPrev;
|
||||
bool isKIFinishedFromBearish = !isKIBearish &&
|
||||
isKIBearishPrev;
|
||||
|
||||
//
|
||||
// TKI ...
|
||||
@@ -3363,8 +3439,14 @@ class XCX121XCAHelper : public XCBaseHelper
|
||||
//
|
||||
bool isTKISwitchedToBullish = isTKIBullish &&
|
||||
!isTKIBullishPrev;
|
||||
bool isTKIFinishedFromBullish = !isTKIBullish &&
|
||||
isTKIBullishPrev;
|
||||
|
||||
//
|
||||
bool isTKISwitchedToBearish = isTKIBearish &&
|
||||
!isTKIBearishPrev;
|
||||
bool isTKIFinishedFromBearish = !isTKIBearish &&
|
||||
isTKIBearishPrev;
|
||||
|
||||
//
|
||||
// VIDYA ...
|
||||
@@ -3404,8 +3486,14 @@ class XCX121XCAHelper : public XCBaseHelper
|
||||
//
|
||||
bool isVidyaSwitchedToBullish = isVidyaBullish &&
|
||||
!isVidyaBullishPrev;
|
||||
bool isVidyaFinishedFromBullish = !isVidyaBullish &&
|
||||
isVidyaBullishPrev;
|
||||
|
||||
//
|
||||
bool isVidyaSwitchedToBearish = isVidyaBearish &&
|
||||
!isVidyaBearishPrev;
|
||||
bool isVidyaFinishedFromBearish = !isVidyaBearish &&
|
||||
isVidyaBearishPrev;
|
||||
|
||||
//
|
||||
// SAR ...
|
||||
@@ -3425,8 +3513,14 @@ class XCX121XCAHelper : public XCBaseHelper
|
||||
//
|
||||
bool isSarSwitchedToBullish = isSarBullish &&
|
||||
!isSarBullishPrev;
|
||||
bool isSarFinishedFromBullish = !isSarBullish &&
|
||||
isSarBullishPrev;
|
||||
|
||||
//
|
||||
bool isSarSwitchedToBearish = isSarBearish &&
|
||||
!isSarBearishPrev;
|
||||
bool isSarFinishedFromBearish = !isSarBearish &&
|
||||
isSarBearishPrev;
|
||||
|
||||
//
|
||||
// PEAK ...
|
||||
@@ -3488,8 +3582,14 @@ class XCX121XCAHelper : public XCBaseHelper
|
||||
//
|
||||
bool isTrendSwitchedToBullish = isTrendBullish &&
|
||||
!isTrendBullishPrev;
|
||||
bool isTrendFinishedFromBullish = !isTrendBullish &&
|
||||
isTrendBullishPrev;
|
||||
|
||||
//
|
||||
bool isTrendSwitchedToBearish = isTrendBearish &&
|
||||
!isTrendBearishPrev;
|
||||
bool isTrendFinishedFromBearish = !isTrendBearish &&
|
||||
isTrendBearishPrev;
|
||||
|
||||
//
|
||||
// SUPPORT ...
|
||||
@@ -3592,25 +3692,58 @@ class XCX121XCAHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
bool isSwingLowSameAsVale = cSwingLow == cVale;
|
||||
bool isSwingLowSameAsValePrev = pSwingLow == pVale;
|
||||
|
||||
//
|
||||
bool isSwingHighSameAsPeak = cSwingHigh == cPeak;
|
||||
bool isSwingHighSameAsPeakPrev = pSwingHigh == pPeak;
|
||||
|
||||
//
|
||||
bool isSupportSameAsVale = cSupport == cVale;
|
||||
bool isSupportSameAsValePrev = pSupport == pVale;
|
||||
|
||||
//
|
||||
bool isResistanceSameAsPeak = cResistance == cPeak;
|
||||
bool isResistanceSameAsPeakPrev = pResistance == pPeak;
|
||||
|
||||
//
|
||||
bool isSupportSameAsSwingLow = cSupport == cSwingLow;
|
||||
bool isSupportSameAsSwingLowPrev = pSupport == pSwingLow;
|
||||
|
||||
//
|
||||
bool isResistanceSameAsSwingHigh = cResistance == cSwingHigh;
|
||||
bool isResistanceSameAsSwingHighPrev = pResistance == pSwingHigh;
|
||||
|
||||
//
|
||||
bool isPeakIsPivot = isSwingHighSameAsPeak &&
|
||||
isResistanceSameAsPeak &&
|
||||
isResistanceSameAsSwingHigh;
|
||||
bool isPeakIsPivotPrev = isSwingHighSameAsPeakPrev &&
|
||||
isResistanceSameAsPeakPrev &&
|
||||
isResistanceSameAsSwingHighPrev;
|
||||
|
||||
//
|
||||
bool isPeakSwitchedToPivot = isPeakIsPivot &&
|
||||
!isPeakIsPivotPrev;
|
||||
|
||||
//
|
||||
bool isPeakFinishedFromPivot = !isPeakIsPivot &&
|
||||
isPeakIsPivotPrev;
|
||||
|
||||
//
|
||||
bool isValeIsPivot = isSwingLowSameAsVale &&
|
||||
isSupportSameAsVale &&
|
||||
isSupportSameAsSwingLow;
|
||||
bool isValeIsPivotPrev = isSwingLowSameAsValePrev &&
|
||||
isSupportSameAsValePrev &&
|
||||
isSupportSameAsSwingLowPrev;
|
||||
|
||||
//
|
||||
bool isValeSwitchedToPivot = isValeIsPivot &&
|
||||
!isValeIsPivotPrev;
|
||||
bool isValeFinishedFromPivot = !isValeIsPivot &&
|
||||
isValeIsPivotPrev;
|
||||
//
|
||||
// Attached ...
|
||||
|
||||
//
|
||||
@@ -3658,6 +3791,8 @@ class XCX121XCAHelper : public XCBaseHelper
|
||||
conditions.isKISwitchedToBearish = isKISwitchedToBearish;
|
||||
conditions.isLastSwingLowBreaked = isLastSwingLowBreaked;
|
||||
conditions.isSwingHighSameAsPeak = isSwingHighSameAsPeak;
|
||||
conditions.isPeakSwitchedToPivot = isPeakSwitchedToPivot;
|
||||
conditions.isValeSwitchedToPivot = isValeSwitchedToPivot;
|
||||
conditions.isTKISwitchedToBullish = isTKISwitchedToBullish;
|
||||
conditions.isTKISwitchedToBearish = isTKISwitchedToBearish;
|
||||
conditions.isLastSwingLowRejected = isLastSwingLowRejected;
|
||||
@@ -3665,14 +3800,26 @@ class XCX121XCAHelper : public XCBaseHelper
|
||||
conditions.isSarSwitchedToBearish = isSarSwitchedToBearish;
|
||||
conditions.isLastSwingHighBreaked = isLastSwingHighBreaked;
|
||||
conditions.isResistanceSameAsPeak = isResistanceSameAsPeak;
|
||||
conditions.isPeakFinishedFromPivot = isPeakFinishedFromPivot;
|
||||
conditions.isValeFinishedFromPivot = isValeFinishedFromPivot;
|
||||
conditions.isLastSwingHighRejected = isLastSwingHighRejected;
|
||||
conditions.isLastResistanceBreaked = isLastResistanceBreaked;
|
||||
conditions.isSupportSameAsSwingLow = isSupportSameAsSwingLow;
|
||||
conditions.isKIFinishedFromBullish = isKIFinishedFromBullish;
|
||||
conditions.isKIFinishedFromBearish = isKIFinishedFromBearish;
|
||||
conditions.isTKIFinishedFromBullish = isTKIFinishedFromBullish;
|
||||
conditions.isTKIFinishedFromBearish = isTKIFinishedFromBearish;
|
||||
conditions.isSarFinishedFromBullish = isSarFinishedFromBullish;
|
||||
conditions.isSarFinishedFromBearish = isSarFinishedFromBearish;
|
||||
conditions.isVidyaSwitchedToBullish = isVidyaSwitchedToBullish;
|
||||
conditions.isVidyaSwitchedToBearish = isVidyaSwitchedToBearish;
|
||||
conditions.isLastResistanceRejected = isLastResistanceRejected;
|
||||
conditions.isTrendSwitchedToBullish = isTrendSwitchedToBullish;
|
||||
conditions.isTrendSwitchedToBearish = isTrendSwitchedToBearish;
|
||||
conditions.isVidyaFinishedFromBullish = isVidyaFinishedFromBullish;
|
||||
conditions.isVidyaFinishedFromBearish = isVidyaFinishedFromBearish;
|
||||
conditions.isTrendFinishedFromBullish = isTrendFinishedFromBullish;
|
||||
conditions.isTrendFinishedFromBearish = isTrendFinishedFromBearish;
|
||||
conditions.isResistanceSameAsSwingHigh = isResistanceSameAsSwingHigh;
|
||||
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -221,6 +221,10 @@ struct XCAEAConditions
|
||||
bool isKISwitchedToBullish;
|
||||
bool isKISwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isKIFinishedFromBullish;
|
||||
bool isKIFinishedFromBearish;
|
||||
|
||||
//
|
||||
// TKI ...
|
||||
|
||||
@@ -236,6 +240,10 @@ struct XCAEAConditions
|
||||
bool isTKISwitchedToBullish;
|
||||
bool isTKISwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isTKIFinishedFromBullish;
|
||||
bool isTKIFinishedFromBearish;
|
||||
|
||||
//
|
||||
// VIDYA ...
|
||||
|
||||
@@ -251,6 +259,10 @@ struct XCAEAConditions
|
||||
bool isVidyaSwitchedToBullish;
|
||||
bool isVidyaSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isVidyaFinishedFromBullish;
|
||||
bool isVidyaFinishedFromBearish;
|
||||
|
||||
//
|
||||
// SAR ...
|
||||
|
||||
@@ -262,6 +274,10 @@ struct XCAEAConditions
|
||||
bool isSarSwitchedToBullish;
|
||||
bool isSarSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isSarFinishedFromBullish;
|
||||
bool isSarFinishedFromBearish;
|
||||
|
||||
//
|
||||
// PEAK ...
|
||||
|
||||
@@ -293,6 +309,10 @@ struct XCAEAConditions
|
||||
bool isTrendSwitchedToBullish;
|
||||
bool isTrendSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isTrendFinishedFromBullish;
|
||||
bool isTrendFinishedFromBearish;
|
||||
|
||||
//
|
||||
// SUPPORT ...
|
||||
|
||||
@@ -348,6 +368,14 @@ struct XCAEAConditions
|
||||
bool isPeakIsPivot;
|
||||
bool isValeIsPivot;
|
||||
|
||||
//
|
||||
bool isPeakSwitchedToPivot;
|
||||
bool isValeSwitchedToPivot;
|
||||
|
||||
//
|
||||
bool isPeakFinishedFromPivot;
|
||||
bool isValeFinishedFromPivot;
|
||||
|
||||
//
|
||||
bool isSwingLowSameAsVale;
|
||||
bool isSwingHighSameAsPeak;
|
||||
@@ -408,7 +436,6 @@ struct XCAEAConditions
|
||||
double stochasticOSLevel;
|
||||
double stochasticReversalLevel;
|
||||
|
||||
|
||||
//
|
||||
// Conditions ...
|
||||
|
||||
@@ -730,6 +757,10 @@ struct XCAEAConditions
|
||||
isKISwitchedToBullish = false;
|
||||
isKISwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isKIFinishedFromBullish = false;
|
||||
isKIFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// TKI ...
|
||||
|
||||
@@ -745,6 +776,10 @@ struct XCAEAConditions
|
||||
isTKISwitchedToBullish = false;
|
||||
isTKISwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isTKIFinishedFromBullish = false;
|
||||
isTKIFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// VIDYA ...
|
||||
|
||||
@@ -760,6 +795,10 @@ struct XCAEAConditions
|
||||
isVidyaSwitchedToBullish = false;
|
||||
isVidyaSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isVidyaFinishedFromBullish = false;
|
||||
isVidyaFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// SAR ...
|
||||
|
||||
@@ -771,6 +810,10 @@ struct XCAEAConditions
|
||||
isSarSwitchedToBullish = false;
|
||||
isSarSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isSarFinishedFromBullish = false;
|
||||
isSarFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// PEAK ...
|
||||
|
||||
@@ -802,6 +845,10 @@ struct XCAEAConditions
|
||||
isTrendSwitchedToBullish = false;
|
||||
isTrendSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isTrendFinishedFromBullish = false;
|
||||
isTrendFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// SUPPORT ...
|
||||
|
||||
@@ -857,6 +904,14 @@ struct XCAEAConditions
|
||||
isPeakIsPivot = false;
|
||||
isValeIsPivot = false;
|
||||
|
||||
//
|
||||
isPeakSwitchedToPivot = false;
|
||||
isValeSwitchedToPivot = false;
|
||||
|
||||
//
|
||||
isPeakFinishedFromPivot = false;
|
||||
isValeFinishedFromPivot = false;
|
||||
|
||||
//
|
||||
isSwingLowSameAsVale = false;
|
||||
isSwingHighSameAsPeak = false;
|
||||
@@ -1875,7 +1930,6 @@ struct XCAEAConditions
|
||||
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XCA: " + separator +
|
||||
@@ -1885,23 +1939,31 @@ struct XCAEAConditions
|
||||
ToString("isKIBullish", isKIBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isKIBearish", isKIBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isKISwitchedToBullish", isKISwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isKIFinishedFromBullish", isKIFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isKISwitchedToBearish", isKISwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isKIFinishedFromBearish", isKIFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIRejectUp", isTKIRejectUp, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIRejectDown", isTKIRejectDown, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIBullish", isTKIBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIBearish", isTKIBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKISwitchedToBullish", isTKISwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIFinishedFromBullish", isTKIFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKISwitchedToBearish", isTKISwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTKIFinishedFromBearish", isTKIFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaRejectUp", isVidyaRejectUp, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaRejectDown", isVidyaRejectDown, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaBullish", isVidyaBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaBearish", isVidyaBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaSwitchedToBullish", isVidyaSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaFinishedFromBullish", isVidyaFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaSwitchedToBearish", isVidyaSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isVidyaFinishedFromBearish", isVidyaFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarBullish", isSarBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarBearish", isSarBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarSwitchedToBullish", isSarSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarFinishedFromBullish", isSarFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarSwitchedToBearish", isSarSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarFinishedFromBearish", isSarFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakSameLast", isPeakSameLast, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakOverLast", isPeakOverLast, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakUnderLast", isPeakUnderLast, ignoreFalseConditions, separator) +
|
||||
@@ -1913,7 +1975,9 @@ struct XCAEAConditions
|
||||
ToString("isTrendBullish", isTrendBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendBearish", isTrendBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendSwitchedToBullish", isTrendSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendFinishedFromBullish", isTrendFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendSwitchedToBearish", isTrendSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendFinishedFromBearish", isTrendFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSupportSameLast", isSupportSameLast, ignoreFalseConditions, separator) +
|
||||
ToString("isSupportOverLast", isSupportOverLast, ignoreFalseConditions, separator) +
|
||||
ToString("isSupportUnderLast", isSupportUnderLast, ignoreFalseConditions, separator) +
|
||||
@@ -1936,6 +2000,10 @@ struct XCAEAConditions
|
||||
ToString("isLastSwingHighRejected", isLastSwingHighRejected, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakIsPivot", isPeakIsPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isValeIsPivot", isValeIsPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakSwitchedToPivot", isPeakSwitchedToPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakFinishedFromPivot", isPeakFinishedFromPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isValeSwitchedToPivot", isValeSwitchedToPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isValeFinishedFromPivot", isValeFinishedFromPivot, ignoreFalseConditions, separator) +
|
||||
ToString("isSwingLowSameAsVale", isSwingLowSameAsVale, ignoreFalseConditions, separator) +
|
||||
ToString("isSwingHighSameAsPeak", isSwingHighSameAsPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isSupportSameAsVale", isSupportSameAsVale, ignoreFalseConditions, separator) +
|
||||
@@ -2899,6 +2967,8 @@ class XCXCAEAHelper : XCBase
|
||||
conditions.isKISwitchedToBearish = xcaConditions.isKISwitchedToBearish;
|
||||
conditions.isLastSwingLowBreaked = xcaConditions.isLastSwingLowBreaked;
|
||||
conditions.isSwingHighSameAsPeak = xcaConditions.isSwingHighSameAsPeak;
|
||||
conditions.isPeakSwitchedToPivot = xcaConditions.isPeakSwitchedToPivot;
|
||||
conditions.isValeSwitchedToPivot = xcaConditions.isValeSwitchedToPivot;
|
||||
conditions.isTKISwitchedToBullish = xcaConditions.isTKISwitchedToBullish;
|
||||
conditions.isTKISwitchedToBearish = xcaConditions.isTKISwitchedToBearish;
|
||||
conditions.isLastSwingLowRejected = xcaConditions.isLastSwingLowRejected;
|
||||
@@ -2906,14 +2976,26 @@ class XCXCAEAHelper : XCBase
|
||||
conditions.isSarSwitchedToBearish = xcaConditions.isSarSwitchedToBearish;
|
||||
conditions.isLastSwingHighBreaked = xcaConditions.isLastSwingHighBreaked;
|
||||
conditions.isResistanceSameAsPeak = xcaConditions.isResistanceSameAsPeak;
|
||||
conditions.isPeakFinishedFromPivot = xcaConditions.isPeakFinishedFromPivot;
|
||||
conditions.isValeFinishedFromPivot = xcaConditions.isValeFinishedFromPivot;
|
||||
conditions.isLastSwingHighRejected = xcaConditions.isLastSwingHighRejected;
|
||||
conditions.isLastResistanceBreaked = xcaConditions.isLastResistanceBreaked;
|
||||
conditions.isSupportSameAsSwingLow = xcaConditions.isSupportSameAsSwingLow;
|
||||
conditions.isKIFinishedFromBullish = xcaConditions.isKIFinishedFromBullish;
|
||||
conditions.isKIFinishedFromBearish = xcaConditions.isKIFinishedFromBearish;
|
||||
conditions.isTKIFinishedFromBullish = xcaConditions.isTKIFinishedFromBullish;
|
||||
conditions.isTKIFinishedFromBearish = xcaConditions.isTKIFinishedFromBearish;
|
||||
conditions.isSarFinishedFromBullish = xcaConditions.isSarFinishedFromBullish;
|
||||
conditions.isSarFinishedFromBearish = xcaConditions.isSarFinishedFromBearish;
|
||||
conditions.isVidyaSwitchedToBullish = xcaConditions.isVidyaSwitchedToBullish;
|
||||
conditions.isVidyaSwitchedToBearish = xcaConditions.isVidyaSwitchedToBearish;
|
||||
conditions.isLastResistanceRejected = xcaConditions.isLastResistanceRejected;
|
||||
conditions.isTrendSwitchedToBullish = xcaConditions.isTrendSwitchedToBullish;
|
||||
conditions.isTrendSwitchedToBearish = xcaConditions.isTrendSwitchedToBearish;
|
||||
conditions.isVidyaFinishedFromBullish = xcaConditions.isVidyaFinishedFromBullish;
|
||||
conditions.isVidyaFinishedFromBearish = xcaConditions.isVidyaFinishedFromBearish;
|
||||
conditions.isTrendFinishedFromBullish = xcaConditions.isTrendFinishedFromBullish;
|
||||
conditions.isTrendFinishedFromBearish = xcaConditions.isTrendFinishedFromBearish;
|
||||
conditions.isResistanceSameAsSwingHigh = xcaConditions.isResistanceSameAsSwingHigh;
|
||||
|
||||
//
|
||||
@@ -3040,11 +3122,11 @@ class XCXCAEAHelper : XCBase
|
||||
conditions.momentumBearishLevel = xocsConditions.momentumBearishLevel;
|
||||
conditions.stochasticOBLevel = xocsConditions.stochasticOBLevel;
|
||||
conditions.stochasticOSLevel = xocsConditions.stochasticOSLevel;
|
||||
conditions.stochasticReversalLevel = xocsConditions.stochasticReversalLevel;
|
||||
conditions.stochasticReversalLevel = xocsConditions.stochasticReversalLevel;
|
||||
|
||||
//
|
||||
// Conditions ...
|
||||
|
||||
|
||||
//
|
||||
conditions.isCCIOB = xocsConditions.isCCIOB;
|
||||
conditions.isCCIOS = xocsConditions.isCCIOS;
|
||||
@@ -3185,4 +3267,4 @@ class XCXCAEAHelper : XCBase
|
||||
int stochasticHandler;
|
||||
};
|
||||
|
||||
//
|
||||
//
|
||||
@@ -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();
|
||||
|
||||
//
|
||||
|
||||
@@ -182,6 +182,11 @@ class XCXCAEASignaller : XCBase
|
||||
detector.Update(
|
||||
zIndex //
|
||||
);
|
||||
|
||||
//
|
||||
if (detector.newValeSupSWLPivotDetected) {
|
||||
Print("Salam");
|
||||
}
|
||||
|
||||
//
|
||||
// Validate Pivots ...
|
||||
@@ -197,29 +202,29 @@ class XCXCAEASignaller : XCBase
|
||||
//
|
||||
// Retrieve Valid Boxes ...
|
||||
|
||||
//
|
||||
// Bullish ...
|
||||
int bullishBoxesCount =
|
||||
detector
|
||||
.FillBullishBoxes(bullishBoxes);
|
||||
// //
|
||||
// // Bullish ...
|
||||
// int bullishBoxesCount =
|
||||
// detector
|
||||
// .FillBullishBoxes(bullishBoxes);
|
||||
|
||||
//
|
||||
// Bearish ...
|
||||
int bearishBoxesCount =
|
||||
detector
|
||||
.FillBearishBoxes(bearishBoxes);
|
||||
// //
|
||||
// // Bearish ...
|
||||
// int bearishBoxesCount =
|
||||
// detector
|
||||
// .FillBearishBoxes(bearishBoxes);
|
||||
|
||||
//
|
||||
Copy(
|
||||
bullishBoxes,
|
||||
boxes,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishBoxes,
|
||||
boxes,
|
||||
false //
|
||||
);
|
||||
// //
|
||||
// Copy(
|
||||
// bullishBoxes,
|
||||
// boxes,
|
||||
// false //
|
||||
// );
|
||||
// Copy(
|
||||
// bearishBoxes,
|
||||
// boxes,
|
||||
// false //
|
||||
// );
|
||||
int boxesCount = ArraySize(boxes);
|
||||
bool hasBoxes = IsValidSize(boxesCount);
|
||||
|
||||
@@ -267,32 +272,33 @@ class XCXCAEASignaller : XCBase
|
||||
//
|
||||
|
||||
//
|
||||
if (hasBoxes)
|
||||
// if (hasBoxes)
|
||||
// {
|
||||
// }
|
||||
|
||||
//
|
||||
// Detect Sinal Box ...
|
||||
hasSignalBox = DetectXCAEAConditions(
|
||||
boxes,
|
||||
conditions,
|
||||
pivotBox,
|
||||
signalBox,
|
||||
additionalSL,
|
||||
signalBoxDir,
|
||||
helper,
|
||||
zIndex,
|
||||
loopback //
|
||||
);
|
||||
|
||||
//
|
||||
// Make Pivot Box UnAvailable ...
|
||||
if (pivotBox.IsValid())
|
||||
{
|
||||
//
|
||||
// Detect Sinal Box ...
|
||||
hasSignalBox = DetectXCAEAConditions(
|
||||
boxes,
|
||||
conditions,
|
||||
AddRef(
|
||||
pivotBox,
|
||||
signalBox,
|
||||
additionalSL,
|
||||
signalBoxDir,
|
||||
helper,
|
||||
zIndex,
|
||||
loopback //
|
||||
unAvailableBoxes //
|
||||
);
|
||||
|
||||
//
|
||||
// Make Pivot Box UnAvailable ...
|
||||
if (pivotBox.IsValid())
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
pivotBox,
|
||||
unAvailableBoxes //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -701,9 +707,10 @@ class XCXCAEASignaller : XCBase
|
||||
|
||||
//
|
||||
inputs.caInputs.showKI = true;
|
||||
inputs.caInputs.showTKI = true;
|
||||
inputs.caInputs.showSar = true;
|
||||
inputs.caInputs.showTrend = true;
|
||||
inputs.caInputs.showTKI = false;
|
||||
inputs.caInputs.showSar = false;
|
||||
inputs.caInputs.showVidya = true;
|
||||
inputs.caInputs.showTrend = false;
|
||||
inputs.caInputs.showSwings = false;
|
||||
inputs.caInputs.showLongCycle = false;
|
||||
inputs.caInputs.showHindCycle = false;
|
||||
@@ -746,103 +753,33 @@ class XCXCAEASignaller : XCBase
|
||||
detector = new XCXCAEAPOIDetector(helper);
|
||||
|
||||
//
|
||||
detector.detectSWHPivot = false;
|
||||
detector.detectSWLPivot = false;
|
||||
detector.detectPeakPivot = false;
|
||||
detector.detectValePivot = false;
|
||||
detector.detectRSIPeakPivot = true;
|
||||
detector.detectRSIValePivot = true;
|
||||
detector.detectCCIPeakPivot = true;
|
||||
detector.detectCCIValePivot = true;
|
||||
detector.detectKIBullishPivot = false;
|
||||
detector.detectKIBearishPivot = false;
|
||||
detector.detectFVGBullishPivot = true;
|
||||
detector.detectFVGBearishPivot = true;
|
||||
detector.detectPeakSWHResPivot = true;
|
||||
detector.detectValeSWLSupPivot = true;
|
||||
detector.detectTKIBullishPivot = false;
|
||||
detector.detectCycleSameLLPivot = false;
|
||||
detector.detectCycleSameHHPivot = false;
|
||||
detector.detectTKIBearishPivot = false;
|
||||
detector.detectTrendBullishPivot = true;
|
||||
detector.detectTrendBearishPivot = true;
|
||||
detector.detectTKITRNDBullishPivot = false;
|
||||
detector.detectTKITRNDBearishPivot = false;
|
||||
detector.detectRSICrossedOverOSPivot = false;
|
||||
detector.detectRSICrossedUnderOBPivot = false;
|
||||
detector.detectCCICrossedOverOSPivot = false;
|
||||
detector.detectCCICrossedUnderOBPivot = false;
|
||||
// Configure Detector ...
|
||||
detector.detectRSIPeakPivots = true;
|
||||
detector.detectRSIValePivots = true;
|
||||
detector.detectCCIPeakPivots = true;
|
||||
detector.detectCCIValePivots = true;
|
||||
detector.detectFVGBullishPivots = true;
|
||||
detector.detectFVGBearishPivots = true;
|
||||
detector.detectValeSupSWLPivots = true;
|
||||
detector.detectPeakResSWHPivots = true;
|
||||
|
||||
//
|
||||
// Initialize and Configure Drawer ...
|
||||
drawer = new XCXCAEAPOIDrawer(detector);
|
||||
|
||||
//
|
||||
// Configure Drawer ...
|
||||
drawer.drawRSIPeakPivots = true;
|
||||
drawer.drawRSIValePivots = true;
|
||||
drawer.drawCCIPeakPivots = true;
|
||||
drawer.drawCCIValePivots = true;
|
||||
drawer.drawFVGBullishPivots = true;
|
||||
drawer.drawFVGBearishPivots = true;
|
||||
drawer.drawValeSupSWLPivots = true;
|
||||
drawer.drawPeakResSWHPivots = true;
|
||||
|
||||
//
|
||||
// UnActive Pivots ...
|
||||
drawer.drawSWHPivots = false;
|
||||
drawer.drawSWLPivots = false;
|
||||
drawer.drawPeakPivots = false;
|
||||
drawer.drawValePivots = false;
|
||||
drawer.drawRSIPeakPivots = true; // true;
|
||||
drawer.drawRSIValePivots = true; // true;
|
||||
drawer.drawCCIPeakPivots = false; // true;
|
||||
drawer.drawCCIValePivots = false; // true;
|
||||
drawer.drawKIBullishPivots = false;
|
||||
drawer.drawKIBearishPivots = false;
|
||||
drawer.drawFVGBullishPivots = false;
|
||||
drawer.drawFVGBearishPivots = false;
|
||||
drawer.drawPeakSWHResPivots = false; // true;
|
||||
drawer.drawValeSWLSupPivots = false; // true;
|
||||
drawer.drawTKIBullishPivots = false;
|
||||
drawer.drawTKIBearishPivots = false;
|
||||
drawer.drawPVFVGBullishPivots = false; // true;
|
||||
drawer.drawPVFVGBearishPivots = false; // true;
|
||||
drawer.drawCycleSameLLPivots = false;
|
||||
drawer.drawCycleSameHHPivots = false;
|
||||
drawer.drawTrendBullishPivots = false;
|
||||
drawer.drawTrendBearishPivots = false;
|
||||
drawer.drawTKITRNDBullishPivots = false;
|
||||
drawer.drawTKITRNDBearishPivots = false;
|
||||
drawer.drawRSICrossedOverOSPivots = true;
|
||||
drawer.drawRSICrossedUnderOBPivots = true;
|
||||
drawer.drawCCICrossedOverOSPivots = false;
|
||||
drawer.drawCCICrossedUnderOBPivots = false;
|
||||
|
||||
//
|
||||
drawer.drawTicks = true;
|
||||
|
||||
//
|
||||
// Configure Width ...
|
||||
drawer.peakPivotWidth = 1;
|
||||
drawer.valePivotWidth = 1;
|
||||
drawer.ticksBullishWidth = 2;
|
||||
drawer.ticksBearishWidth = 2;
|
||||
drawer.fvgBullishPivotWidth = 1;
|
||||
drawer.fvgBearishPivotWidth = 1;
|
||||
drawer.oscsBullishPivotWidth = 2;
|
||||
drawer.oscsBearishPivotWidth = 2;
|
||||
|
||||
//
|
||||
// Configure Colors ...
|
||||
drawer.peakPivotColor = clrMagenta;
|
||||
drawer.valePivotColor = clrAqua;
|
||||
drawer.ticksBullishColor = clrYellow;
|
||||
drawer.ticksBearishColor = clrOrange;
|
||||
drawer.fvgBullishPivotColor = clrLime;
|
||||
drawer.fvgBearishPivotColor = clrRed;
|
||||
drawer.oscsBullishPivotColor = clrYellow;
|
||||
drawer.oscsBearishPivotColor = clrOrange;
|
||||
|
||||
//
|
||||
// Configure Style ...
|
||||
drawer.peakPivotStyle = STYLE_SOLID;
|
||||
drawer.valePivotStyle = STYLE_SOLID;
|
||||
drawer.ticksBullishStyle = STYLE_DOT;
|
||||
drawer.ticksBearishStyle = STYLE_DOT;
|
||||
drawer.fvgBullishPivotStyle = STYLE_DASH;
|
||||
drawer.fvgBearishPivotStyle = STYLE_DASH;
|
||||
drawer.oscsBullishPivotStyle = STYLE_SOLID;
|
||||
drawer.oscsBearishPivotStyle = STYLE_SOLID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user