Initial Commit ...

This commit is contained in:
2024-01-25 04:05:58 +03:30
commit dac3101466
520 changed files with 186332 additions and 0 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,91 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL4 Draw Global Library
// ---------------------------------------------
// saherelm useful tools and definitions ...
//
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
#property library
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://www.saherelm.ir"
#property version "1.00"
#property strict
//
// Log Tag ...
static string logTag = "";
//
// Enable or Disable Logging ...
static bool enableLogging = false;
//
// Start Log Messages ...
//
//
// Logging a Message, specified for this EA ...
// using provided LogTag ...
void LogMessage(string message) {
//
if (!enableLogging) {
return;
}
//
Print(logTag, " > ", message);
}
//
// this used for logging series ...
void LogSeries(
double &series[], // which series to Log ...
int length = 0, // number of items to Log, 0 means all ...
int skip = 0 // number of items which skip before logging ...
) {
//
string msg = "";
//
int seriesSize = ArraySize(series);
if (
skip < 0
|| length < 0
|| seriesSize == 0
|| skip > seriesSize
|| skip + length > seriesSize
) {
return;
}
//
length = length == 0 ?
seriesSize :
length;
int start = skip > 1 ?
skip - 1 :
skip == 1 ?
1 :
0;
//
// Loop through series items ...
for (int i = start; i < start + length; i++) {
//
msg += StringConcatenate(
"i[", i, "]: ", series[i], ", "
);
}
//
LogMessage(msg);
}
//
// End Log Messages ...
//
@@ -0,0 +1,127 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL4 Models Global Library
// ---------------------------------------------
// saherelm useful tools and definitions ...
//
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
#property library
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://www.saherelm.ir"
#property version "1.00"
#property strict
//
// Start Models ...
//
//
// Used Indicators List ...
const string xmaIndicatorName = "x-saherelm.xma";
const string adxIndicatorName = "x-saherelm.adx";
const string oscIndicatorName = "x-saherelm.osc";
const string zigZagIndicatorName = "x-saherelm.zigzag";
//
// Direction ...
enum X_DIRECTION {
X_UP,
X_DOWN
};
//
// these are different signal types ...
enum X_SIGNAL_TYPE {
X_NONE,
X_LONG,
X_SHORT,
};
//
// we Model each signals as this type ...
struct XSignal {
int id;
X_SIGNAL_TYPE type;
double tp;
double sl;
string symbol;
datetime time;
double entryPrice;
};
//
// this is Signal Request Response model ...
struct XSignalRequest {
bool hasSignal;
X_SIGNAL_TYPE type;
XSignal signal;
};
//
// we model OSC Return Data ...
struct XOSCState {
//
double fastOSC;
double slowOSC;
//
double powerOSC;
//
double varOSC;
//
double tanFSOSC;
};
//
// Define a Model to Represent Snapshot of XMA Indicator ...
struct XMAState {
//
// Short Cycle ...
//
// FAST ...
double scFast;
//
// SLOW ...
double scSlow;
//
bool isSCTrendUp;
//
// Medium Cycle ...
//
// FAST ...
double mcFast;
//
// SLOW ...
double mcSlow;
//
// Long Cycle ...
//
// FAST ...
double lcFast;
//
// SLOW ...
double lcSlow;
//
// MIDDLEAGE ...
double marketMiddleage;
//
// PARABOLIC-SAR ...
double parabolicSAR;
};
//
// End Models ...
//
File diff suppressed because it is too large Load Diff