cleanup and backup old styles and try toimplement new POI Detector ...
This commit is contained in:
@@ -24,11 +24,11 @@
|
||||
|
||||
//
|
||||
// XBase Class ...
|
||||
class XSCBase
|
||||
class XCBase
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
public:
|
||||
//
|
||||
// Protected ...
|
||||
|
||||
@@ -42,10 +42,10 @@ public:
|
||||
|
||||
//
|
||||
// Protected
|
||||
protected:
|
||||
protected:
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
private:
|
||||
};
|
||||
|
||||
//
|
||||
@@ -84,7 +84,7 @@ string GenerateSpecifiedCommonSummary(
|
||||
"---------------" + separator +
|
||||
"Bullish: " + ToString(bullishScore) + separator +
|
||||
"Bearish: " + ToString(bearishScore) + separator +
|
||||
"---------------" + separator
|
||||
"---------------" + separator
|
||||
: "") +
|
||||
""
|
||||
//
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
//
|
||||
// Includes ...
|
||||
#include <Trade/AccountInfo.mqh>
|
||||
#include "../Classes/x-saherelm.base.class.mq5"
|
||||
#include <Trade/AccountInfo.mqh>
|
||||
|
||||
//
|
||||
// END Import and Inclused requirements ...
|
||||
@@ -50,14 +50,14 @@
|
||||
|
||||
//
|
||||
// a Class for Manage Account ...
|
||||
class XSCAccount : public XSCBase
|
||||
class XCAccount : public XCBase
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
public:
|
||||
//
|
||||
// Constructor ...
|
||||
void XSCAccount()
|
||||
void XCAccount()
|
||||
{
|
||||
//
|
||||
mAccountInfo = new CAccountInfo();
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
void ~XSCAccount()
|
||||
void ~XCAccount()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -380,10 +380,10 @@ public:
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
protected:
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
private:
|
||||
//
|
||||
// Account Info ...
|
||||
CAccountInfo mAccountInfo;
|
||||
@@ -26,17 +26,17 @@
|
||||
//
|
||||
// Class Definition ...
|
||||
|
||||
class XSCAlert : public XSCBase
|
||||
class XCAlert : public XCBase
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
public:
|
||||
//
|
||||
// Props ...
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
XSCAlert(
|
||||
XCAlert(
|
||||
string prefix = "X-Alert", // Alerts Prefixe
|
||||
bool enableAlerts = true, // Enable Alerts
|
||||
bool logAlerts = true, // Log Alerts
|
||||
@@ -63,7 +63,9 @@ public:
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
~XSCAlert() {}
|
||||
~XCAlert()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Override ...
|
||||
@@ -1282,7 +1284,7 @@ public:
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
protected:
|
||||
//
|
||||
// Private ...
|
||||
|
||||
@@ -1332,7 +1334,7 @@ protected:
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
//
|
||||
// Props ...
|
||||
string mPrefix; // Alerts Prefixe
|
||||
@@ -1363,26 +1365,26 @@ private:
|
||||
|
||||
//
|
||||
// a Base Class by Support Alert ...
|
||||
class XSCBaseAlert : public XSCBase
|
||||
class XCBaseAlert : public XCBase
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
public:
|
||||
//
|
||||
// Props ...
|
||||
|
||||
//
|
||||
// Constructor(s) ...
|
||||
void XSCBaseAlert()
|
||||
void XCBaseAlert()
|
||||
{
|
||||
//
|
||||
// Instance Alert ...
|
||||
mAlert = new XSCAlert();
|
||||
mAlert = new XCAlert();
|
||||
}
|
||||
|
||||
//
|
||||
// Deconstructors ...
|
||||
void ~XSCBaseAlert()
|
||||
void ~XCBaseAlert()
|
||||
{
|
||||
//
|
||||
delete mAlert;
|
||||
@@ -1562,14 +1564,14 @@ public:
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
protected:
|
||||
//
|
||||
// Alert ...
|
||||
XSCAlert *mAlert;
|
||||
XCAlert *mAlert;
|
||||
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
private:
|
||||
};
|
||||
|
||||
//
|
||||
@@ -223,9 +223,9 @@ class XCAppDialog : public CAppDialog
|
||||
|
||||
/**
|
||||
* Create and Run Confirm Dialog ...
|
||||
*
|
||||
*
|
||||
* @param message: message for Message Box ...
|
||||
*
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool ConfirmDialog(string message = NULL)
|
||||
@@ -234,7 +234,8 @@ class XCAppDialog : public CAppDialog
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
if (!IsValid(message)) {
|
||||
if (!IsValid(message))
|
||||
{
|
||||
message = "Confirm ?";
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,489 @@
|
||||
///////////////////////////////////////////////////////
|
||||
//
|
||||
// SaherElm IT Center MQL5 Class Library
|
||||
// --------------------------------------
|
||||
// Name: XChartObjects
|
||||
// Description: provides all require Chart Objects ...
|
||||
//
|
||||
//
|
||||
// Maintainer:
|
||||
// ------------
|
||||
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
|
||||
//
|
||||
//////////////////////////////////////////////////////
|
||||
//
|
||||
// Global Properties ...
|
||||
#property library
|
||||
#property copyright "Copyright 2023, SaherElm IT Center"
|
||||
#property link "https://www.saherelm.ir"
|
||||
#property version "1.00"
|
||||
#property strict
|
||||
|
||||
//
|
||||
#include "../Libraries/x-saherelm.x-poi.lib.mq5"
|
||||
#include "../Libraries/x-saherelm.x-trade.lib.mq5"
|
||||
|
||||
//
|
||||
#include <ChartObjects/ChartObject.mqh>
|
||||
#include <ChartObjects/ChartObjectsArrows.mqh>
|
||||
#include <ChartObjects/ChartObjectsLines.mqh>
|
||||
#include <ChartObjects/ChartObjectsShapes.mqh>
|
||||
|
||||
//
|
||||
// Definitions ...
|
||||
|
||||
enum ENUM_XCHARTOBJECTS
|
||||
{
|
||||
//
|
||||
// Global ...
|
||||
X_ZONE_OBJ = 7860,
|
||||
X_FROM_TO_OBJ = 7861,
|
||||
X_BAR_ARROW_OBJ = 7862,
|
||||
//
|
||||
X_SIGNAL_OBJ = 8860,
|
||||
X_TREND_OBJ = 8861,
|
||||
//
|
||||
// Structured ...
|
||||
X_TRADE_DAY_OBJ = 9860,
|
||||
X_MARKET_SESSION_OBJ = 9861,
|
||||
X_SWING_HIGH_OBJ = 9862,
|
||||
X_SWING_LOW_OBJ = 9863,
|
||||
X_BULLISH_MOMENTUM_BAR_OBJ = 9864,
|
||||
X_BEARISH_MOMENTUM_BAR_OBJ = 9865,
|
||||
X_BULLISH_REJECTION_BAR_OBJ = 9866,
|
||||
X_BEARISH_REJECTION_BAR_OBJ = 9867,
|
||||
X_SUPPORT_ZONE_OBJ = 9868,
|
||||
X_RESISTANCE_ZONE_OBJ = 9869,
|
||||
X_SUPPLY_ZONE_OBJ = 9870,
|
||||
X_DEMAND_ZONE_OBJ = 9871,
|
||||
X_BULLISH_ORDERBLOCK_OBJ = 9872,
|
||||
X_BEARISH_ORDERBLOCK_OBJ = 9873,
|
||||
X_BULLISH_FVG_OBJ = 9874,
|
||||
X_BEARISH_FVG_OBJ = 9875,
|
||||
};
|
||||
|
||||
enum ENUM_X_CHART_IDS
|
||||
{
|
||||
X_TO,
|
||||
X_FROM,
|
||||
X_UPPER,
|
||||
X_LOWER,
|
||||
X_ENTRY,
|
||||
X_SL,
|
||||
X_TP
|
||||
};
|
||||
|
||||
//
|
||||
// Implementation ...
|
||||
|
||||
//
|
||||
// Global Chart Objects ...
|
||||
|
||||
//
|
||||
// Bas Chart Object ...
|
||||
class XCBaseObject : public CChartObject
|
||||
{
|
||||
//
|
||||
public:
|
||||
//
|
||||
|
||||
//
|
||||
// Getter(s) / Setter(s) ...
|
||||
|
||||
/**
|
||||
* Get Object Specified Name ...
|
||||
*
|
||||
* @return ( string )
|
||||
*/
|
||||
string ObjName()
|
||||
{
|
||||
return mObjName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Object Specified Name ...
|
||||
*
|
||||
* @param value: String ...
|
||||
*/
|
||||
void ObjName(string value)
|
||||
{
|
||||
mObjName = value;
|
||||
}
|
||||
|
||||
//
|
||||
private:
|
||||
//
|
||||
|
||||
//
|
||||
// Props ...
|
||||
string mObjName; // Object Specified Name ...
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
// Swing ...
|
||||
class XCSwingObject : public XCBaseObject
|
||||
{
|
||||
//
|
||||
public:
|
||||
//
|
||||
|
||||
/**
|
||||
* Creator ...
|
||||
*
|
||||
* @param chart_id: Long, Specified Chart ID ...
|
||||
* @param window: Integer, Specified Chart Window ID ...
|
||||
* @param swing: XCSwing instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBySwing(
|
||||
long chart_id,
|
||||
int window,
|
||||
int arrow,
|
||||
XCSwing &swing //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
swing.IsValid()
|
||||
//
|
||||
;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
string name = swing.GetTag();
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = swing.FillBar(bar);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
datetime time = bar.time;
|
||||
double price = swing.IsSwingHigh()
|
||||
? bar.high
|
||||
: bar.low;
|
||||
|
||||
//
|
||||
result = mArrow.Create(
|
||||
chart_id,
|
||||
name,
|
||||
window,
|
||||
time,
|
||||
price,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (result)
|
||||
{
|
||||
ObjName(name);
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Virtual ...
|
||||
|
||||
//
|
||||
// Setter(s) ...
|
||||
|
||||
/**
|
||||
* Set Arrow Anchor ...
|
||||
*
|
||||
* @param value: ENUM_ARROW_ANCHOR member ...
|
||||
*/
|
||||
void ArrowAnchor(ENUM_ARROW_ANCHOR value)
|
||||
{
|
||||
mArrow.Anchor(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Arrow Color ...
|
||||
*
|
||||
* @param value: Color ...
|
||||
*/
|
||||
void ArrowColor(color value)
|
||||
{
|
||||
mArrow.Color(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Arrow Width ...
|
||||
*
|
||||
* @param value: Integer ...
|
||||
*/
|
||||
void ArrowWidth(int value)
|
||||
{
|
||||
mArrow.Width(value);
|
||||
}
|
||||
|
||||
//
|
||||
private:
|
||||
//
|
||||
CChartObjectArrow mArrow;
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
// Swing High ...
|
||||
class XCSwingHighObject : public XCSwingObject
|
||||
{
|
||||
//
|
||||
public:
|
||||
//
|
||||
|
||||
/**
|
||||
* Creator ...
|
||||
*
|
||||
* @param chart_id: Long, Specified Chart ID ...
|
||||
* @param window: Integer, Specified Chart Window ID ...
|
||||
* @param swing: XCSwing instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool Create(
|
||||
long chart_id,
|
||||
int window,
|
||||
int arrow,
|
||||
XCSwing &swing //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = swing.IsValid() &&
|
||||
swing.IsSwingHigh();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = CreateBySwing(
|
||||
chart_id,
|
||||
window,
|
||||
arrow,
|
||||
swing //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Object Type ...
|
||||
*
|
||||
* @return ( ENUM_XCHARTOBJECTS )
|
||||
*/
|
||||
virtual ENUM_XCHARTOBJECTS Type()
|
||||
{
|
||||
return X_SWING_HIGH_OBJ;
|
||||
}
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
// Swing Low ...
|
||||
class XCSwingLowObject : public XCSwingObject
|
||||
{
|
||||
//
|
||||
public:
|
||||
//
|
||||
|
||||
/**
|
||||
* Creator ...
|
||||
*
|
||||
* @param chart_id: Long, Specified Chart ID ...
|
||||
* @param window: Integer, Specified Chart Window ID ...
|
||||
* @param swing: XCSwing instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool Create(
|
||||
long chart_id,
|
||||
int window,
|
||||
int arrow,
|
||||
XCSwing &swing //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = swing.IsValid() &&
|
||||
swing.IsSwingLow();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = CreateBySwing(
|
||||
chart_id,
|
||||
window,
|
||||
arrow,
|
||||
swing //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Object Type ...
|
||||
*
|
||||
* @return ( ENUM_XCHARTOBJECTS )
|
||||
*/
|
||||
virtual ENUM_XCHARTOBJECTS Type()
|
||||
{
|
||||
return X_SWING_LOW_OBJ;
|
||||
}
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
// XCZoneObject ...
|
||||
class XCZoneObject : public XCBaseObject
|
||||
{
|
||||
//
|
||||
public:
|
||||
//
|
||||
|
||||
/**
|
||||
* Creator ...
|
||||
*
|
||||
* @param chart_id: Long, Specified Chart ID ...
|
||||
* @param name: String, Specified Object Identifier on Chart ...
|
||||
* @param window: Integer, Specified Chart Window ID ...
|
||||
* @param zone: XCZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateByZone(
|
||||
long chart_id,
|
||||
string name,
|
||||
int window,
|
||||
XCZone &zone //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
IsValid(name) &&
|
||||
zone.IsValidFrom() &&
|
||||
zone.IsValidBoundary()
|
||||
//
|
||||
;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
datetime to = NormalizeTime(zone.To());
|
||||
|
||||
//
|
||||
result = mRect.Create(
|
||||
chart_id,
|
||||
name,
|
||||
window,
|
||||
zone.From(),
|
||||
zone.Upper(),
|
||||
to,
|
||||
zone.Lower() //
|
||||
);
|
||||
|
||||
//
|
||||
if (result)
|
||||
{
|
||||
ObjName(name);
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Virtual ...
|
||||
|
||||
/**
|
||||
* Retrieve Object Type ...
|
||||
*
|
||||
* @return ( ENUM_XCHARTOBJECTS )
|
||||
*/
|
||||
virtual ENUM_XCHARTOBJECTS Type()
|
||||
{
|
||||
return X_ZONE_OBJ;
|
||||
}
|
||||
|
||||
//
|
||||
// Setter(s) ...
|
||||
|
||||
/**
|
||||
* Set Zone Width ...
|
||||
*
|
||||
* @param value: Integer ...
|
||||
*/
|
||||
void ZoneWidth(int value)
|
||||
{
|
||||
//
|
||||
if (value < 1)
|
||||
{
|
||||
value = 1;
|
||||
}
|
||||
|
||||
//
|
||||
mRect.Width(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Zone Color ...
|
||||
*
|
||||
* @param value: Color ...
|
||||
*/
|
||||
void ZoneColor(color value)
|
||||
{
|
||||
mRect.Color(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Zone Style ...
|
||||
*
|
||||
* @param value: ENUM_LINE_STYLE member ...
|
||||
*/
|
||||
void ZoneStyle(ENUM_LINE_STYLE value)
|
||||
{
|
||||
mRect.Style(value);
|
||||
}
|
||||
|
||||
//
|
||||
private:
|
||||
//
|
||||
CChartObjectRectangle mRect;
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
//
|
||||
// Imports ...
|
||||
#include "../Classes/x-saherelm.xalert.class.mq5"
|
||||
#include "../Classes/x-saherelm.xtrade.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-alert.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-trade.class.mq5"
|
||||
#include "../Helpers/x-saherelm.xcc.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xct.helper.mq5"
|
||||
|
||||
@@ -35,14 +35,14 @@ string XCBaseExpertToken = "XCBaseEA";
|
||||
|
||||
//
|
||||
// Implementations ...
|
||||
class XCBaseExpert : public XSCBaseAlert
|
||||
class XCBaseExpert : public XCBaseAlert
|
||||
{
|
||||
//
|
||||
public:
|
||||
//
|
||||
|
||||
//
|
||||
XSCTrade *mTrader; // Trader of Expert Adviser ...
|
||||
XCTrade *mTrader; // Trader of Expert Adviser ...
|
||||
|
||||
//
|
||||
// Constructur(s) ...
|
||||
@@ -577,7 +577,7 @@ class XCBaseExpert : public XSCBaseAlert
|
||||
// Bar Timer ...
|
||||
XCTInputs ctInputs;
|
||||
ctInputs.Default(); // Default Configurations ...
|
||||
mCTHelper = new XSCXCTHelper();
|
||||
mCTHelper = new XCXCTHelper();
|
||||
result = mCTHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
@@ -592,7 +592,7 @@ class XCBaseExpert : public XSCBaseAlert
|
||||
// Bar Styles ...
|
||||
XCCInputs ccInputs;
|
||||
ccInputs.Default(); // Default Configurations ...
|
||||
mCCHelper = new XSCXCCHelper();
|
||||
mCCHelper = new XCXCCHelper();
|
||||
result = mCCHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
@@ -605,7 +605,7 @@ class XCBaseExpert : public XSCBaseAlert
|
||||
|
||||
//
|
||||
// Create Trader Instance and Configure it ...
|
||||
mTrader = new XSCTrade(
|
||||
mTrader = new XCTrade(
|
||||
mSlippage,
|
||||
mMagicNumber //
|
||||
);
|
||||
@@ -788,8 +788,8 @@ class XCBaseExpert : public XSCBaseAlert
|
||||
|
||||
//
|
||||
XTimeTracker mTimeTracker; // Time Tracker for Providing Reports ...
|
||||
XSCXCTHelper *mCTHelper; // Bar Timer Indicator Helper class ...
|
||||
XSCXCCHelper *mCCHelper; // Chart Styler Indicator Helper Class ...
|
||||
XCXCTHelper *mCTHelper; // Bar Timer Indicator Helper class ...
|
||||
XCXCCHelper *mCCHelper; // Chart Styler Indicator Helper Class ...
|
||||
|
||||
//
|
||||
// Actions ...
|
||||
@@ -30,14 +30,14 @@
|
||||
//
|
||||
// a Class for Handle base requirements ...
|
||||
// for indicators ...
|
||||
class XSCBaseHelper : public XSCBase
|
||||
class XCBaseHelper : public XCBase
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
public:
|
||||
//
|
||||
// Constructor ...
|
||||
void XSCBaseHelper(
|
||||
void XCBaseHelper(
|
||||
string symbol, // Trading Symbol
|
||||
ENUM_TIMEFRAMES period // Trading Time Frame
|
||||
)
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
void ~XSCBaseHelper()
|
||||
void ~XCBaseHelper()
|
||||
{
|
||||
//
|
||||
IndicatorRelease(mHandler);
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
protected:
|
||||
//
|
||||
// Props ...
|
||||
|
||||
@@ -140,7 +140,7 @@ protected:
|
||||
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
private:
|
||||
//
|
||||
};
|
||||
|
||||
@@ -39,18 +39,18 @@ enum X_HTTP_METHOD
|
||||
|
||||
//
|
||||
// a Class for Manage Account ...
|
||||
class XSCHttp : public XSCBase
|
||||
class XCHttp : public XCBase
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
public:
|
||||
//
|
||||
// Constructor ...
|
||||
void XSCHttp()
|
||||
void XCHttp()
|
||||
{
|
||||
XSCHttp("", 10000);
|
||||
XCHttp("", 10000);
|
||||
}
|
||||
void XSCHttp(
|
||||
void XCHttp(
|
||||
string path, // Base Folder to Store Data
|
||||
int timeout // base timeout for Requests
|
||||
)
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
void ~XSCHttp()
|
||||
void ~XCHttp()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ public:
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
protected:
|
||||
//
|
||||
// Destintion Folder Path ...
|
||||
string mPath;
|
||||
@@ -311,7 +311,7 @@ protected:
|
||||
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
private:
|
||||
//
|
||||
// Reset Errors State ...
|
||||
void ResetState()
|
||||
@@ -110,21 +110,25 @@ static uchar _md5_PADDING[64] =
|
||||
|
||||
//
|
||||
// XCMD5 a library for Hashing ...
|
||||
class XSCMD5
|
||||
class XCMD5
|
||||
{
|
||||
//
|
||||
// Public Provides ...
|
||||
public:
|
||||
public:
|
||||
//
|
||||
// Protected Provides ...
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
XSCMD5(void) {}
|
||||
XCMD5(void)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
~XSCMD5(void) {}
|
||||
~XCMD5(void)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Hash Specified Char Array ...
|
||||
@@ -198,10 +202,10 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
//
|
||||
// Private Provides ...
|
||||
private:
|
||||
private:
|
||||
//
|
||||
uint m_lMD5[4];
|
||||
uint m_nCount[2];
|
||||
+658
-7232
File diff suppressed because it is too large
Load Diff
@@ -22,11 +22,11 @@
|
||||
//
|
||||
// Imports ...
|
||||
#include "../Classes/x-saherelm.base.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-chart-objects.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-cobject.class.mq5"
|
||||
|
||||
//
|
||||
// Definitions ...
|
||||
class XCPOIDrawer : public XSCBase
|
||||
class XCPOIDrawer : public XCBase
|
||||
{
|
||||
//
|
||||
public:
|
||||
@@ -1283,7 +1283,7 @@ class XCPOIDrawer : public XSCBase
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSwingHigh(
|
||||
XOHCL &swing,
|
||||
XCSwing &swing,
|
||||
XCSwingHighObject *&object //
|
||||
)
|
||||
{
|
||||
@@ -1294,7 +1294,9 @@ class XCPOIDrawer : public XSCBase
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = swing.IsValid();
|
||||
result =
|
||||
swing.IsValid() &&
|
||||
swing.IsSwingHigh();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
@@ -1304,9 +1306,6 @@ class XCPOIDrawer : public XSCBase
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = swing.GetTag(ToString(X_POI_SWING_HIGH));
|
||||
|
||||
//
|
||||
int arrow = SwingHighArrow();
|
||||
int width = SwingHighWidth();
|
||||
@@ -1314,12 +1313,11 @@ class XCPOIDrawer : public XSCBase
|
||||
|
||||
//
|
||||
object = new XCSwingHighObject();
|
||||
result = object.CreateBySwing(
|
||||
result = object.Create(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
swing,
|
||||
(char)arrow //
|
||||
arrow,
|
||||
swing //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1345,7 +1343,7 @@ class XCPOIDrawer : public XSCBase
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSwingLow(
|
||||
XOHCL &swing,
|
||||
XCSwing &swing,
|
||||
XCSwingLowObject *&object //
|
||||
)
|
||||
{
|
||||
@@ -1356,7 +1354,9 @@ class XCPOIDrawer : public XSCBase
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = swing.IsValid();
|
||||
result =
|
||||
swing.IsValid() &&
|
||||
swing.IsSwingLow();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
@@ -1366,9 +1366,6 @@ class XCPOIDrawer : public XSCBase
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = swing.GetTag(ToString(X_POI_SWING_LOW));
|
||||
|
||||
//
|
||||
int arrow = SwingLowArrow();
|
||||
int width = SwingLowWidth();
|
||||
@@ -1376,12 +1373,11 @@ class XCPOIDrawer : public XSCBase
|
||||
|
||||
//
|
||||
object = new XCSwingLowObject();
|
||||
result = object.CreateBySwing(
|
||||
result = object.Create(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
swing,
|
||||
(char)arrow //
|
||||
arrow,
|
||||
swing //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1399,855 +1395,6 @@ class XCPOIDrawer : public XSCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Momentum Bars ...
|
||||
|
||||
/**
|
||||
* Create Bullish Momentum Bar Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBullishMomentumBar(
|
||||
XOHCL &bar,
|
||||
XCBullishMomentumBarObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_MOMENTUM_BAR));
|
||||
|
||||
//
|
||||
int arrow = BullishMomentumBarArrow();
|
||||
int width = BullishMomentumBarWidth();
|
||||
color crl = BullishMomentumBarColor();
|
||||
|
||||
//
|
||||
object = new XCBullishMomentumBarObject();
|
||||
result = object.CreateByBar(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bearish Momentum Bar Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBearishMomentumBar(
|
||||
XOHCL &bar,
|
||||
XCBearishMomentumBarObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_MOMENTUM_BAR));
|
||||
|
||||
//
|
||||
int arrow = BearishMomentumBarArrow();
|
||||
int width = BearishMomentumBarWidth();
|
||||
color crl = BearishMomentumBarColor();
|
||||
|
||||
//
|
||||
object = new XCBearishMomentumBarObject();
|
||||
result = object.CreateByBar(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Rejection Bars ...
|
||||
|
||||
/**
|
||||
* Create Bullish Rejection Bar Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBullishRejectionBar(
|
||||
XOHCL &bar,
|
||||
XCBullishRejectionBarObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_REJECTION_BAR));
|
||||
|
||||
//
|
||||
int arrow = BullishRejectionBarArrow();
|
||||
int width = BullishRejectionBarWidth();
|
||||
color crl = BullishRejectionBarColor();
|
||||
|
||||
//
|
||||
object = new XCBullishRejectionBarObject();
|
||||
result = object.CreateByBar(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bearish Rejection Bar Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBearishRejectionBar(
|
||||
XOHCL &bar,
|
||||
XCBearishRejectionBarObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_REJECTION_BAR));
|
||||
|
||||
//
|
||||
int arrow = BearishRejectionBarArrow();
|
||||
int width = BearishRejectionBarWidth();
|
||||
color crl = BearishRejectionBarColor();
|
||||
|
||||
//
|
||||
object = new XCBearishRejectionBarObject();
|
||||
result = object.CreateByBar(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Support and Resistance Zones ...
|
||||
|
||||
/**
|
||||
* Create Support Zone Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
* @param destTime: DateTime ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSupportZone(
|
||||
XOHCL &bar,
|
||||
XCSupportZoneObject *&object,
|
||||
datetime destTime = NULL //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_SUPPORT_ZONE));
|
||||
|
||||
//
|
||||
datetime time2 =
|
||||
IsValid(destTime)
|
||||
? destTime
|
||||
: (datetime)((int)bar.time + (PeriodSeconds(bar.period) * 5));
|
||||
|
||||
//
|
||||
bool fill = SupportZoneFill();
|
||||
int width = SupportZoneWidth();
|
||||
color crl = SupportZoneColor();
|
||||
ENUM_LINE_STYLE style = SupportZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCSupportZoneObject();
|
||||
result = object.CreateBySupport(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
time2,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Resistance Zone Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateResistanceZone(
|
||||
XOHCL &bar,
|
||||
XCResistanceZoneObject *&object,
|
||||
datetime destTime = NULL //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_RESISTANCE_ZONE));
|
||||
|
||||
//
|
||||
datetime time2 =
|
||||
IsValid(destTime)
|
||||
? destTime
|
||||
: (datetime)((int)bar.time + (PeriodSeconds(bar.period) * 5));
|
||||
|
||||
//
|
||||
bool fill = ResistanceZoneFill();
|
||||
int width = ResistanceZoneWidth();
|
||||
color crl = ResistanceZoneColor();
|
||||
ENUM_LINE_STYLE style = ResistanceZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCResistanceZoneObject();
|
||||
result = object.CreateByResistance(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
time2,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Supply and Demand Zones ...
|
||||
|
||||
/**
|
||||
* Create Supply Zone Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSupplyZone(
|
||||
XZone &zone,
|
||||
XCSupplyZoneObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_SUPPLY_ZONE),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = SupplyZoneFill();
|
||||
int width = SupplyZoneWidth();
|
||||
color crl = SupplyZoneColor();
|
||||
ENUM_LINE_STYLE style = SupplyZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCSupplyZoneObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Demand Zone Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateDemandZone(
|
||||
XZone &zone,
|
||||
XCDemandZoneObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_DEMAND_ZONE),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = DemandZoneFill();
|
||||
int width = DemandZoneWidth();
|
||||
color crl = DemandZoneColor();
|
||||
ENUM_LINE_STYLE style = DemandZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCDemandZoneObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Order Blocks ...
|
||||
|
||||
/**
|
||||
* Create Bullish Order Block Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBullishOrderBlock(
|
||||
XZone &zone,
|
||||
XCBullishOrderBlockObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_BULLISH_ORDERBLOCK),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = BullishOrderBlockFill();
|
||||
int width = BullishOrderBlockWidth();
|
||||
color crl = BullishOrderBlockColor();
|
||||
ENUM_LINE_STYLE style = BullishOrderBlockStyle();
|
||||
|
||||
//
|
||||
object = new XCBullishOrderBlockObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bearish Order Block Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBearishOrderBlock(
|
||||
XZone &zone,
|
||||
XCBearishOrderBlockObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_BEARISH_ORDERBLOCK),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = BearishOrderBlockFill();
|
||||
int width = BearishOrderBlockWidth();
|
||||
color crl = BearishOrderBlockColor();
|
||||
ENUM_LINE_STYLE style = BearishOrderBlockStyle();
|
||||
|
||||
//
|
||||
object = new XCBearishOrderBlockObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Order Blocks ...
|
||||
|
||||
/**
|
||||
* Create Bullish FVG Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBullishFVG(
|
||||
XZone &zone,
|
||||
XCBullishFVGObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_BULLISH_FVG),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = BullishFVGFill();
|
||||
int width = BullishFVGWidth();
|
||||
color crl = BullishFVGColor();
|
||||
ENUM_LINE_STYLE style = BullishFVGStyle();
|
||||
|
||||
//
|
||||
object = new XCBullishFVGObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bearish FVG Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBearishFVG(
|
||||
XZone &zone,
|
||||
XCBearishFVGObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_BEARISH_FVG),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = BearishFVGFill();
|
||||
int width = BearishFVGWidth();
|
||||
color crl = BearishFVGColor();
|
||||
ENUM_LINE_STYLE style = BearishFVGStyle();
|
||||
|
||||
//
|
||||
object = new XCBearishFVGObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
protected:
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user