Files
MQL5Data/XFIMA/Classes/x-saherelm.xfima.expert.class.mq5
T

117 lines
2.4 KiB
Plaintext

///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Class
// -------------------------------------------------
// Name: XCXFIMAExpret ...
// Description: XFIMA Expert Class ...
//
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
// Global Properties ...
#property library
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://saherelm.ir"
#property version "1.00"
#property description "SaherElm XFIMA Expert Class"
#property strict
//
// Imports ...
#include "../../Classes/x-saherelm.x-expert.class.mq5"
#include "../Classes/x-saherelm.xfima.signaller.class.mq5"
//
// Definitions ...
//
// Implementation ...
class XCXFIMAExpret : public XCBaseExpert
{
//
// Public ...
public:
//
//
// Overrides ...
/**
* Prepare Signallers per Symbol Config ...
*
* @param symbolConfig: XSymbolTradeConfig, Symbol Trade Configurations ...
*/
void PrepareSignallers(XSymbolTradeConfig &symbolConfig) override
{
//
// Validate ...
if (!symbolConfig.IsValid())
{
return;
}
//
// Instantiate Signaller ...
//
// XFIMA Inputs ...
//
XFIMAInputs fimaInputs;
fimaInputs.Default();
fimaInputs.Hide();
//
// Instantiate Signaller Class ...
XCXFIMAStrategy1Signaller *fima1Signaller = new XCXFIMAStrategy1Signaller(
symbolConfig.symbol,
symbolConfig.period,
fimaInputs,
false // Process All Ticks ...
);
if (!fima1Signaller.IsValid())
{
//
fima1Signaller.Destroy();
delete fima1Signaller;
ZeroMemory(fima1Signaller);
return;
}
//
// Register Signaller ...
RegisterSignaller((XCBaseSignaller *)fima1Signaller);
//
// Cleanup Resources ...
fimaInputs.Clean();
ZeroMemory(fima1Signaller);
}
/**
* Additional On Tick Processing if Required ...
*
* @param barIndex: int, Specified Bar Index ...
*/
void virtual HandleOnTickAdditional(int barIndex = 0)
{
//
// Implement this if required ...
}
//
// Protected ...
protected:
//
//
// Private ...
private:
//
};
//