last ...
This commit is contained in:
+414
-321
@@ -167,22 +167,11 @@ input bool eaSaveLosts = false; // Save Lost Conditions
|
||||
//
|
||||
XCAlert *eaAlert;
|
||||
XCTrade *eaTrade;
|
||||
XSignal eaSignal;
|
||||
string eaTag = "";
|
||||
XCVolume *eaVolume;
|
||||
XTriggerBlock eaTB;
|
||||
CArrayObj *eaObjects;
|
||||
XCPOIDrawer *eaDrawer;
|
||||
XBarTracker eaBarTraker;
|
||||
X121XCatbInputs eaInputs;
|
||||
XTimeTracker eaTimeTracker;
|
||||
XCX121XCatbHelper *eaHelper;
|
||||
XCBarAnalyser *eaBarAnalyser;
|
||||
XTriggerBlockFilters eaFilters;
|
||||
X121XCatbConditions eaCatbConditions;
|
||||
XCXCATBEASignaller *eaSignallers[];
|
||||
XCXCATBEATradeManager *eaTradeManager;
|
||||
XCATBEAStrategyConditions eaConditions;
|
||||
XTriggerBlockValidationRules eaValidations;
|
||||
|
||||
//
|
||||
// Event Handlers ...
|
||||
@@ -230,13 +219,6 @@ void OnDeinit(const int reason)
|
||||
// REASON_INITFAILED 8 The OnInit() handler returned a non-zero value
|
||||
// REASON_CLOSE 9 Terminal closed
|
||||
|
||||
//
|
||||
// eaObjects.Clear();
|
||||
|
||||
//
|
||||
delete eaHelper;
|
||||
ZeroMemory(eaHelper);
|
||||
|
||||
//
|
||||
delete eaAlert;
|
||||
ZeroMemory(eaAlert);
|
||||
@@ -245,29 +227,12 @@ void OnDeinit(const int reason)
|
||||
delete eaTrade;
|
||||
ZeroMemory(eaTrade);
|
||||
|
||||
//
|
||||
delete eaDrawer;
|
||||
ZeroMemory(eaDrawer);
|
||||
|
||||
//
|
||||
delete eaVolume;
|
||||
ZeroMemory(eaVolume);
|
||||
|
||||
//
|
||||
delete eaBarAnalyser;
|
||||
ZeroMemory(eaBarAnalyser);
|
||||
|
||||
//
|
||||
eaTB.Clean();
|
||||
eaSignal.Clean();
|
||||
eaSignal.Clean();
|
||||
eaFilters.Clean();
|
||||
eaBarTraker.Clean();
|
||||
eaConditions.Clean();
|
||||
eaConditions.Clean();
|
||||
eaTimeTracker.Clean();
|
||||
eaValidations.Clean();
|
||||
eaCatbConditions.Clean();
|
||||
|
||||
//
|
||||
DestroyTimer();
|
||||
@@ -278,236 +243,345 @@ void OnDeinit(const int reason)
|
||||
void OnTick()
|
||||
{
|
||||
//
|
||||
// Handle Tradings ...
|
||||
bool tradeUsingTriggerBlock = true;
|
||||
bool tradeUsingMarketConditions1 = true;
|
||||
|
||||
//
|
||||
// Time Report Handling ...
|
||||
HandleTimeReport();
|
||||
|
||||
//
|
||||
// Handle Position Management / Protections ...
|
||||
// Position Management / Protections Handling ...
|
||||
eaTradeManager.Manage();
|
||||
|
||||
//
|
||||
eaTB.Clean();
|
||||
eaSignal.Clean();
|
||||
eaConditions.Clean();
|
||||
eaCatbConditions.Clean();
|
||||
|
||||
//
|
||||
bool has = false;
|
||||
int barIndex = 0;
|
||||
int cBarIndex = 0;
|
||||
|
||||
//
|
||||
// Check Bar Processing ...
|
||||
if (!eaBarTraker.CanProcessBar())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
eaHelper.Check(barIndex);
|
||||
|
||||
//
|
||||
// Reading Required Bars ...
|
||||
XOHCL zBar;
|
||||
XOHCL cBar;
|
||||
has = zBar.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
barIndex //
|
||||
);
|
||||
has =
|
||||
has &&
|
||||
zBar.GetPreviousBar(cBar);
|
||||
// Count Signallers ...
|
||||
bool has = HasChild(eaSignallers);
|
||||
if (!has)
|
||||
{
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
|
||||
//
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
cBarIndex = barIndex + 1;
|
||||
XGuard guards[];
|
||||
XCATBEAStrategyConditions conditions[];
|
||||
|
||||
//
|
||||
// Update All Required Buffers ...
|
||||
eaHelper.Update(cBarIndex);
|
||||
|
||||
//
|
||||
// Check Trigger Block Detected or Not ...
|
||||
if (tradeUsingTriggerBlock)
|
||||
int count = ArraySize(eaSignallers);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
// Trigger Block Detection ...
|
||||
has = DetectTriggerBlock1(
|
||||
eaHelper,
|
||||
eaBarAnalyser,
|
||||
eaTB,
|
||||
eaCatbConditions,
|
||||
eaValidations,
|
||||
eaFilters,
|
||||
barIndex,
|
||||
10 // Loopback ...
|
||||
// Retrieve indexed Signaller ...
|
||||
XCXCATBEASignaller *iSignaller = eaSignallers[i];
|
||||
|
||||
//
|
||||
string iSymbol = iSignaller.GetSymbol();
|
||||
string iProvider = iSignaller.GetProvider();
|
||||
ENUM_TIMEFRAMES iPeriod = iSignaller.GetPeriod();
|
||||
|
||||
//
|
||||
// Now we Have to Check Handle Tick Resoult ...
|
||||
|
||||
//
|
||||
// Requirements ...
|
||||
XGuard iGuards[]; // Hold Provided Guards ...
|
||||
XPosition iPositions[]; // Retrieve Signaller Positions ...
|
||||
XCATBEAStrategyConditions iConditions; // Recieve Triggered Conditions ...
|
||||
|
||||
//
|
||||
// Reading Signaller Positions ...
|
||||
eaTradeManager.GetPositions(
|
||||
iPositions,
|
||||
iSymbol,
|
||||
iProvider,
|
||||
iPeriod //
|
||||
);
|
||||
|
||||
//
|
||||
// Processing Tick for Signaller ...
|
||||
iSignaller.ProcessTick(
|
||||
iPositions,
|
||||
iGuards,
|
||||
iConditions //
|
||||
);
|
||||
|
||||
//
|
||||
// Check Results ...
|
||||
has = HasChild(iGuards);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Wait for Next Bar for anything ...
|
||||
eaBarTraker.Waits();
|
||||
|
||||
//
|
||||
// Prepare Target ...
|
||||
double targets[];
|
||||
for (int i = 1; i <= eaSignalR2R; i++)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
(double)i,
|
||||
targets //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Calculate SL Additions ...
|
||||
double iATR = 0;
|
||||
if (barIndex > 0 &&
|
||||
barIndex < ArraySize(eaHelper.atrBuffer))
|
||||
{
|
||||
iATR = eaHelper.atrBuffer[barIndex];
|
||||
}
|
||||
double slAdditional = eaSLAtrMultiplier * iATR;
|
||||
|
||||
//
|
||||
// Preparing Signal ...
|
||||
has = ToSignal(
|
||||
eaTB.trigger,
|
||||
eaTB.signal,
|
||||
targets,
|
||||
slAdditional //
|
||||
);
|
||||
|
||||
//
|
||||
// Draw Trigger Block ...
|
||||
DrawTriggerBlock(
|
||||
eaTB,
|
||||
eaDrawer,
|
||||
eaObjects,
|
||||
NULL //
|
||||
);
|
||||
|
||||
//
|
||||
// Attach Signal ...
|
||||
eaSignal = eaTB.signal;
|
||||
|
||||
//
|
||||
// Check Signal Type ...
|
||||
bool isLong = IsLong(eaSignal.type);
|
||||
|
||||
//
|
||||
// Update Entry ...
|
||||
eaSignal.entry = GetEntry(
|
||||
eaSignal.symbol,
|
||||
eaSignal.type //
|
||||
);
|
||||
|
||||
//
|
||||
// Update Signal Targets ...
|
||||
UpdateSignalTargets(eaSignal);
|
||||
|
||||
//
|
||||
// Handle Volume Management ...
|
||||
double iVolume = eaVolume.CalculateVolume(eaSignal);
|
||||
if (iVolume > X_MIN_VOLUME &&
|
||||
iVolume != eaSignal.volume)
|
||||
{
|
||||
eaSignal.volume = iVolume;
|
||||
}
|
||||
|
||||
//
|
||||
eaConditions.sl = eaSignal.sl;
|
||||
eaConditions.tp = eaSignal.tp;
|
||||
eaConditions.pivot = eaSignal.sl;
|
||||
eaConditions.time = eaSignal.time;
|
||||
eaConditions.reward = eaSignalR2R;
|
||||
eaConditions.point = eaSignal.entry;
|
||||
eaConditions.entry = eaSignal.entry;
|
||||
eaConditions.symbol = eaSignal.symbol;
|
||||
eaConditions.period = eaSignal.period;
|
||||
eaConditions.setupTime = eaSignal.time;
|
||||
eaConditions.triggerTime = eaSignal.time;
|
||||
eaConditions.decisionZone = eaTB.trigger;
|
||||
eaConditions.provider = eaSignal.provider;
|
||||
eaConditions.conditions = eaCatbConditions;
|
||||
eaConditions.type = ToPositionType(eaSignal.type);
|
||||
eaConditions.dir =
|
||||
isLong
|
||||
? X_DIRECTION_BULLISH
|
||||
: X_DIRECTION_BEARISH;
|
||||
Copy(
|
||||
eaSignal.targets,
|
||||
eaConditions.targets //
|
||||
);
|
||||
eaSignal.conditions =
|
||||
eaCatbConditions
|
||||
.GenerateSummary(
|
||||
false, // Commons ...
|
||||
true, // Conditions ...
|
||||
true, // Scores ...
|
||||
false // Ignore Falses ...
|
||||
);
|
||||
|
||||
//
|
||||
// Execute Signal ...
|
||||
has = eaTradeManager.Execute(
|
||||
eaSignal,
|
||||
eaConditions //
|
||||
iGuards,
|
||||
guards,
|
||||
false // Force Clean ...
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
eaTB.Clean();
|
||||
// Check Triggered Conditions ...
|
||||
has = iConditions.IsValid() &&
|
||||
iConditions.IsSetuped() &&
|
||||
iConditions.CanTrigger();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
iConditions,
|
||||
conditions //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
Clean(iGuards);
|
||||
Clean(iPositions);
|
||||
iConditions.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
// Trade Using Market Conditions ...
|
||||
if (tradeUsingMarketConditions1)
|
||||
// Do Actions Based on Provided Info ...
|
||||
|
||||
//
|
||||
// Guards ...
|
||||
has = HasChild(guards);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
XBoxZone signalZone;
|
||||
X121XCatbConditions conditions;
|
||||
has = DetectSignalZone(
|
||||
eaDrawer,
|
||||
eaHelper,
|
||||
eaBarAnalyser,
|
||||
signalZone,
|
||||
conditions,
|
||||
barIndex //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Convert Box to Signal ...
|
||||
}
|
||||
// Handle Guards Firing ...
|
||||
}
|
||||
|
||||
//
|
||||
// Triggers ...
|
||||
has = HasChild(conditions);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Handle Conditions Triggering ...
|
||||
}
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
eaTB.Clean();
|
||||
eaSignal.Clean();
|
||||
eaConditions.Clean();
|
||||
eaCatbConditions.Clean();
|
||||
Clean(guards);
|
||||
Clean(conditions);
|
||||
|
||||
// //
|
||||
// eaTB.Clean();
|
||||
// eaSignal.Clean();
|
||||
// eaConditions.Clean();
|
||||
// eaCatbConditions.Clean();
|
||||
|
||||
// //
|
||||
// bool has = false;
|
||||
// int barIndex = 0;
|
||||
// int cBarIndex = 0;
|
||||
|
||||
// //
|
||||
// // Check Bar Processing ...
|
||||
// if (!eaBarTraker.CanProcessBar())
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// //
|
||||
// eaHelper.Check(barIndex);
|
||||
|
||||
// //
|
||||
// // Reading Required Bars ...
|
||||
// XOHCL zBar;
|
||||
// XOHCL cBar;
|
||||
// has = zBar.Init(
|
||||
// _Symbol,
|
||||
// _Period,
|
||||
// barIndex //
|
||||
// );
|
||||
// has =
|
||||
// has &&
|
||||
// zBar.GetPreviousBar(cBar);
|
||||
// if (!has)
|
||||
// {
|
||||
// //
|
||||
// zBar.Clean();
|
||||
// cBar.Clean();
|
||||
|
||||
// //
|
||||
// return;
|
||||
// }
|
||||
|
||||
// //
|
||||
// cBarIndex = barIndex + 1;
|
||||
|
||||
// //
|
||||
// // Update All Required Buffers ...
|
||||
// eaHelper.Update(cBarIndex);
|
||||
|
||||
// //
|
||||
// // Check Trigger Block Detected or Not ...
|
||||
// if (tradeUsingTriggerBlock)
|
||||
// {
|
||||
// //
|
||||
// // Trigger Block Detection ...
|
||||
// has = DetectTriggerBlock1(
|
||||
// eaHelper,
|
||||
// eaBarAnalyser,
|
||||
// eaTB,
|
||||
// eaCatbConditions,
|
||||
// eaValidations,
|
||||
// eaFilters,
|
||||
// barIndex,
|
||||
// 10 // Loopback ...
|
||||
// );
|
||||
|
||||
// //
|
||||
// if (has)
|
||||
// {
|
||||
// //
|
||||
// // Wait for Next Bar for anything ...
|
||||
// eaBarTraker.Waits();
|
||||
|
||||
// //
|
||||
// // Prepare Target ...
|
||||
// double targets[];
|
||||
// for (int i = 1; i <= eaSignalR2R; i++)
|
||||
// {
|
||||
// //
|
||||
// Add(
|
||||
// (double)i,
|
||||
// targets //
|
||||
// );
|
||||
// }
|
||||
|
||||
// //
|
||||
// // Calculate SL Additions ...
|
||||
// double iATR = 0;
|
||||
// if (barIndex > 0 &&
|
||||
// barIndex < ArraySize(eaHelper.atrBuffer))
|
||||
// {
|
||||
// iATR = eaHelper.atrBuffer[barIndex];
|
||||
// }
|
||||
// double slAdditional = eaSLAtrMultiplier * iATR;
|
||||
|
||||
// //
|
||||
// // Preparing Signal ...
|
||||
// has = ToSignal(
|
||||
// eaTB.trigger,
|
||||
// eaTB.signal,
|
||||
// targets,
|
||||
// slAdditional //
|
||||
// );
|
||||
|
||||
// //
|
||||
// // Draw Trigger Block ...
|
||||
// DrawTriggerBlock(
|
||||
// eaTB,
|
||||
// eaDrawer,
|
||||
// eaObjects,
|
||||
// NULL //
|
||||
// );
|
||||
|
||||
// //
|
||||
// // Attach Signal ...
|
||||
// eaSignal = eaTB.signal;
|
||||
|
||||
// //
|
||||
// // Check Signal Type ...
|
||||
// bool isLong = IsLong(eaSignal.type);
|
||||
|
||||
// //
|
||||
// // Update Entry ...
|
||||
// eaSignal.entry = GetEntry(
|
||||
// eaSignal.symbol,
|
||||
// eaSignal.type //
|
||||
// );
|
||||
|
||||
// //
|
||||
// // Update Signal Targets ...
|
||||
// UpdateSignalTargets(eaSignal);
|
||||
|
||||
// //
|
||||
// // Handle Volume Management ...
|
||||
// double iVolume = eaVolume.CalculateVolume(eaSignal);
|
||||
// if (iVolume > X_MIN_VOLUME &&
|
||||
// iVolume != eaSignal.volume)
|
||||
// {
|
||||
// eaSignal.volume = iVolume;
|
||||
// }
|
||||
|
||||
// //
|
||||
// eaConditions.sl = eaSignal.sl;
|
||||
// eaConditions.tp = eaSignal.tp;
|
||||
// eaConditions.pivot = eaSignal.sl;
|
||||
// eaConditions.time = eaSignal.time;
|
||||
// eaConditions.reward = eaSignalR2R;
|
||||
// eaConditions.point = eaSignal.entry;
|
||||
// eaConditions.entry = eaSignal.entry;
|
||||
// eaConditions.symbol = eaSignal.symbol;
|
||||
// eaConditions.period = eaSignal.period;
|
||||
// eaConditions.setupTime = eaSignal.time;
|
||||
// eaConditions.triggerTime = eaSignal.time;
|
||||
// eaConditions.decisionZone = eaTB.trigger;
|
||||
// eaConditions.provider = eaSignal.provider;
|
||||
// eaConditions.conditions = eaCatbConditions;
|
||||
// eaConditions.type = ToPositionType(eaSignal.type);
|
||||
// eaConditions.dir =
|
||||
// isLong
|
||||
// ? X_DIRECTION_BULLISH
|
||||
// : X_DIRECTION_BEARISH;
|
||||
// Copy(
|
||||
// eaSignal.targets,
|
||||
// eaConditions.targets //
|
||||
// );
|
||||
// eaSignal.conditions =
|
||||
// eaCatbConditions
|
||||
// .GenerateSummary(
|
||||
// false, // Commons ...
|
||||
// true, // Conditions ...
|
||||
// true, // Scores ...
|
||||
// false // Ignore Falses ...
|
||||
// );
|
||||
|
||||
// //
|
||||
// // Execute Signal ...
|
||||
// has = eaTradeManager.Execute(
|
||||
// eaSignal,
|
||||
// eaConditions //
|
||||
// );
|
||||
// }
|
||||
|
||||
// //
|
||||
// eaTB.Clean();
|
||||
// }
|
||||
|
||||
// //
|
||||
// // Trade Using Market Conditions ...
|
||||
// if (tradeUsingMarketConditions1)
|
||||
// {
|
||||
// //
|
||||
// XBoxZone signalZone;
|
||||
// X121XCatbConditions conditions;
|
||||
// has = DetectSignalZone(
|
||||
// eaDrawer,
|
||||
// eaHelper,
|
||||
// eaBarAnalyser,
|
||||
// signalZone,
|
||||
// conditions,
|
||||
// barIndex //
|
||||
// );
|
||||
// if (has)
|
||||
// {
|
||||
// //
|
||||
// // Convert Box to Signal ...
|
||||
// }
|
||||
// }
|
||||
|
||||
// //
|
||||
// // Cleanup Resources ...
|
||||
|
||||
// //
|
||||
// zBar.Clean();
|
||||
// cBar.Clean();
|
||||
// eaTB.Clean();
|
||||
// eaSignal.Clean();
|
||||
// eaConditions.Clean();
|
||||
// eaCatbConditions.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -735,13 +809,6 @@ bool InitVolume()
|
||||
*/
|
||||
void InitRequirements()
|
||||
{
|
||||
//
|
||||
// Initial Bar Tracker ...
|
||||
eaBarTraker.Init(
|
||||
_Symbol,
|
||||
_Period //
|
||||
);
|
||||
|
||||
//
|
||||
// Preparing Tags ...
|
||||
eaTag =
|
||||
@@ -759,40 +826,6 @@ void InitRequirements()
|
||||
eaAlert.SetEnableAlerts(eaEnableAlerts);
|
||||
eaAlert.SetTerminalAlerts(eaTerminalAlerts);
|
||||
|
||||
//
|
||||
// Objects ...
|
||||
eaObjects = new CArrayObj();
|
||||
|
||||
//
|
||||
// Configure XCA ...
|
||||
eaInputs.Default();
|
||||
|
||||
//
|
||||
// Hide all Visible Buffers ...
|
||||
eaInputs.Hide();
|
||||
|
||||
//
|
||||
// we Can make Show all requirements here ...
|
||||
|
||||
//
|
||||
eaInputs.showPV = true;
|
||||
eaInputs.showSar = true;
|
||||
eaInputs.showTrend = true;
|
||||
eaInputs.showATRBand = true;
|
||||
eaInputs.showPVGolden = true;
|
||||
|
||||
//
|
||||
eaHelper = new XCX121XCatbHelper();
|
||||
bool isInited = eaHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
eaInputs //
|
||||
);
|
||||
|
||||
//
|
||||
eaDrawer = new XCPOIDrawer();
|
||||
eaBarAnalyser = new XCBarAnalyser();
|
||||
|
||||
//
|
||||
// EA Trade ...
|
||||
eaTrade = new XCTrade(
|
||||
@@ -881,7 +914,7 @@ void InitRequirements()
|
||||
//
|
||||
// Ignore unused Cases and Extracts only Content ...
|
||||
string iSessionDescriptorStr = ExtractString(sessions[i]);
|
||||
isInited = IsValid(iSessionDescriptorStr);
|
||||
bool isInited = IsValid(iSessionDescriptorStr);
|
||||
if (isInited)
|
||||
{
|
||||
//
|
||||
@@ -921,65 +954,125 @@ void InitRequirements()
|
||||
}
|
||||
|
||||
//
|
||||
// Fill Validations ...
|
||||
eaValidations.forceHasSwing = eaForceHasSwing;
|
||||
eaValidations.forceOBBarType = eaForceOBBarType;
|
||||
eaValidations.minRequiredOBBar = eaMinRequiredOBBar;
|
||||
eaValidations.forceFVGBarType = eaForceFVGBarType;
|
||||
eaValidations.liquidityLoopback = eaLiquidityLoopback;
|
||||
eaValidations.maxAllowedRange = eaMaxAllowedRange;
|
||||
eaValidations.minAllowedRange = eaMinAllowedRange;
|
||||
eaValidations.forceHasFLiquidity = eaForceHasFLiquidity;
|
||||
eaValidations.forceHasRLiquidity = eaForceHasRLiquidity;
|
||||
eaValidations.validateGapSequence = eaValidateGapSequence;
|
||||
eaValidations.minAllowedBlockLength = eaMinAllowedBlockLength;
|
||||
eaValidations.validateBlockEdgeBreakout = eaValidateBlockEdgeBreakout;
|
||||
// Initializing Signaller(s) ...
|
||||
string symbols[];
|
||||
Add(
|
||||
_Symbol,
|
||||
symbols //
|
||||
);
|
||||
bool hasSymbols = HasChild(symbols);
|
||||
if (hasSymbols)
|
||||
{
|
||||
//
|
||||
// Prepare Signaller Inputs ...
|
||||
XCATBEASignallerInputs iSignallerInputs;
|
||||
|
||||
//
|
||||
// Fill Filters ...
|
||||
//
|
||||
// Common Configs ...
|
||||
|
||||
//
|
||||
eaFilters.filterBasedOnPV = eaFilterBasedOnPV;
|
||||
eaFilters.bosLoopback = eaBosLoopback;
|
||||
//
|
||||
// Provider Name ...
|
||||
iSignallerInputs.period = _Period;
|
||||
iSignallerInputs.provider = "XTRGB";
|
||||
|
||||
//
|
||||
eaFilters.filterBasedOnSar = eaFilterBasedOnSar;
|
||||
eaFilters.forceSarSwitched = eaForceSarSwitched;
|
||||
eaFilters.forceSarOnBothSide = eaForceSarOnBothSide;
|
||||
eaFilters.forceSarHasBreakout = eaForceSarHasBreakout;
|
||||
eaFilters.forceSarHasReversalSide = eaForceSarHasReversalSide;
|
||||
//
|
||||
// CATB Indicator ...
|
||||
iSignallerInputs.catbInputs.Default();
|
||||
iSignallerInputs.catbInputs.Hide();
|
||||
|
||||
//
|
||||
eaFilters.filterBasedOnRSI = eaFilterBasedOnRSI;
|
||||
eaFilters.forceHasRSITrending = eaForceHasRSITrending;
|
||||
eaFilters.forceHasRSIVPattern = eaForceHasRSIVPattern;
|
||||
eaFilters.forceHasRSICrossing = eaForceHasRSICrossing;
|
||||
//
|
||||
// Trigger Block Validations ...
|
||||
iSignallerInputs.validations.forceHasSwing = eaForceHasSwing;
|
||||
iSignallerInputs.validations.forceOBBarType = eaForceOBBarType;
|
||||
iSignallerInputs.validations.minRequiredOBBar = eaMinRequiredOBBar;
|
||||
iSignallerInputs.validations.forceFVGBarType = eaForceFVGBarType;
|
||||
iSignallerInputs.validations.liquidityLoopback = eaLiquidityLoopback;
|
||||
iSignallerInputs.validations.maxAllowedRange = eaMaxAllowedRange;
|
||||
iSignallerInputs.validations.minAllowedRange = eaMinAllowedRange;
|
||||
iSignallerInputs.validations.forceHasFLiquidity = eaForceHasFLiquidity;
|
||||
iSignallerInputs.validations.forceHasRLiquidity = eaForceHasRLiquidity;
|
||||
iSignallerInputs.validations.validateGapSequence = eaValidateGapSequence;
|
||||
iSignallerInputs.validations.minAllowedBlockLength = eaMinAllowedBlockLength;
|
||||
iSignallerInputs.validations.validateBlockEdgeBreakout = eaValidateBlockEdgeBreakout;
|
||||
|
||||
//
|
||||
eaFilters.filterBasedOnADX = eaFilterBasedOnADX;
|
||||
eaFilters.forceHasADXTrending = eaForceHasADXTrending;
|
||||
eaFilters.forceHasADXCrossing = eaForceHasADXCrossing;
|
||||
//
|
||||
// Trigger Block Filters ...
|
||||
|
||||
//
|
||||
eaFilters.filterBasedOnATR = eaFilterBasedOnATR;
|
||||
eaFilters.forceHasATRTrending = eaForceHasATRTrending;
|
||||
eaFilters.forceHasATRBreakout = eaForceHasATRBreakout;
|
||||
//
|
||||
iSignallerInputs.filters.filterBasedOnPV = eaFilterBasedOnPV;
|
||||
iSignallerInputs.filters.bosLoopback = eaBosLoopback;
|
||||
|
||||
//
|
||||
eaFilters.filterBasedOnTrend = eaFilterBasedOnTrend;
|
||||
eaFilters.forceHasTrendDir = eaForceHasTrendDir;
|
||||
eaFilters.forceHasTrendPlace = eaForceHasTrendPlace;
|
||||
eaFilters.forceHasTrendChange = eaForceHasTrendChange;
|
||||
eaFilters.forceHasTrendTrending = eaForceHasTrendTrending;
|
||||
eaFilters.forceHasTrendRejection = eaForceHasTrendRejection;
|
||||
eaFilters.forceHasTrendLineInside = eaForceHasTrendLineInside;
|
||||
eaFilters.forceHasTrendDirOnBothSide = eaForceHasTrendDirOnBothSide;
|
||||
//
|
||||
iSignallerInputs.filters.filterBasedOnSar = eaFilterBasedOnSar;
|
||||
iSignallerInputs.filters.forceSarSwitched = eaForceSarSwitched;
|
||||
iSignallerInputs.filters.forceSarOnBothSide = eaForceSarOnBothSide;
|
||||
iSignallerInputs.filters.forceSarHasBreakout = eaForceSarHasBreakout;
|
||||
iSignallerInputs.filters.forceSarHasReversalSide = eaForceSarHasReversalSide;
|
||||
|
||||
//
|
||||
eaFilters.filterBasedOnDelta = eaFilterBasedOnDelta;
|
||||
eaFilters.filterBasedOnVolume = eaFilterBasedOnVolume;
|
||||
eaFilters.filterBasedOnSignalBar = eaFilterBasedOnSignalBar;
|
||||
eaFilters.filterBasedOnHKSignalBar = eaFilterBasedOnHKSignalBar;
|
||||
//
|
||||
iSignallerInputs.filters.filterBasedOnRSI = eaFilterBasedOnRSI;
|
||||
iSignallerInputs.filters.forceHasRSITrending = eaForceHasRSITrending;
|
||||
iSignallerInputs.filters.forceHasRSIVPattern = eaForceHasRSIVPattern;
|
||||
iSignallerInputs.filters.forceHasRSICrossing = eaForceHasRSICrossing;
|
||||
|
||||
//
|
||||
iSignallerInputs.filters.filterBasedOnADX = eaFilterBasedOnADX;
|
||||
iSignallerInputs.filters.forceHasADXTrending = eaForceHasADXTrending;
|
||||
iSignallerInputs.filters.forceHasADXCrossing = eaForceHasADXCrossing;
|
||||
|
||||
//
|
||||
iSignallerInputs.filters.filterBasedOnATR = eaFilterBasedOnATR;
|
||||
iSignallerInputs.filters.forceHasATRTrending = eaForceHasATRTrending;
|
||||
iSignallerInputs.filters.forceHasATRBreakout = eaForceHasATRBreakout;
|
||||
|
||||
//
|
||||
iSignallerInputs.filters.filterBasedOnTrend = eaFilterBasedOnTrend;
|
||||
iSignallerInputs.filters.forceHasTrendDir = eaForceHasTrendDir;
|
||||
iSignallerInputs.filters.forceHasTrendPlace = eaForceHasTrendPlace;
|
||||
iSignallerInputs.filters.forceHasTrendChange = eaForceHasTrendChange;
|
||||
iSignallerInputs.filters.forceHasTrendTrending = eaForceHasTrendTrending;
|
||||
iSignallerInputs.filters.forceHasTrendRejection = eaForceHasTrendRejection;
|
||||
iSignallerInputs.filters.forceHasTrendLineInside = eaForceHasTrendLineInside;
|
||||
iSignallerInputs.filters.forceHasTrendDirOnBothSide = eaForceHasTrendDirOnBothSide;
|
||||
|
||||
//
|
||||
iSignallerInputs.filters.filterBasedOnDelta = eaFilterBasedOnDelta;
|
||||
iSignallerInputs.filters.filterBasedOnVolume = eaFilterBasedOnVolume;
|
||||
iSignallerInputs.filters.filterBasedOnSignalBar = eaFilterBasedOnSignalBar;
|
||||
iSignallerInputs.filters.filterBasedOnHKSignalBar = eaFilterBasedOnHKSignalBar;
|
||||
|
||||
//
|
||||
// Loop Through Symbols for Signalling Initializing ...
|
||||
int symbolsCount = ArraySize(symbols);
|
||||
for (int i = 0; i < symbolsCount; i++)
|
||||
{
|
||||
//
|
||||
string iSymbol = symbols[i];
|
||||
|
||||
//
|
||||
iSignallerInputs.symbol = iSymbol;
|
||||
if (iSignallerInputs.IsValid())
|
||||
{
|
||||
//
|
||||
// Initialize Signaller ...
|
||||
XCXCATBEASignaller *iSignaller = new XCXCATBEASignaller(iSignallerInputs);
|
||||
|
||||
//
|
||||
// Add it to the Signallers List ...
|
||||
Add(
|
||||
iSignaller,
|
||||
eaSignallers //
|
||||
);
|
||||
|
||||
//
|
||||
ZeroMemory(iSignaller);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
iSignallerInputs.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user