This commit is contained in:
2024-07-19 08:08:26 +03:30
parent 70f2435c44
commit b038cc0b7e
11 changed files with 3482 additions and 308 deletions
+48 -15
View File
@@ -2,7 +2,7 @@
//
// SaherElm IT Center XTest MQL5 Expert Advisor
// -------------------------------------------------
// Name: XTestPivotsEA
// Name: XSTestEA
// Description: an Exper Advisor which used XTestSetup
// to Analyse Market ...
//
@@ -16,11 +16,11 @@
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://saherelm.ir"
#property version "1.00"
#property description "SaherElm XTestPivotsEA"
#property description "SaherElm XSTestEA"
#property strict
//
#define ShortName "XTestPivotsEA"
#define ShortName "XSTestEA"
//
// Imports ...
@@ -28,6 +28,7 @@
#include "../Helpers/x-saherelm.xcc.helper.mq5"
//
#include "../Strategies/x-saherelm.xobvg.strategy.mq5"
#include "../Strategies/x-saherelm.xsrbr.strategy.mq5"
#include "../Strategies/x-saherelm.xemrng.strategy.mq5"
@@ -50,7 +51,7 @@ double eaTPPoint = 200;
double eaSLPoint = 100;
//
double eaR2R = 1.5;
double eaR2R = 2;
//
// Variables ...
@@ -79,6 +80,9 @@ int OnInit()
return INIT_FAILED;
}
//
drawPrefix = ShortName;
//
// EventSetTimer(1);
// EventSetMillisecondTimer(100);
@@ -200,7 +204,8 @@ bool InitialEA()
//
bool useXSRBR = false;
bool useXEMRNG = true;
bool useXEMRNG = false;
bool useXOBVG = true;
//
// EURUSD ...
@@ -257,8 +262,8 @@ bool InitialEA()
eaSLPoint, // SL
eaAllowLong,
eaAllowShort,
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
X_SIGNALLING_BOTH_DIRECTIONS // X_SIGNALIING_TREND_REVERSAL_DIRECTION // X_SIGNALLING_BOTH_DIRECTIONS //
);
eurusdM15SRBRStrategy.SetAlertLogAlerts(true);
@@ -292,6 +297,34 @@ bool InitialEA()
eurusdM5EMRNGStrategy.SetAlertEnableAlerts(true);
RegisterStrategy(eurusdM5EMRNGStrategy);
}
//
// XOBVG ...
if (useXOBVG)
{
//
XSCXOBVGStrategy *eurusdM5OBVGStrategy;
eurusdM5OBVGStrategy = new XSCXOBVGStrategy(
eurusdSymbol,
PERIOD_M5,
PERIOD_H2, // Analyzing Period
eaVolume,
eaR2R, // R2R ...
eaSlippage,
magicNumber,
false, // Use TP SL Point
false, // Use Max
eaTPPoint, // TP
eaSLPoint, // SL
eaAllowLong,
eaAllowShort,
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts // Max Shorts
);
eurusdM5OBVGStrategy.SetAlertLogAlerts(true);
eurusdM5OBVGStrategy.SetAlertEnableAlerts(true);
RegisterStrategy(eurusdM5OBVGStrategy);
}
}
//
@@ -324,8 +357,8 @@ bool InitialEA()
eaSLPoint, // SL
eaAllowLong,
eaAllowShort,
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
X_SIGNALLING_BOTH_DIRECTIONS // X_SIGNALIING_TREND_REVERSAL_DIRECTION // X_SIGNALLING_BOTH_DIRECTIONS //
);
usdchfM5SRBRStrategy.SetAlertLogAlerts(true);
@@ -391,8 +424,8 @@ bool InitialEA()
eaSLPoint, // SL
eaAllowLong,
eaAllowShort,
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
X_SIGNALLING_BOTH_DIRECTIONS // X_SIGNALIING_TREND_REVERSAL_DIRECTION // X_SIGNALLING_BOTH_DIRECTIONS //
);
usdjpyM5SRBRStrategy.SetAlertLogAlerts(true);
@@ -458,8 +491,8 @@ bool InitialEA()
eaSLPoint, // SL
eaAllowLong,
eaAllowShort,
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
X_SIGNALLING_BOTH_DIRECTIONS // X_SIGNALIING_TREND_REVERSAL_DIRECTION // X_SIGNALLING_BOTH_DIRECTIONS //
);
gbpusdM5SRBRStrategy.SetAlertLogAlerts(true);
@@ -525,8 +558,8 @@ bool InitialEA()
eaSLPoint, // SL
eaAllowLong,
eaAllowShort,
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
eaMaxAllowedLongs, // Max Longs
eaMaxAllowedShorts, // Max Shorts
X_SIGNALLING_BOTH_DIRECTIONS // X_SIGNALIING_TREND_REVERSAL_DIRECTION // X_SIGNALLING_BOTH_DIRECTIONS //
);
xauusdM5SRBRStrategy.SetAlertLogAlerts(true);