Files
xMQL5/MQLTestWorkspace/BKPS/14030322/Signallers/x-saherelm.xsp.signaller.class.mq5
T

139 lines
2.3 KiB
Plaintext

///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Class Library
// ----------------------------------------------
// Name: XSPSignaller
// Description: Signalling using X121 rules ...
//
//
// 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 "../Libraries/x-saherelm.xtrade.lib.mq5"
#include "../Classes/x-saherelm.x121.xmcycle.class.mq5"
//
// Definitions ...
//
// Class ...
class XSPSignaller : public XSignallerDescriptor
{
//
// Public ...
public:
//
// Props ...
//
// Constructor(s) ...
void XSPSignaller()
{
//
name = XSP;
Default();
}
//
// Deconstructor ...
void ~XSPSignaller() {}
//
// Override(s) ...
//
bool HasLongConditions(
X121MCycleConditions &conditions, // Market Conditions
double &sl, // Hold SL ...
double &tp // Hold TP ...
) override
{
//
bool result = false;
//
sl = 0;
tp = 0;
//
result = allowLong;
if (!result)
{
return result;
}
//
result =
//
false
//
;
//
if (result)
{
//
sl = 0;
}
//
return result;
}
//
bool HasShortConditions(
X121MCycleConditions &conditions, // Market Conditions
double &sl, // Hold SL ...
double &tp // Hold TP ...
) override
{
//
bool result = false;
//
sl = 0;
tp = 0;
//
result = allowLong;
if (!result)
{
return result;
}
//
result =
//
false
//
;
//
if (result)
{
//
sl = 0;
}
//
return result;
}
//
// Protected ...
protected:
//
// Props ...
};