rename indicators, add temp of helpers class for each indicator ...
This commit is contained in:
@@ -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 ...
|
||||
Reference in New Issue
Block a user