Initial Commit ...
This commit is contained in:
@@ -0,0 +1,150 @@
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SaherElm IT Center MQL5 XTM 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.xtm.provider.inputs.lib.mq5";
|
||||
|
||||
//
|
||||
// Imports all Indicators Helper here ...
|
||||
input group "XTM Provider Indicators";
|
||||
#include "x-saherelm.xtm.indicator.helper.lib.mq5";
|
||||
|
||||
//
|
||||
int xTMMaxLengthOfInputs = 0;
|
||||
int xTMCalculatedBars = 0;
|
||||
|
||||
//
|
||||
// Init Indicators ...
|
||||
bool XTMInitIndicators()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Check and Calculate Max Length in Inputs ...
|
||||
xTMMaxLengthOfInputs = MathMax(
|
||||
xTMMaPeriod,
|
||||
xTMMaxLengthOfInputs);
|
||||
|
||||
//
|
||||
// Initialize Indicator/Oscillator Handlers ...
|
||||
ResetLastError();
|
||||
|
||||
//
|
||||
// XTM Init ...
|
||||
result = XTMInitHandlers();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = true;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Release Indicators ...
|
||||
void XTMReleaseIndicators()
|
||||
{
|
||||
//
|
||||
// Release Handlers ...
|
||||
XTMReleaseHandlers();
|
||||
}
|
||||
|
||||
//
|
||||
// Handle Reading Buffers ...
|
||||
void XTMHandleReadingBuffers()
|
||||
{
|
||||
//
|
||||
// Reading Calculated Bars for a Simple Handler ...
|
||||
xTMCalculatedBars = BarsCalculated(xTMHandler);
|
||||
|
||||
//
|
||||
// Read Indicators Buffers ...
|
||||
XTMReadBuffers(xTMNumberOfItemsPerTick);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// 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 XTMCanOpenLongTrade() {
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = XTMHasLongConditions(xTMNumberOfItemsPerTick);
|
||||
|
||||
//
|
||||
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 XTMCanCloseLongTrade() {
|
||||
//
|
||||
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 XTMCanOpenShortTrade() {
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = XTMHasShortConditions(xTMNumberOfItemsPerTick);
|
||||
|
||||
//
|
||||
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 XTMCanCloseShortTrade() {
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// END Combination Functions ...
|
||||
//
|
||||
//
|
||||
Reference in New Issue
Block a user