Initial Commit ...
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
///////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 shpdIndicatorName = "x-saherelm.shpd";
|
||||
const string zigZagIndicatorName = "x-saherelm.zigzag";
|
||||
const string xmarketIndicatorName = "x-saherelm.xmarket";
|
||||
const string momentumIndicatorName = "x-saherelm.momentum";
|
||||
|
||||
//
|
||||
// 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;
|
||||
int ticket;
|
||||
X_SIGNAL_TYPE type;
|
||||
double tp;
|
||||
double sl;
|
||||
string symbol;
|
||||
datetime time;
|
||||
string comment;
|
||||
double entryPrice;
|
||||
};
|
||||
|
||||
//
|
||||
// this is Signal Request Response model ...
|
||||
struct XSignalRequest {
|
||||
bool hasSignal;
|
||||
X_SIGNAL_TYPE type;
|
||||
XSignal signal;
|
||||
};
|
||||
|
||||
//
|
||||
struct XMACycleState {
|
||||
double fast;
|
||||
double slow;
|
||||
};
|
||||
|
||||
//
|
||||
// Define a Model to Represent Snapshot of XMA Indicator ...
|
||||
struct XMAState {
|
||||
//
|
||||
// SC ...
|
||||
XMACycleState sc;
|
||||
|
||||
//
|
||||
// MC ...
|
||||
XMACycleState mc;
|
||||
|
||||
//
|
||||
// LC ...
|
||||
XMACycleState lc;
|
||||
|
||||
//
|
||||
// MIDDLEAGE ...
|
||||
double marketMiddleage;
|
||||
|
||||
//
|
||||
// PARABOLIC-SAR ...
|
||||
double parabolicSAR;
|
||||
};
|
||||
//
|
||||
// End Models ...
|
||||
//
|
||||
Reference in New Issue
Block a user