Initial Commit ...
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SaherElm IT Center MQL5 XCHLH 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.xchlh.provider.inputs.lib.mq5";
|
||||
|
||||
//
|
||||
// Imports all Indicators Helper here ...
|
||||
input group "XCHLH Provider Indicators";
|
||||
#include "x-saherelm.xchlh.oscillator.helper.lib.mq5";
|
||||
|
||||
//
|
||||
int xCHLHMaxLengthOfInputs = 0;
|
||||
int xCHLHCalculatedBars = 0;
|
||||
|
||||
//
|
||||
// Init Indicators ...
|
||||
bool XCHLHInitIndicators()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Check and Calculate Max Length in Inputs ...
|
||||
xCHLHMaxLengthOfInputs = MathMax(
|
||||
xCHLHLcLength,
|
||||
xCHLHMcLength);
|
||||
xCHLHMaxLengthOfInputs = MathMax(
|
||||
xCHLHScLength,
|
||||
xCHLHMaxLengthOfInputs);
|
||||
xCHLHMaxLengthOfInputs = MathMax(
|
||||
xCHLHNumberOfItemsPerTick,
|
||||
xCHLHMaxLengthOfInputs);
|
||||
|
||||
//
|
||||
// Initialize Indicator/Oscillator Handlers ...
|
||||
ResetLastError();
|
||||
|
||||
//
|
||||
// XCHLH Init ...
|
||||
result = XCHLHInitHandlers();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = true;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Release Indicators ...
|
||||
void XCHLHReleaseIndicators()
|
||||
{
|
||||
//
|
||||
// Release Handlers ...
|
||||
XCHLHReleaseHandlers();
|
||||
}
|
||||
|
||||
//
|
||||
// Handle Reading Buffers ...
|
||||
void XCHLHHandleReadingBuffers()
|
||||
{
|
||||
//
|
||||
// Reading Calculated Bars for a Simple Handler ...
|
||||
xCHLHCalculatedBars = BarsCalculated(xCHLHHandler);
|
||||
|
||||
//
|
||||
// Read Indicators Buffers ...
|
||||
XCHLHReadBuffers(xCHLHNumberOfItemsPerTick);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// 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 XCHLHCanOpenLongTrade()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = XCHLHHasLongConditions(xCHLHNumberOfItemsPerTick);
|
||||
|
||||
//
|
||||
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 XCHLHCanCloseLongTrade()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// result = XCHLHHasLongCloseConditions(xCHLHNumberOfItemsPerTick);
|
||||
|
||||
//
|
||||
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 XCHLHCanOpenShortTrade()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = XCHLHHasShortConditions(xCHLHNumberOfItemsPerTick);
|
||||
|
||||
//
|
||||
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 XCHLHCanCloseShortTrade()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// result = XCHLHHasShortCloseConditions(xCHLHNumberOfItemsPerTick);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// END Combination Functions ...
|
||||
//
|
||||
//
|
||||
Reference in New Issue
Block a user