rename indicators, add temp of helpers class for each indicator ...

This commit is contained in:
2024-05-18 03:25:39 +03:30
parent c55c585926
commit 727628d2e7
27 changed files with 3051 additions and 4466 deletions
-36
View File
@@ -1,36 +0,0 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Class Library
// --------------------------------------
// Name: XBaseClass
// Description: provides all based classes for use ...
//
//
// 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
//
// XBase Class ...
class XCBase
{
//
// Public ...
public:
//
// Protected ...
protected:
//
// Private ...
private:
};
+87
View File
@@ -0,0 +1,87 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Class Library
// --------------------------------------
// Name: XBaseClass
// Description: provides all based classes for use ...
//
//
// 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.common.lib.mq5"
//
// XBase Class ...
class XSCBase
{
//
// Public ...
public:
//
// Protected ...
//
// Represent Basic Unique Tag ...
virtual string GetTag();
protected:
//
// Retrieve Class Token ...
string GetToken()
{
//
string result = NULL;
//
string mType = GetTypeName(this);
//
result = mType;
//
string parts[];
int partsCount = SplitContent(
parts,
result,
" "
//
);
if (partsCount <= 0)
{
//
result = mType;
return result;
}
//
bool hasLastPart = GetLastItem(
result,
parts
//
);
if (!hasLastPart)
{
//
result = mType;
return result;
}
//
return result;
}
//
// Private ...
private:
};
File diff suppressed because it is too large Load Diff
+148
View File
@@ -0,0 +1,148 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Class Library
// ----------------------------------------------
// Name: XSCBaseHelper
// Description: provides all Base Indicator
// Helper requirements ...
//
//
// 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
//
// Includes ...
#include "../Classes/x-saherelm.base.class.mq5"
//
// Definitions ...
//
// a Class for Handle base requirements ...
// for indicators ...
class XSCBaseHelper : public XSCBase
{
//
// Public ...
public:
//
// Constructor ...
void XSCBaseHelper(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period // Trading Time Frame
)
{
//
mSymbol = symbol;
mPeriod = period;
}
//
// Deconstructor ...
void ~XSCBaseHelper()
{
//
IndicatorRelease(mHandler);
}
//
// Setter(s) / Getter(s) ...
//
// Symbol ...
string GetSymbol()
{
return mSymbol;
}
//
// Period ...
ENUM_TIMEFRAMES GetPeriod()
{
return mPeriod;
}
//
// Retrieve Bars ...
int CountBars()
{
//
int result =
Bars(
mSymbol,
mPeriod
//
);
//
return result;
}
//
// Retrieve Indicator Calculated Bars ...
int CountCalculatedBars()
{
return BarsCalculated(mHandler);
}
//
// Generate Tag ...
virtual string GetTag()
{
//
string result = NULL;
//
result =
//
GetToken() +
"[" +
GetSymbol() + "|" +
ToString(GetPeriod()) +
"]"
//
;
//
return result;
}
//
// Functions ...
//
// Protected ...
protected:
//
// Props ...
//
// Symbol ...
string mSymbol;
//
// Period ...
ENUM_TIMEFRAMES mPeriod;
//
// Indicator Handler ...
int mHandler;
//
// Private ...
private:
//
};
//
// Tools ....
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXAMAHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XAMA_BUFFERS
{
XAMA_MAIN_LINE = 0
};
//
// Input Models ...
struct XXAMAInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXAMAInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXAMAHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXAMAHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXAMAHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXAMAInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXAMAInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXAMAInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXAMAInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXCCHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XCC_BUFFERS
{
XCC_MAIN_LINE = 0
};
//
// Input Models ...
struct XXCCInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXCCInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXCCHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXCCHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXCCHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXCCInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXCCInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXCCInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXCCInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXCHLHHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XCHLH_BUFFERS
{
XCHLH_MAIN_LINE = 0
};
//
// Input Models ...
struct XXCHLHInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXCHLHInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXCHLHHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXCHLHHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXCHLHHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXCHLHInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXCHLHInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXCHLHInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXCHLHInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXCHMAHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XCHMA_BUFFERS
{
XCHMA_MAIN_LINE = 0
};
//
// Input Models ...
struct XXCHMAInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXCHMAInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXCHMAHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXCHMAHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXCHMAHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXCHMAInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXCHMAInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXCHMAInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXCHMAInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXFIHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XFI_BUFFERS
{
XFI_MAIN_LINE = 0
};
//
// Input Models ...
struct XXFIInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXFIInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXFIHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXFIHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXFIHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXFIInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXFIInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXFIInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXFIInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXLHHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XLH_BUFFERS
{
XLH_MAIN_LINE = 0
};
//
// Input Models ...
struct XXLHInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXLHInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXLHHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXLHHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXLHHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXLHInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXLHInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXLHInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXLHInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXOBDHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XOBD_BUFFERS
{
XOBD_MAIN_LINE = 0
};
//
// Input Models ...
struct XXOBDInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXOBDInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXOBDHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXOBDHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXOBDHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXOBDInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXOBDInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXOBDInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXOBDInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXRSIHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XRSI_BUFFERS
{
XRSI_MAIN_LINE = 0
};
//
// Input Models ...
struct XXRSIInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXRSIInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXRSIHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXRSIHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXRSIHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXRSIInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXRSIInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXRSIInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXRSIInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXTDHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XTD_BUFFERS
{
XTD_MAIN_LINE = 0
};
//
// Input Models ...
struct XXTDInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXTDInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXTDHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXTDHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXTDHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXTDInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXTDInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXTDInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXTDInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXTMHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XTM_BUFFERS
{
XTM_MAIN_LINE = 0
};
//
// Input Models ...
struct XXTMInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXTMInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXTMHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXTMHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXTMHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXTMInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXTMInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXTMInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXTMInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...
+256
View File
@@ -0,0 +1,256 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Helper Class Library
// ----------------------------------------------
// Name: XSCXTSHelper
// Description: provides all Indicator
// Helper requirements ...
//
//
// 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
//
// Imports ...
#include "../Classes/x-saherelm.xhelper.class.mq5"
//
// Definitions ...
//
enum ENUM_XTS_BUFFERS
{
XTS_MAIN_LINE = 0
};
//
// Input Models ...
struct XXTSInputs
{
//
// Props ...
string tmp;
//
// Constructor(s) ...
XXTSInputs()
{
//
Clean();
}
//
// Tools ...
//
// Clean ...
void Clean()
{
//
}
//
// Default ...
void Default()
{
//
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
//
// Retrieve MAx Length ...
int Max()
{
//
int result = 0;
//
result = MathMax(0, 0);
//
return result;
}
};
//
// Class ...
class XSCXTSHelper : public XSCBaseHelper
{
//
// Public ...
public:
//
// Props ...
//
// Constructors ...
XSCXTSHelper() : XSCBaseHelper(_Symbol, _Period)
{
}
//
// Deconstructor ...
~XSCXTSHelper() {}
//
// Tools ...
bool Init(
string symbol, // Trading Symbol
ENUM_TIMEFRAMES period, // Trading Period
XXTSInputs &inputs // Inputs
)
{
//
bool result = false;
//
mSymbol = symbol;
mPeriod = period;
//
result = inputs.IsValid();
if (!result)
{
return result;
}
//
mInputs = inputs;
// //
// // ArraySetAsSeries(shortExit2Buffer, true);
// mHandler = iCustom(
// mSymbol,
// mPeriod,
// "x-saherelm.x",
// //
// // Inputs ...
// //
// );
// result = mHandler != INVALID_HANDLE;
// if (!result)
// {
// return result;
// }
//
return result;
}
//
// Inputs ...
//
XXTSInputs GetInputs()
{
return mInputs;
}
//
bool SetInputs(
XXTSInputs &inputs // Configs
)
{
//
return Init(
mSymbol,
mPeriod,
inputs
//
);
}
//
// Buffers ...
// //
// // Copy Required Long Exits 2 ...
// int CopyLongExit2(
// int start, // Start
// int count, // Number of Items for read
// double &buffer[], // Dest Buffer
// bool forceClean = true // Force To Clean buffer
// )
// {
// //
// // Update Calculations ...
// Calculate();
// //
// // Copy Items ...
// return Copy(
// start,
// count,
// longExit2Buffer,
// buffer,
// forceClean
// //
// );
// }
//
// Protected ...
protected:
//
// Private ...
private:
//
// Props ...
XXTSInputs mInputs; // Inputs ...
//
// Buffers ...
// double longExit1Buffer[];
//
// Tools ...
//
// Calculate Values Until Now ...
void Calculate()
{
//
int totalBars = CountBars();
// //
// // Short Exit 2 ...
// CopyBuffer(
// mHandler,
// X_CHE_SHORT_EXIT_2_LINE,
// 0,
// totalBars,
// shortExit2Buffer
// //
// );
}
}
//
// Tools ...