Files
xMQL5/Libraries/x-saherelm.xtd.provider.indicators.lib.mq5
T
2024-01-25 04:09:42 +03:30

156 lines
2.9 KiB
Plaintext

///////////////////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 XTD Signal Provider Indicators Library
// ----------------------------------------------------------------
//
// 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
//
// Include Provider Inputs ...
#include "x-saherelm.xtd.provider.inputs.lib.mq5";
//
// Imports all Indicators Helper here ...
input group "XTD Provider Indicators";
#include "x-saherelm.xtd.oscillator.helper.lib.mq5";
//
int xTDMaxLengthOfInputs = 0;
int xTDCalculatedBars = 0;
//
// Init Indicators ...
bool XTDInitIndicators()
{
//
bool result = false;
//
// Check and Calculate Max Length in Inputs ...
xTDMaxLengthOfInputs = MathMax(
xTDLength,
xTDMaxLengthOfInputs);
//
// Initialize Indicator/Oscillator Handlers ...
ResetLastError();
//
// XTD Init ...
result = XTDInitHandlers();
if (!result)
{
return result;
}
//
result = true;
//
return result;
}
//
// Release Indicators ...
void XTDReleaseIndicators()
{
//
// Release Handlers ...
XTDReleaseHandlers();
}
//
// Handle Reading Buffers ...
void XTDHandleReadingBuffers()
{
//
// Reading Calculated Bars for a Simple Handler ...
xTDCalculatedBars = BarsCalculated(xTDHandler);
//
// Read Indicators Buffers ...
XTDReadBuffers(xTDNumberOfItemsPerTick);
}
//
//
// START Combination Functions ...
//
//
//
// Can Open Long Trade ...
// this is a Function will Check all market Conditions and get all
// Strategy requirement Verifications for Long Signals ...
bool XTDCanOpenLongTrade() {
//
bool result = false;
//
result = XTDHasLongConditions(xTDNumberOfItemsPerTick);
//
// if (result) {
// LogMessage("Salam");
// }
//
return result;
}
//
// Can Close Long Trade ...
// this is a Function will Check all market Conditions and get all
// Strategy requirement Verifications for Long Signals ...
bool XTDCanCloseLongTrade() {
//
bool result = false;
//
return result;
}
//
// Can Open Short Trade ...
// this is a Function will Check all market Conditions and get all
// Strategy requirement Verifications for Short Signals ...
bool XTDCanOpenShortTrade() {
//
bool result = false;
//
result = XTDHasShortConditions(xTDNumberOfItemsPerTick);
//
return result;
}
//
// Can Close Short Trade ...
// this is a Function will Check all market Conditions and get all
// Strategy requirement Verifications for Short Signals ...
bool XTDCanCloseShortTrade() {
//
bool result = false;
//
return result;
}
//
//
// END Combination Functions ...
//
//