last ...
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
|
||||
//
|
||||
// Imports ...
|
||||
#include "../Helpers/x-saherelm.xct.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xcc.helper.mq5"
|
||||
#include "../Classes/x-saherelm.x121.setup.xea.mq5"
|
||||
|
||||
//
|
||||
@@ -42,24 +44,25 @@ input group "Signals";
|
||||
//,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb
|
||||
// EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb
|
||||
// EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb,XAUUSDb,NZDUSDb,AUDUSDb,USDCADb,BTCUSD,ETHUSD
|
||||
input string x121EASymbols = "EURUSDb"; // Symbols
|
||||
input bool x121EAUseAllSymbols = false; // Use All Available Symbols
|
||||
input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols
|
||||
input bool x121EAAllowLong = true; // Allow Long Trades
|
||||
input bool x121EAAllowShort = true; // Allow Short Trades
|
||||
input int x121EADelayBetweenTwoSignal = 5; // Delay Between two Same Signals
|
||||
input int x121EAReuiredSignalVerifications = 4; // Required Verifications for Signals
|
||||
input bool x121EAGetVerificationFromOtherTimeFrames = true; // Get Verifications from Other Time Frames
|
||||
input string x121EASymbols = "EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb"; // Symbols
|
||||
input bool x121EAUseAllSymbols = false; // Use All Available Symbols
|
||||
input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols
|
||||
input bool x121EAAllowLong = true; // Allow Long Trades
|
||||
input bool x121EAAllowShort = true; // Allow Short Trades
|
||||
input int x121EADelayBetweenTwoSignal = 5; // Delay Between two Same Signals
|
||||
input int x121EAReuiredSignalVerifications = 4; // Required Verifications for Signals
|
||||
input bool x121EAGetVerificationFromOtherTimeFrames = true; // Get Verifications from Other Time Frames
|
||||
|
||||
//
|
||||
// Risk Management ...
|
||||
input group "Risk Management";
|
||||
input double x121EAVolume = 0.02; // Static Volume
|
||||
input double x121EATPPoint = 1000; // TP Point
|
||||
input double x121EASLPoint = 1000; // SL Point
|
||||
input int x121EAMaxAllowedTrades = 2; // Max Allowed Positions
|
||||
input bool x121EAIgnoreSL = true; // Ignore Calculated SL
|
||||
input bool x121EAIgnoreTP = false; // Ignore Calculated TP
|
||||
input double x121EAVolume = 0.01; // Static Volume
|
||||
input double x121EATPPoint = 1000; // TP Point
|
||||
input double x121EASLPoint = 1000; // SL Point
|
||||
input int x121EAMaxAllowedTrades = 1; // Max Allowed Positions Per Symbol
|
||||
input bool x121EAUseMaxAllowedPerDirection = true; // Use Max Allowed Positions Per Direction
|
||||
input bool x121EAIgnoreSL = true; // Ignore Calculated SL
|
||||
input bool x121EAIgnoreTP = false; // Ignore Calculated TP
|
||||
|
||||
//
|
||||
// Protection ...
|
||||
@@ -71,11 +74,12 @@ input bool x121EACloseOnOpposit = false; // Close all Positions on Opposit
|
||||
|
||||
//
|
||||
input group "Trailling";
|
||||
input bool x121EAAllowTrailStop = true; // Enable Trailling Stop Losses
|
||||
input double x121EAFirstTrailDistance = 100; // Start Trailling Distance
|
||||
input double x121EAFirstTrailPoint = 60; // First Stop Trail
|
||||
input double x121EANextTrailDistance = 50; // Next Trailling Distance
|
||||
input double x121EANextTrailPoint = 25; // Next Trailling Step
|
||||
input bool x121EAAllowTrailStop = true; // Enable Trailling Stop Losses
|
||||
input bool x121EADisableTrailingWhenOpposit = true; // Disable Trailling When has Opposite In Drawdown
|
||||
input double x121EAFirstTrailDistance = 100; // Start Trailling Distance
|
||||
input double x121EAFirstTrailPoint = 60; // First Stop Trail
|
||||
input double x121EANextTrailDistance = 50; // Next Trailling Distance
|
||||
input double x121EANextTrailPoint = 25; // Next Trailling Step
|
||||
|
||||
//
|
||||
input group "Supporting";
|
||||
@@ -132,6 +136,10 @@ input bool x121EATerminalAlerts = false; // Terminal Alerts
|
||||
string x121EAUsedSymbols[];
|
||||
XSCX121SetupEA *x121EA;
|
||||
|
||||
//
|
||||
XSCXCTHelper *x121EACTHelper;
|
||||
XSCXCCHelper *x121EACCHelper;
|
||||
|
||||
//
|
||||
// Event Handlers ...
|
||||
|
||||
@@ -172,6 +180,10 @@ void OnDeinit(const int reason)
|
||||
//
|
||||
// De Initialize XSampleEA Providers ...
|
||||
delete x121EA;
|
||||
|
||||
//
|
||||
delete x121EACTHelper;
|
||||
delete x121EACCHelper;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -194,6 +206,36 @@ bool InitialEA()
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Bar Timer ...
|
||||
XCTInputs ctInputs;
|
||||
ctInputs.Default();
|
||||
x121EACTHelper = new XSCXCTHelper();
|
||||
result = x121EACTHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
ctInputs //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Bar Styles ...
|
||||
XCCInputs ccInputs;
|
||||
ccInputs.Default();
|
||||
x121EACCHelper = new XSCXCCHelper();
|
||||
result = x121EACCHelper.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
ccInputs //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// TesterHideIndicators(true);
|
||||
|
||||
@@ -283,6 +325,7 @@ bool InitialEA()
|
||||
x121EA.IgnoreSL(x121EAIgnoreSL);
|
||||
x121EA.IgnoreTP(x121EAIgnoreTP);
|
||||
x121EA.MaxAllowedTrades(x121EAMaxAllowedTrades);
|
||||
x121EA.UseMaxAllowedPerDirection(x121EAUseMaxAllowedPerDirection);
|
||||
|
||||
//
|
||||
// Protection ...
|
||||
@@ -301,6 +344,7 @@ bool InitialEA()
|
||||
x121EA.FirstTrailPoint(x121EAFirstTrailPoint);
|
||||
x121EA.NextTrailDistance(x121EANextTrailDistance);
|
||||
x121EA.FirstTrailDistance(x121EAFirstTrailDistance);
|
||||
x121EA.DisableTrailingWhenOpposit(x121EADisableTrailingWhenOpposit);
|
||||
|
||||
//
|
||||
// Supporting ...
|
||||
@@ -489,7 +533,7 @@ void X121ReportState()
|
||||
|
||||
//
|
||||
// Detect What we Want to Show as Comment ...
|
||||
bool isInForceState = x121EA.ForceState();
|
||||
// bool isInForceState = x121EA.ForceState();
|
||||
double bullishScore = 0; // x121EA.GetBullishScore();
|
||||
double bearishScore = 0; // x121EA.GetBearishScore();
|
||||
double drawDownPercent = x121EA.GetDrawdownPercent();
|
||||
@@ -505,8 +549,8 @@ void X121ReportState()
|
||||
"------------" + "\n"
|
||||
: "") +
|
||||
"Drawdown: " + ToString(drawDownPercent) + "%" + "\n" +
|
||||
"------------" + "\n" +
|
||||
"Force State: " + ToString(isInForceState) + "\n" +
|
||||
// "------------" + "\n" +
|
||||
// "Force State: " + ToString(isInForceState) + "\n" +
|
||||
//
|
||||
""
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user