apply new mechanism for validating anf filtering ...
This commit is contained in:
@@ -43,9 +43,6 @@
|
||||
|
||||
//
|
||||
// Imports ...
|
||||
#include "../Classes/x-saherelm.x-alert.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-bar.analyser.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-poi.drawer.class.mq5"
|
||||
#include "../Libraries/x-saherelm.common.lib.mq5"
|
||||
|
||||
//
|
||||
@@ -79,40 +76,6 @@ input ENUM_TIMEFRAMES hcPeriod = NULL; // Hind Period
|
||||
// this Cycle Used for All Calculations ...
|
||||
input ENUM_X_MARKET_CYCLES appliedCycle = X_MARKET_CYCLE_HIND; // Applied Cycle
|
||||
|
||||
//
|
||||
// Validating ...
|
||||
input group "Validating";
|
||||
input bool forceHasSwing = false; // Force Blocks to Have Swing
|
||||
input bool forceObBarType = false; // Force Block Has Reversal Bar
|
||||
input bool forceOBFVGBarType = false; // Force FVG Has Same Bars
|
||||
input bool forceHasFLiquidity = false; // Force Blocks to Have Following Liquidity
|
||||
input bool forceHasRLiquidity = false; // Force Blocks to Have Reversal Liquidity
|
||||
input bool validateGapSequence = false; // Validate Block's Gap Sequence
|
||||
input bool validateBlockEdgeBreakout = false; // Validate Block's Edge Breakout
|
||||
|
||||
//
|
||||
// Filtering ...
|
||||
input group "Filtering";
|
||||
input bool filterBasedOnPV = false; // Filter Based on Peak and Vale
|
||||
input bool filterBasedOnSar = false; // Filter Based on Sar
|
||||
input bool filterBasedOnRSI = false; // Filter Based on RSI
|
||||
input bool filterBasedOnADX = false; // Filter Based on ADX
|
||||
input bool filterBasedOnATR = false; // Filter Based on ATR
|
||||
input bool filterBasedOnTrend = false; // Filter Based on Trend
|
||||
input bool filterBasedOnDelta = false; // Filter Based on Delta
|
||||
input bool filterBasedOnVolume = false; // Filter Based on Volume
|
||||
input bool filterBasedOnSignalBar = false; // Filter Based on Signal Bar
|
||||
input bool filterBasedOnHKSignalBar = false; // Filter Based on Hiken Ashi Signal Bar
|
||||
|
||||
//
|
||||
// Alert ...
|
||||
input group "Alerts";
|
||||
input string mAlertPrefix = ""; // Alert Prefix
|
||||
input bool _logAlerts = false; // Log Alerts
|
||||
input bool _pushAlerts = false; // Push Alerts
|
||||
input bool _mailAlerts = false; // Mail Alerts
|
||||
input bool _terminalAlerts = false; // Terminal Alerts
|
||||
|
||||
//
|
||||
// Presentation ...
|
||||
input group "Presentation";
|
||||
@@ -643,13 +606,6 @@ int rsiHandler = INVALID_HANDLE;
|
||||
int adxHandler = INVALID_HANDLE;
|
||||
int trendHandler = INVALID_HANDLE;
|
||||
|
||||
//
|
||||
XCAlert *mAlert;
|
||||
CArrayObj mObjects;
|
||||
XCPOIDrawer *mDrawer;
|
||||
bool mEnableAlerts = false;
|
||||
XCBarAnalyser *mBarAnalyser;
|
||||
|
||||
//
|
||||
// Event Handlers ...
|
||||
|
||||
@@ -743,21 +699,6 @@ void OnDeinit(const int reason)
|
||||
//
|
||||
ShowBars();
|
||||
|
||||
//
|
||||
mObjects.Clear();
|
||||
|
||||
//
|
||||
delete mAlert;
|
||||
ZeroMemory(mAlert);
|
||||
|
||||
//
|
||||
delete mDrawer;
|
||||
ZeroMemory(mDrawer);
|
||||
|
||||
//
|
||||
delete mBarAnalyser;
|
||||
ZeroMemory(mBarAnalyser);
|
||||
|
||||
//
|
||||
// De Initialize all Handlers and etc ...
|
||||
IndicatorRelease(atrHandler);
|
||||
@@ -1668,32 +1609,6 @@ bool InitRequirements()
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Initial Class Instances ...
|
||||
|
||||
//
|
||||
mDrawer = new XCPOIDrawer();
|
||||
mBarAnalyser = new XCBarAnalyser();
|
||||
|
||||
//
|
||||
// Initialize and Configure Alert ...
|
||||
mAlert = new XCAlert();
|
||||
mEnableAlerts =
|
||||
_logAlerts ||
|
||||
_pushAlerts ||
|
||||
_mailAlerts ||
|
||||
_terminalAlerts;
|
||||
string mPrefix = ShortName +
|
||||
(!IsValid(mAlertPrefix)
|
||||
? ""
|
||||
: "[" + mAlertPrefix + "]");
|
||||
mAlert.SetPrefix(mPrefix);
|
||||
mAlert.SetLogAlerts(_logAlerts);
|
||||
mAlert.SetMailAlerts(_mailAlerts);
|
||||
mAlert.SetPushAlerts(_pushAlerts);
|
||||
mAlert.SetEnableAlerts(mEnableAlerts);
|
||||
mAlert.SetTerminalAlerts(_terminalAlerts);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user