last works ...
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
///////////////////////////////////////////////////////
|
||||
//
|
||||
// SaherElm IT Center XTESTXXX MQL5 Expert Advisor
|
||||
// SaherElm IT Center X121EA MQL5 Expert Advisor
|
||||
// -------------------------------------------------
|
||||
// Name: XTESTXXX
|
||||
// Name: X121EA
|
||||
// Description: an Exper Advisor which used RSI and MA
|
||||
// to Analyse Market ...
|
||||
//
|
||||
@@ -16,7 +16,7 @@
|
||||
#property copyright "Copyright 2023, SaherElm IT Center"
|
||||
#property link "https://saherelm.ir"
|
||||
#property version "1.00"
|
||||
#property description "SaherElm XTESTXXX"
|
||||
#property description "SaherElm X121EA"
|
||||
#property strict
|
||||
|
||||
//
|
||||
@@ -24,23 +24,41 @@
|
||||
#include "../Classes/x-saherelm.x121.setup.xea.mq5"
|
||||
|
||||
//
|
||||
#define ShortName "XTESTXXX"
|
||||
#define ShortName "X121EA"
|
||||
|
||||
//
|
||||
// Inputs ...
|
||||
|
||||
//
|
||||
long eaMagicNumber = 78692110; // Magic Number
|
||||
int eaSlippage = 10; // Slippgae
|
||||
// Common ...
|
||||
long x121EAMagicNumber = 78692110; // Magic Number
|
||||
int x121EASlippage = 10; // Slippgae
|
||||
|
||||
//
|
||||
string eaSymbols = "EURUSDb"; // Symbols
|
||||
// Trading Symbols ...
|
||||
string x121EASymbols = "EURUSDb,GBPUSDb,XAUUSDb,USDCHFb"; // Symbols
|
||||
|
||||
//
|
||||
bool eaAllowLong = true; // Allow Long Trades
|
||||
bool eaAllowShort = true; // Allow Short Trades
|
||||
double eaVolume = 0.05; // Static Volume
|
||||
int eaReuiredVerifications = 1; // Required Verifications for Signals
|
||||
// Signals ...
|
||||
bool x121EAAllowLong = true; // Allow Long Trades
|
||||
bool x121EAAllowShort = true; // Allow Short Trades
|
||||
int x121EAReuiredSignalVerifications = 2; // Required Verifications for Signals
|
||||
|
||||
//
|
||||
// Risk Management ...
|
||||
double x121EAVolume = 0.01; // Static Volume
|
||||
double x121EATPPoint = 30; // TP Point
|
||||
double x121EASLPoint = 300; // SL Point
|
||||
bool x121EAIgnoreSL = true; // Ignore Calculated SL
|
||||
bool x121EAIgnoreTP = false; // Ignore Calculated TP
|
||||
|
||||
//
|
||||
// Alert ...
|
||||
bool x121EAEnableAlerts = true; // Enable Alerts
|
||||
bool x121EALogAlerts = true; // Log Alerts
|
||||
bool x121EAMailAlerts = false; // Mail Alerts
|
||||
bool x121EAPushAlerts = false; // Push Alerts
|
||||
bool x121EATerminalAlerts = false; // Terminal Alerts
|
||||
|
||||
//
|
||||
// Definitions ...
|
||||
@@ -49,7 +67,7 @@ int eaReuiredVerifications = 1; // Required Verifications for Signals
|
||||
// Local Variables ...
|
||||
|
||||
//
|
||||
XSCX121SetupEA *mEA;
|
||||
XSCX121SetupEA *x121EA;
|
||||
|
||||
//
|
||||
// Event Handlers ...
|
||||
@@ -90,14 +108,14 @@ void OnDeinit(const int reason)
|
||||
|
||||
//
|
||||
// De Initialize XSampleEA Providers ...
|
||||
delete mEA;
|
||||
delete x121EA;
|
||||
}
|
||||
|
||||
//
|
||||
// On Tick Handler ...
|
||||
void OnTick()
|
||||
{
|
||||
mEA.OnTick();
|
||||
x121EA.OnTick();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -113,7 +131,7 @@ bool InitialEA()
|
||||
TesterHideIndicators(true);
|
||||
|
||||
//
|
||||
result = IsValid(eaSymbols);
|
||||
result = IsValid(x121EASymbols);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
@@ -123,7 +141,7 @@ bool InitialEA()
|
||||
string symbols[];
|
||||
int symbolsCount = SplitContent(
|
||||
symbols,
|
||||
eaSymbols //
|
||||
x121EASymbols //
|
||||
);
|
||||
result = symbolsCount > 0;
|
||||
if (!result)
|
||||
@@ -132,21 +150,30 @@ bool InitialEA()
|
||||
}
|
||||
|
||||
//
|
||||
mEA = new XSCX121SetupEA(
|
||||
eaSlippage,
|
||||
eaMagicNumber //
|
||||
x121EA = new XSCX121SetupEA(
|
||||
x121EASlippage,
|
||||
x121EAMagicNumber //
|
||||
);
|
||||
|
||||
//
|
||||
// Allow Signals ...
|
||||
mEA.AllowLong(true);
|
||||
mEA.AllowShort(true);
|
||||
mEA.Volume(0.01);
|
||||
mEA.TPPoint(30);
|
||||
mEA.SLPoint(0);
|
||||
// Configure EA ...
|
||||
x121EA.Volume(x121EAVolume);
|
||||
x121EA.TPPoint(x121EATPPoint);
|
||||
x121EA.SLPoint(x121EASLPoint);
|
||||
x121EA.IgnoreSL(x121EAIgnoreSL);
|
||||
x121EA.IgnoreTP(x121EAIgnoreTP);
|
||||
x121EA.AllowLong(x121EAAllowLong);
|
||||
x121EA.AllowShort(x121EAAllowShort);
|
||||
x121EA.ReuiredSignalVerifications(x121EAReuiredSignalVerifications);
|
||||
|
||||
//
|
||||
mEA.SetAlertPrefix(ShortName);
|
||||
// Configure Alert ...
|
||||
x121EA.SetAlertPrefix(ShortName);
|
||||
x121EA.SetAlertEnableAlerts(x121EAEnableAlerts);
|
||||
x121EA.SetAlertLogAlerts(x121EALogAlerts);
|
||||
x121EA.SetAlertMailAlerts(x121EAMailAlerts);
|
||||
x121EA.SetAlertPushAlerts(x121EAPushAlerts);
|
||||
x121EA.SetAlertTerminalAlerts(x121EATerminalAlerts);
|
||||
|
||||
//
|
||||
X121SetupInputs setupInputsDefault;
|
||||
@@ -175,7 +202,7 @@ bool InitialEA()
|
||||
}
|
||||
|
||||
//
|
||||
result = mEA.AddSetup(iSetupCycle);
|
||||
result = x121EA.AddSetup(iSetupCycle);
|
||||
if (!result)
|
||||
{
|
||||
break;
|
||||
Reference in New Issue
Block a user