apply some fix on XAU5 ...
This commit is contained in:
@@ -254,14 +254,14 @@ struct XMarketConditions
|
|||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
class XCPriver : public XCBase
|
class XCProvider : public XCBase
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Public ...
|
// Public ...
|
||||||
public:
|
public:
|
||||||
//
|
//
|
||||||
// Constructor ...
|
// Constructor ...
|
||||||
XCPriver(
|
XCProvider(
|
||||||
//
|
//
|
||||||
// Common Requirements ...
|
// Common Requirements ...
|
||||||
string xSymbol, // Which Symbol is Used
|
string xSymbol, // Which Symbol is Used
|
||||||
@@ -362,7 +362,7 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Deconstructor ...
|
// Deconstructor ...
|
||||||
~XCPriver() {}
|
~XCProvider() {}
|
||||||
|
|
||||||
//
|
//
|
||||||
// START Common Functions ...
|
// START Common Functions ...
|
||||||
|
|||||||
+63
-63
@@ -17,7 +17,7 @@
|
|||||||
#property copyright "Copyright 2023, SaherElm IT Center"
|
#property copyright "Copyright 2023, SaherElm IT Center"
|
||||||
#property link "https://saherelm.ir"
|
#property link "https://saherelm.ir"
|
||||||
#property version "1.00"
|
#property version "1.00"
|
||||||
#property description "SaherElm XUSCHF5 EA"
|
#property description "SaherElm XAU5 EA"
|
||||||
#property strict
|
#property strict
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -28,9 +28,9 @@ input group "Commons";
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XCTIMER inputs ...
|
// XCTIMER inputs ...
|
||||||
input bool xUSCHF5ShowCandleTimer = true; // Show Condle Remaining Time
|
input bool xAU5ShowCandleTimer = true; // Show Condle Remaining Time
|
||||||
input color xUSCHF5CandleTimerColot = clrYellow; // Candle Timer Color
|
input color xAU5CandleTimerColot = clrYellow; // Candle Timer Color
|
||||||
input ENUM_BASE_CORNER xUSCHF5CandleTimerCorner = CORNER_RIGHT_LOWER; // Where to Show Candle Timer
|
input ENUM_BASE_CORNER xAU5CandleTimerCorner = CORNER_RIGHT_LOWER; // Where to Show Candle Timer
|
||||||
|
|
||||||
//
|
//
|
||||||
// END Inputs ...
|
// END Inputs ...
|
||||||
@@ -57,8 +57,8 @@ input ENUM_BASE_CORNER xUSCHF5CandleTimerCorner = CORNER_RIGHT_LOWER; // Where t
|
|||||||
#include "../Libraries/x-saherelm.draw.lib.mq5"
|
#include "../Libraries/x-saherelm.draw.lib.mq5"
|
||||||
|
|
||||||
//
|
//
|
||||||
// XUSCHF5 Signal Provider ...
|
// XAU5 Signal Provider ...
|
||||||
#include "../Providers/x-saherelm.xuschf5.provider.lib.mq5"
|
#include "../Providers/x-saherelm.xau5.provider.lib.mq5"
|
||||||
|
|
||||||
//
|
//
|
||||||
// END Including Providers ...
|
// END Including Providers ...
|
||||||
@@ -67,13 +67,13 @@ input ENUM_BASE_CORNER xUSCHF5CandleTimerCorner = CORNER_RIGHT_LOWER; // Where t
|
|||||||
//
|
//
|
||||||
// START Global Definitions: Variables, Properties and etc ...
|
// START Global Definitions: Variables, Properties and etc ...
|
||||||
//
|
//
|
||||||
bool isXUSCHF5NewHour;
|
bool isXAU5NewHour;
|
||||||
bool isXUSCHF5NewDay;
|
bool isXAU5NewDay;
|
||||||
bool isXUSCHF5NewWeek;
|
bool isXAU5NewWeek;
|
||||||
bool isXUSCHF5NewMonth;
|
bool isXAU5NewMonth;
|
||||||
|
|
||||||
//
|
//
|
||||||
int xUSCHF5CTimerHandler = INVALID_HANDLE;
|
int xAU5CTimerHandler = INVALID_HANDLE;
|
||||||
//
|
//
|
||||||
// END Global Definitions: Variables, Properties and etc ...
|
// END Global Definitions: Variables, Properties and etc ...
|
||||||
//
|
//
|
||||||
@@ -87,7 +87,7 @@ int xUSCHF5CTimerHandler = INVALID_HANDLE;
|
|||||||
int OnInit()
|
int OnInit()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
logTag = "XUSCHF5EA";
|
logTag = "XAU5EA";
|
||||||
drawPrefix = logTag;
|
drawPrefix = logTag;
|
||||||
alertPrefix = logTag;
|
alertPrefix = logTag;
|
||||||
|
|
||||||
@@ -107,17 +107,17 @@ int OnInit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize XUSCHF5 Provider ...
|
// Initialize XAU5 Provider ...
|
||||||
if (!XUSCHF5InitSignalProviderLibrary())
|
if (!XAU5InitSignalProviderLibrary())
|
||||||
{
|
{
|
||||||
return INIT_PARAMETERS_INCORRECT;
|
return INIT_PARAMETERS_INCORRECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Init XCTimer ...
|
// Init XCTimer ...
|
||||||
if (xUSCHF5ShowCandleTimer)
|
if (xAU5ShowCandleTimer)
|
||||||
{
|
{
|
||||||
if (!XUSCHF5CTimerInit())
|
if (!XAU5CTimerInit())
|
||||||
{
|
{
|
||||||
return INIT_FAILED;
|
return INIT_FAILED;
|
||||||
}
|
}
|
||||||
@@ -148,15 +148,15 @@ void OnDeinit(const int reason)
|
|||||||
// Here we can handle De Initialization Reasons ...
|
// Here we can handle De Initialization Reasons ...
|
||||||
|
|
||||||
//
|
//
|
||||||
// De Initialize XUSCHF5 Provider ...
|
// De Initialize XAU5 Provider ...
|
||||||
XUSCHF5DeinitSignalProviderLibrary(reason);
|
XAU5DeinitSignalProviderLibrary(reason);
|
||||||
|
|
||||||
//
|
//
|
||||||
// De Init XDraw Library ...
|
// De Init XDraw Library ...
|
||||||
// OnDeinitDrawLibrary();
|
// OnDeinitDrawLibrary();
|
||||||
|
|
||||||
//
|
//
|
||||||
IndicatorRelease(xUSCHF5CTimerHandler);
|
IndicatorRelease(xAU5CTimerHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -166,15 +166,15 @@ void OnTick()
|
|||||||
//
|
//
|
||||||
// Handle Monthly Alert ...
|
// Handle Monthly Alert ...
|
||||||
bool isFirstMonth = xMonth == -1;
|
bool isFirstMonth = xMonth == -1;
|
||||||
isXUSCHF5NewMonth = IsNewMonth();
|
isXAU5NewMonth = IsNewMonth();
|
||||||
bool canMonthlyAlert =
|
bool canMonthlyAlert =
|
||||||
isXUSCHF5NewMonth &&
|
isXAU5NewMonth &&
|
||||||
xUSCHF5EnableAlerts &&
|
xAU5EnableAlerts &&
|
||||||
xUSCHF5EnableMonthlyAlerts;
|
xAU5EnableMonthlyAlerts;
|
||||||
bool canMonthlyReport =
|
bool canMonthlyReport =
|
||||||
!isFirstMonth &&
|
!isFirstMonth &&
|
||||||
canMonthlyAlert &&
|
canMonthlyAlert &&
|
||||||
xUSCHF5EnableMonthlyReports;
|
xAU5EnableMonthlyReports;
|
||||||
if (canMonthlyAlert)
|
if (canMonthlyAlert)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -185,7 +185,7 @@ void OnTick()
|
|||||||
if (canMonthlyReport)
|
if (canMonthlyReport)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
string report = xUSCHF5Reporter.GenerateReportString(XREPORT_MONTHLY);
|
string report = xAU5Reporter.GenerateReportString(XREPORT_MONTHLY);
|
||||||
|
|
||||||
//
|
//
|
||||||
message = "Last Month Report:\n" + report;
|
message = "Last Month Report:\n" + report;
|
||||||
@@ -193,7 +193,7 @@ void OnTick()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Reset Report ...
|
// Reset Report ...
|
||||||
xUSCHF5Reporter.Reset(XREPORT_MONTHLY);
|
xAU5Reporter.Reset(XREPORT_MONTHLY);
|
||||||
|
|
||||||
//
|
//
|
||||||
SendAlert(message);
|
SendAlert(message);
|
||||||
@@ -202,15 +202,15 @@ void OnTick()
|
|||||||
//
|
//
|
||||||
// Handle Weekly Alert ...
|
// Handle Weekly Alert ...
|
||||||
bool isFirstWeek = xDayOfWeek == -1;
|
bool isFirstWeek = xDayOfWeek == -1;
|
||||||
isXUSCHF5NewWeek = IsNewWeek();
|
isXAU5NewWeek = IsNewWeek();
|
||||||
bool canWeeklyAlert =
|
bool canWeeklyAlert =
|
||||||
isXUSCHF5NewWeek &&
|
isXAU5NewWeek &&
|
||||||
xUSCHF5EnableAlerts &&
|
xAU5EnableAlerts &&
|
||||||
xUSCHF5EnableWeeklyAlerts;
|
xAU5EnableWeeklyAlerts;
|
||||||
bool canWeeklyReport =
|
bool canWeeklyReport =
|
||||||
!isFirstWeek &&
|
!isFirstWeek &&
|
||||||
canWeeklyAlert &&
|
canWeeklyAlert &&
|
||||||
xUSCHF5EnableWeeklyReports;
|
xAU5EnableWeeklyReports;
|
||||||
if (canWeeklyAlert)
|
if (canWeeklyAlert)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -221,7 +221,7 @@ void OnTick()
|
|||||||
if (canWeeklyReport)
|
if (canWeeklyReport)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
string report = xUSCHF5Reporter.GenerateReportString(XREPORT_WEEKLY);
|
string report = xAU5Reporter.GenerateReportString(XREPORT_WEEKLY);
|
||||||
|
|
||||||
//
|
//
|
||||||
message = "Last Week Report:\n" + report;
|
message = "Last Week Report:\n" + report;
|
||||||
@@ -229,7 +229,7 @@ void OnTick()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Reset Report ...
|
// Reset Report ...
|
||||||
xUSCHF5Reporter.Reset(XREPORT_WEEKLY);
|
xAU5Reporter.Reset(XREPORT_WEEKLY);
|
||||||
|
|
||||||
//
|
//
|
||||||
SendAlert(message);
|
SendAlert(message);
|
||||||
@@ -238,15 +238,15 @@ void OnTick()
|
|||||||
//
|
//
|
||||||
// Handle Daily Alert ...
|
// Handle Daily Alert ...
|
||||||
bool isFirstDay = xDay == -1;
|
bool isFirstDay = xDay == -1;
|
||||||
isXUSCHF5NewDay = IsNewDay();
|
isXAU5NewDay = IsNewDay();
|
||||||
bool canDailyAlert =
|
bool canDailyAlert =
|
||||||
isXUSCHF5NewDay &&
|
isXAU5NewDay &&
|
||||||
xUSCHF5EnableAlerts &&
|
xAU5EnableAlerts &&
|
||||||
xUSCHF5EnableDailyAlerts;
|
xAU5EnableDailyAlerts;
|
||||||
bool canDailyReport =
|
bool canDailyReport =
|
||||||
!isFirstDay &&
|
!isFirstDay &&
|
||||||
canDailyAlert &&
|
canDailyAlert &&
|
||||||
xUSCHF5EnableDailyReports;
|
xAU5EnableDailyReports;
|
||||||
if (canDailyAlert)
|
if (canDailyAlert)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -257,7 +257,7 @@ void OnTick()
|
|||||||
if (canDailyReport)
|
if (canDailyReport)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
string report = xUSCHF5Reporter.GenerateReportString(XREPORT_DAILY);
|
string report = xAU5Reporter.GenerateReportString(XREPORT_DAILY);
|
||||||
|
|
||||||
//
|
//
|
||||||
message = "Last Week Report:\n" + report;
|
message = "Last Week Report:\n" + report;
|
||||||
@@ -265,7 +265,7 @@ void OnTick()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Reset Report ...
|
// Reset Report ...
|
||||||
xUSCHF5Reporter.Reset(XREPORT_DAILY);
|
xAU5Reporter.Reset(XREPORT_DAILY);
|
||||||
|
|
||||||
//
|
//
|
||||||
SendAlert(message);
|
SendAlert(message);
|
||||||
@@ -274,11 +274,11 @@ void OnTick()
|
|||||||
//
|
//
|
||||||
// Handle Hourly Alert ...
|
// Handle Hourly Alert ...
|
||||||
bool isFirstHour = xHour == -1;
|
bool isFirstHour = xHour == -1;
|
||||||
isXUSCHF5NewHour = IsNewHour();
|
isXAU5NewHour = IsNewHour();
|
||||||
bool canHourlyAlert =
|
bool canHourlyAlert =
|
||||||
isXUSCHF5NewHour &&
|
isXAU5NewHour &&
|
||||||
xUSCHF5EnableAlerts &&
|
xAU5EnableAlerts &&
|
||||||
xUSCHF5EnableHourlyAlerts;
|
xAU5EnableHourlyAlerts;
|
||||||
if (canHourlyAlert)
|
if (canHourlyAlert)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -290,33 +290,33 @@ void OnTick()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Prevent Going Forward if user Disable it ...
|
// Prevent Going Forward if user Disable it ...
|
||||||
if (xUSCHF5EnableProvider)
|
if (xAU5EnableProvider)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Handle Processing on XUSCHF5 Signal Provider ...
|
// Handle Processing on XAU5 Signal Provider ...
|
||||||
XUSCHF5SignalProviderDoControlState();
|
XAU5SignalProviderDoControlState();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check Can Ignore Tick or not ..
|
// Check Can Ignore Tick or not ..
|
||||||
bool canIgnoreTick = xUSCHF5IsTestMode
|
bool canIgnoreTick = xAU5IsTestMode
|
||||||
? !IsNewCandle()
|
? !IsNewCandle()
|
||||||
: !IsNewCandle() && xUSCHF5WaitUntilNextCandle;
|
: !IsNewCandle() && xAU5WaitUntilNextCandle;
|
||||||
if (canIgnoreTick)
|
if (canIgnoreTick)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
xUSCHF5WaitUntilNextCandle = false;
|
xAU5WaitUntilNextCandle = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prevent Going Forward if user Disable it ...
|
// Prevent Going Forward if user Disable it ...
|
||||||
if (xUSCHF5EnableProvider)
|
if (xAU5EnableProvider)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Handle Processing on XUSCHF5 Signal Provider ...
|
// Handle Processing on XAU5 Signal Provider ...
|
||||||
XUSCHF5SignalProviderHandleTick();
|
XAU5SignalProviderHandleTick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,11 +327,11 @@ void OnTrade()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Prevent Going Forward if user Disable it ...
|
// Prevent Going Forward if user Disable it ...
|
||||||
if (xUSCHF5EnableProvider)
|
if (xAU5EnableProvider)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Handle Processing Trades on XUSCHF5 Signal Provider ...
|
// Handle Processing Trades on XAU5 Signal Provider ...
|
||||||
XUSCHF5SignalProviderHandleTrade();
|
XAU5SignalProviderHandleTrade();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,8 +354,8 @@ bool ValidateInputs()
|
|||||||
// Validate Args ...
|
// Validate Args ...
|
||||||
|
|
||||||
//
|
//
|
||||||
// Validate XUSCHF5 Provider Inputs ...
|
// Validate XAU5 Provider Inputs ...
|
||||||
result = XUSCHF5ValidateInputs();
|
result = XAU5ValidateInputs();
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -370,23 +370,23 @@ bool ValidateInputs()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool XUSCHF5CTimerInit()
|
bool XAU5CTimerInit()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
xUSCHF5CTimerHandler = iCustom(
|
xAU5CTimerHandler = iCustom(
|
||||||
_Symbol,
|
_Symbol,
|
||||||
_Period,
|
_Period,
|
||||||
"x-saherelm.xctimer.indicator",
|
"x-saherelm.xctimer.indicator",
|
||||||
//
|
//
|
||||||
// Inputs ...
|
// Inputs ...
|
||||||
xUSCHF5CandleTimerColot,
|
xAU5CandleTimerColot,
|
||||||
xUSCHF5CandleTimerCorner);
|
xAU5CandleTimerCorner);
|
||||||
|
|
||||||
//
|
//
|
||||||
if (xUSCHF5CTimerHandler == INVALID_HANDLE)
|
if (xAU5CTimerHandler == INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
+4997
-7922
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,283 @@
|
|||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// SaherElm IT Center MQL5 XAU5 Signal Provider Library Inputs
|
||||||
|
// -----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// 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 Logger ...
|
||||||
|
#include "../Libraries/x-saherelm.log.lib.mq5"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Include Classes ...
|
||||||
|
#include "../Classes/x-saherelm.class.lib.mq5"
|
||||||
|
|
||||||
|
//
|
||||||
|
input group "XAU5 Provider";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Commonly Used Configurations ...
|
||||||
|
input group "XAU5 Common";
|
||||||
|
//
|
||||||
|
// Provider ...
|
||||||
|
input bool xAU5EnableProvider = true; // Enable Provider
|
||||||
|
input int xAU5NumberOfItemsPerTick = 30; // Number Of items Readed In Each Tick
|
||||||
|
//
|
||||||
|
// Alerts ...
|
||||||
|
input bool xAU5EnableAlerts = true; // Enable Events Alert
|
||||||
|
input bool xAU5EnableHourlyAlerts = false; // Send Alert on each new Hour
|
||||||
|
input bool xAU5EnableDailyAlerts = false; // Send Alert on each new Day
|
||||||
|
input bool xAU5EnableWeeklyAlerts = false; // Send Alert on each new Week
|
||||||
|
input bool xAU5EnableMonthlyAlerts = false; // Send Alert on each new Month
|
||||||
|
//
|
||||||
|
// Reports ...
|
||||||
|
input bool xAU5EnableDailyReports = false; // Send Report on each new Day
|
||||||
|
input bool xAU5EnableWeeklyReports = false; // Send Report on each new Week
|
||||||
|
input bool xAU5EnableMonthlyReports = false; // Send Report on each new Month
|
||||||
|
|
||||||
|
//
|
||||||
|
// Trader and Expert Specific Configurations ...
|
||||||
|
input group "XAU5 Trader";
|
||||||
|
input int xAU5MagicNumber = 16940561; // Trader MagicNumber
|
||||||
|
input int xAU5Slippage = 10; // Trader Slippage
|
||||||
|
|
||||||
|
//
|
||||||
|
// Trades Management Configurations ...
|
||||||
|
input group "XAU5 Trade Management";
|
||||||
|
input bool xAU5AllowLongTrades = true; // Allow Long Trades
|
||||||
|
input bool xAU5AllowShortTrades = true; // Allow Short Trades
|
||||||
|
|
||||||
|
//
|
||||||
|
// Risk Management Configurations ...
|
||||||
|
input group "XAU5 Risk Management";
|
||||||
|
//
|
||||||
|
// Trade Count ...
|
||||||
|
input int xAU5MaxAllowedTrades = 10; // Max Allowed Trades at Same Time
|
||||||
|
input ENUM_X_CROSS_SIGNAL_METHOD xAU5CrossSignalsMethod = X_CROSS_SIGNAL_REGULAR; // Handle Cross Signals Method
|
||||||
|
//
|
||||||
|
// Max Allowed Trade Age ...
|
||||||
|
input int xAU5MaxAllowedTradeAge = 1500; // Detect Long Time Trades
|
||||||
|
input ENUM_X_GUARD_ACTIONS xAU5OldTradesAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_1; // What to do with Old Trades
|
||||||
|
//
|
||||||
|
// Trade Volume Specific Configurations ...
|
||||||
|
input double xAU5StaticVolumeFactor = 0.0001; // Static Volume baesd on Balance
|
||||||
|
input ENUM_STATIC_VOLUME_METHODS xAU5StaticVolumeMethod = X_STATIC_VOLUME_BASED_ON_BALANCE; // How to Calculate Static Volume
|
||||||
|
input double xAU5VolumeMultiplier = 0; // Volume Increase Multiplier
|
||||||
|
input double xAU5ApplyVolumeMultiplierFactor = 0; // Apply Volume Multiplier Rate based on Balance
|
||||||
|
input double xAU5MaxSupportedVolumePerTradeFactor = 0; // Max Supported Volume Per Trade Factor based on Balance
|
||||||
|
input double xAU5IncreasedMaxSupportedVolumeRate = 0; // Increase Max Supported Volume based on Balance
|
||||||
|
//
|
||||||
|
// Trade Profits ...
|
||||||
|
input double xAU5MinRewardInPips = 60; // Minimum Reward Per Trade in Pips
|
||||||
|
input double xAU5RiskFreeStepInPips = 0; // Make Trades Risk Free Steps in Pips
|
||||||
|
input double xAU5RiskFreeRate = 0; // Volume Multiplier for Risk Free Trades
|
||||||
|
//
|
||||||
|
// Guard Riskable Money and Profits ...
|
||||||
|
input double xAU5CriticalDrawDownFactor = 0.20; // Critical Allowed Drawdown Factor based on Balance
|
||||||
|
input ENUM_X_GUARD_ACTIONS xAU5CriticalGuardAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_1; // Specify Guard Action on Critical Drawdown
|
||||||
|
input double xAU5MaxAllowedDrawDownFactor = 0.25; // Max Allowed Drawdown Factor based on Balance
|
||||||
|
input ENUM_X_GUARD_ACTIONS xAU5MaxAllowedGuardAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_5; // Specify Guard Action on Max Allowed Drawdown
|
||||||
|
input int xAU5GuardStopoutFiredAfterTouches = 5; // Guard Stopout all Trades if Max Allowed Drawdown touched
|
||||||
|
|
||||||
|
//
|
||||||
|
// Account Conditions for Trading ...
|
||||||
|
input double xAU5BalanceFactorForOpenTrades = 0.5; // Minimum Balance for Open Trades
|
||||||
|
input double xAU5FreeMarginFactorForOpenTrades = 0.8; // Minimum Free Margin for Open Trades
|
||||||
|
|
||||||
|
//
|
||||||
|
// May be Used Later as Input Params ...
|
||||||
|
bool xAU5UseVirtualTPSl = false; // Use Virtual TP SL
|
||||||
|
bool xAU5EnableSignalAlerts = false; // Send Signal Alert
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate Inputs before Initialization ...
|
||||||
|
bool XAU5ValidateInputs()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Implement Other Verifications ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Trading Availability ...
|
||||||
|
bool isTradeAvailable = xAU5AllowLongTrades || xAU5AllowShortTrades;
|
||||||
|
if (!isTradeAvailable)
|
||||||
|
{
|
||||||
|
LogMessage("XAU5 => Warning: Trading disabled ...");
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Chekc Number of reading items per tick ...
|
||||||
|
result = xAU5NumberOfItemsPerTick >= 5;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 invalid Number of items Reading Per Tick ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Max Allowed Trades Count ...
|
||||||
|
result = isTradeAvailable && xAU5MaxAllowedTrades >= 1;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Number of Trades not valid ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Free Margin ...
|
||||||
|
result =
|
||||||
|
isTradeAvailable &&
|
||||||
|
xAU5FreeMarginFactorForOpenTrades > 0 &&
|
||||||
|
xAU5FreeMarginFactorForOpenTrades < 1;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Invalid Free Margin ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check min Balance for Open Trades ...
|
||||||
|
result =
|
||||||
|
isTradeAvailable &&
|
||||||
|
xAU5BalanceFactorForOpenTrades > 0 &&
|
||||||
|
xAU5BalanceFactorForOpenTrades < 1;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Invalid Min Balance for Open Trades ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Min Reward Per Trade ...
|
||||||
|
result = xAU5MinRewardInPips > 0;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Invalid Min Reward Per Trade ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Trades Volume ...
|
||||||
|
result = xAU5StaticVolumeFactor > 0;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Invalid Static Volume ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Volume Multiplier ...
|
||||||
|
result = xAU5VolumeMultiplier >= 0;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Invalid Volume Multiplier ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
result =
|
||||||
|
xAU5CriticalDrawDownFactor == 0 || (xAU5CriticalDrawDownFactor > 0 &&
|
||||||
|
xAU5CriticalDrawDownFactor < 1);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Invalid Critical DrawDown Factor ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
result =
|
||||||
|
xAU5MaxAllowedDrawDownFactor == 0 || (xAU5MaxAllowedDrawDownFactor > 0 &&
|
||||||
|
xAU5MaxAllowedDrawDownFactor < 1);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Invalid Max Allowed DrawDown Factor ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Guard Actions ...
|
||||||
|
//
|
||||||
|
result =
|
||||||
|
xAU5CriticalDrawDownFactor > 0 &&
|
||||||
|
xAU5CriticalDrawDownFactor < 1 &&
|
||||||
|
xAU5MaxAllowedDrawDownFactor > 0 &&
|
||||||
|
xAU5MaxAllowedDrawDownFactor < 1;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 For Critical Drawdown, you have to Specify Max Drawdown also ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
result = xAU5CriticalDrawDownFactor > 0 && xAU5CriticalDrawDownFactor < xAU5MaxAllowedDrawDownFactor;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
LogMessage("XAU5 Critical Drawdown must Smaller than Max Drawdown ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (xAU5CriticalDrawDownFactor > 0 && xAU5CriticalGuardAction == X_GUARD_DO_NOTHING)
|
||||||
|
{
|
||||||
|
LogMessage("XAU5 IMPORTANT you Specified Critical Drawdown, but there is no any Guard Action ...");
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (xAU5MaxAllowedDrawDownFactor > 0 && xAU5MaxAllowedGuardAction == X_GUARD_DO_NOTHING)
|
||||||
|
{
|
||||||
|
LogMessage("XAU5 IMPORTANT you Specified Max Allowed Drawdown, but there is no any Guard Action ...");
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
result = true;
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
+264
-264
File diff suppressed because it is too large
Load Diff
@@ -1,283 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// SaherElm IT Center MQL5 XUSCHF5 Signal Provider Library Inputs
|
|
||||||
// -----------------------------------------------------------
|
|
||||||
//
|
|
||||||
// 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 Logger ...
|
|
||||||
#include "../Libraries/x-saherelm.log.lib.mq5"
|
|
||||||
|
|
||||||
//
|
|
||||||
// Include Classes ...
|
|
||||||
#include "../Classes/x-saherelm.class.lib.mq5"
|
|
||||||
|
|
||||||
//
|
|
||||||
input group "XUSCHF5 Provider";
|
|
||||||
|
|
||||||
//
|
|
||||||
// Commonly Used Configurations ...
|
|
||||||
input group "XUSCHF5 Common";
|
|
||||||
//
|
|
||||||
// Provider ...
|
|
||||||
input bool xUSCHF5EnableProvider = true; // Enable Provider
|
|
||||||
input int xUSCHF5NumberOfItemsPerTick = 30; // Number Of items Readed In Each Tick
|
|
||||||
//
|
|
||||||
// Alerts ...
|
|
||||||
input bool xUSCHF5EnableAlerts = true; // Enable Events Alert
|
|
||||||
input bool xUSCHF5EnableHourlyAlerts = false; // Send Alert on each new Hour
|
|
||||||
input bool xUSCHF5EnableDailyAlerts = false; // Send Alert on each new Day
|
|
||||||
input bool xUSCHF5EnableWeeklyAlerts = false; // Send Alert on each new Week
|
|
||||||
input bool xUSCHF5EnableMonthlyAlerts = true; // Send Alert on each new Month
|
|
||||||
//
|
|
||||||
// Reports ...
|
|
||||||
input bool xUSCHF5EnableDailyReports = false; // Send Report on each new Day
|
|
||||||
input bool xUSCHF5EnableWeeklyReports = false; // Send Report on each new Week
|
|
||||||
input bool xUSCHF5EnableMonthlyReports = true; // Send Report on each new Month
|
|
||||||
|
|
||||||
//
|
|
||||||
// Trader and Expert Specific Configurations ...
|
|
||||||
input group "XUSCHF5 Trader";
|
|
||||||
input int xUSCHF5MagicNumber = 16940562; // Trader MagicNumber
|
|
||||||
input int xUSCHF5Slippage = 10; // Trader Slippage
|
|
||||||
|
|
||||||
//
|
|
||||||
// Trades Management Configurations ...
|
|
||||||
input group "XUSCHF5 Trade Management";
|
|
||||||
input bool xUSCHF5AllowLongTrades = true; // Allow Long Trades
|
|
||||||
input bool xUSCHF5AllowShortTrades = true; // Allow Short Trades
|
|
||||||
|
|
||||||
//
|
|
||||||
// Risk Management Configurations ...
|
|
||||||
input group "XUSCHF5 Risk Management";
|
|
||||||
//
|
|
||||||
// Trade Count ...
|
|
||||||
input int xUSCHF5MaxAllowedTrades = 10; // Max Allowed Trades at Same Time
|
|
||||||
input ENUM_X_CROSS_SIGNAL_METHOD xUSCHF5CrossSignalsMethod = X_CROSS_SIGNAL_REGULAR; // Handle Cross Signals Method
|
|
||||||
//
|
|
||||||
// Max Allowed Trade Age ...
|
|
||||||
input int xUSCHF5MaxAllowedTradeAge = 1500; // Detect Long Time Trades
|
|
||||||
input ENUM_X_GUARD_ACTIONS xUSCHF5OldTradesAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_1; // What to do with Old Trades
|
|
||||||
//
|
|
||||||
// Trade Volume Specific Configurations ...
|
|
||||||
input double xUSCHF5StaticVolumeFactor = 0.0001; // Static Volume baesd on Balance
|
|
||||||
input ENUM_STATIC_VOLUME_METHODS xUSCHF5StaticVolumeMethod = X_STATIC_VOLUME_BASED_ON_BALANCE; // How to Calculate Static Volume
|
|
||||||
input double xUSCHF5VolumeMultiplier = 0; // Volume Increase Multiplier
|
|
||||||
input double xUSCHF5ApplyVolumeMultiplierFactor = 0; // Apply Volume Multiplier Rate based on Balance
|
|
||||||
input double xUSCHF5MaxSupportedVolumePerTradeFactor = 0; // Max Supported Volume Per Trade Factor based on Balance
|
|
||||||
input double xUSCHF5IncreasedMaxSupportedVolumeRate = 0; // Increase Max Supported Volume based on Balance
|
|
||||||
//
|
|
||||||
// Trade Profits ...
|
|
||||||
input double xUSCHF5MinRewardInPips = 6; // Minimum Reward Per Trade in Pips
|
|
||||||
input double xUSCHF5RiskFreeStepInPips = 0; // Make Trades Risk Free Steps in Pips
|
|
||||||
input double xUSCHF5RiskFreeRate = 0; // Volume Multiplier for Risk Free Trades
|
|
||||||
//
|
|
||||||
// Guard Riskable Money and Profits ...
|
|
||||||
input double xUSCHF5CriticalDrawDownFactor = 0.15; // Critical Allowed Drawdown Factor based on Balance
|
|
||||||
input ENUM_X_GUARD_ACTIONS xUSCHF5CriticalGuardAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_5; // Specify Guard Action on Critical Drawdown
|
|
||||||
input double xUSCHF5MaxAllowedDrawDownFactor = 0.20; // Max Allowed Drawdown Factor based on Balance
|
|
||||||
input ENUM_X_GUARD_ACTIONS xUSCHF5MaxAllowedGuardAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_10; // Specify Guard Action on Max Allowed Drawdown
|
|
||||||
input int xUSCHF5GuardStopoutFiredAfterTouches = 5; // Guard Stopout all Trades if Max Allowed Drawdown touched
|
|
||||||
|
|
||||||
//
|
|
||||||
// Account Conditions for Trading ...
|
|
||||||
input double xUSCHF5BalanceFactorForOpenTrades = 0.5; // Minimum Balance for Open Trades
|
|
||||||
input double xUSCHF5FreeMarginFactorForOpenTrades = 0.8; // Minimum Free Margin for Open Trades
|
|
||||||
|
|
||||||
//
|
|
||||||
// May be Used Later as Input Params ...
|
|
||||||
bool xUSCHF5UseVirtualTPSl = false; // Use Virtual TP SL
|
|
||||||
bool xUSCHF5EnableSignalAlerts = false; // Send Signal Alert
|
|
||||||
|
|
||||||
//
|
|
||||||
// Validate Inputs before Initialization ...
|
|
||||||
bool XUSCHF5ValidateInputs()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
bool result = false;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Implement Other Verifications ...
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check Trading Availability ...
|
|
||||||
bool isTradeAvailable = xUSCHF5AllowLongTrades || xUSCHF5AllowShortTrades;
|
|
||||||
if (!isTradeAvailable)
|
|
||||||
{
|
|
||||||
LogMessage("XUSCHF5 => Warning: Trading disabled ...");
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Chekc Number of reading items per tick ...
|
|
||||||
result = xUSCHF5NumberOfItemsPerTick >= 5;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 invalid Number of items Reading Per Tick ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check Max Allowed Trades Count ...
|
|
||||||
result = isTradeAvailable && xUSCHF5MaxAllowedTrades >= 1;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Number of Trades not valid ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check Free Margin ...
|
|
||||||
result =
|
|
||||||
isTradeAvailable &&
|
|
||||||
xUSCHF5FreeMarginFactorForOpenTrades > 0 &&
|
|
||||||
xUSCHF5FreeMarginFactorForOpenTrades < 1;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Invalid Free Margin ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check min Balance for Open Trades ...
|
|
||||||
result =
|
|
||||||
isTradeAvailable &&
|
|
||||||
xUSCHF5BalanceFactorForOpenTrades > 0 &&
|
|
||||||
xUSCHF5BalanceFactorForOpenTrades < 1;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Invalid Min Balance for Open Trades ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check Min Reward Per Trade ...
|
|
||||||
result = xUSCHF5MinRewardInPips > 0;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Invalid Min Reward Per Trade ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check Trades Volume ...
|
|
||||||
result = xUSCHF5StaticVolumeFactor > 0;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Invalid Static Volume ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check Volume Multiplier ...
|
|
||||||
result = xUSCHF5VolumeMultiplier >= 0;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Invalid Volume Multiplier ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
result =
|
|
||||||
xUSCHF5CriticalDrawDownFactor == 0 || (xUSCHF5CriticalDrawDownFactor > 0 &&
|
|
||||||
xUSCHF5CriticalDrawDownFactor < 1);
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Invalid Critical DrawDown Factor ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
result =
|
|
||||||
xUSCHF5MaxAllowedDrawDownFactor == 0 || (xUSCHF5MaxAllowedDrawDownFactor > 0 &&
|
|
||||||
xUSCHF5MaxAllowedDrawDownFactor < 1);
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Invalid Max Allowed DrawDown Factor ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check Guard Actions ...
|
|
||||||
//
|
|
||||||
result =
|
|
||||||
xUSCHF5CriticalDrawDownFactor > 0 &&
|
|
||||||
xUSCHF5CriticalDrawDownFactor < 1 &&
|
|
||||||
xUSCHF5MaxAllowedDrawDownFactor > 0 &&
|
|
||||||
xUSCHF5MaxAllowedDrawDownFactor < 1;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 For Critical Drawdown, you have to Specify Max Drawdown also ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
result = xUSCHF5CriticalDrawDownFactor > 0 && xUSCHF5CriticalDrawDownFactor < xUSCHF5MaxAllowedDrawDownFactor;
|
|
||||||
if (!result)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
LogMessage("XUSCHF5 Critical Drawdown must Smaller than Max Drawdown ...");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
if (xUSCHF5CriticalDrawDownFactor > 0 && xUSCHF5CriticalGuardAction == X_GUARD_DO_NOTHING)
|
|
||||||
{
|
|
||||||
LogMessage("XUSCHF5 IMPORTANT you Specified Critical Drawdown, but there is no any Guard Action ...");
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
if (xUSCHF5MaxAllowedDrawDownFactor > 0 && xUSCHF5MaxAllowedGuardAction == X_GUARD_DO_NOTHING)
|
|
||||||
{
|
|
||||||
LogMessage("XUSCHF5 IMPORTANT you Specified Max Allowed Drawdown, but there is no any Guard Action ...");
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
result = true;
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
@@ -254,14 +254,14 @@ struct XMarketConditions
|
|||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
class XCPriver : public XCBase
|
class XCProvider : public XCBase
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Public ...
|
// Public ...
|
||||||
public:
|
public:
|
||||||
//
|
//
|
||||||
// Constructor ...
|
// Constructor ...
|
||||||
XCPriver(
|
XCProvider(
|
||||||
//
|
//
|
||||||
// Common Requirements ...
|
// Common Requirements ...
|
||||||
string xSymbol, // Which Symbol is Used
|
string xSymbol, // Which Symbol is Used
|
||||||
@@ -362,7 +362,7 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Deconstructor ...
|
// Deconstructor ...
|
||||||
~XCPriver() {}
|
~XCProvider() {}
|
||||||
|
|
||||||
//
|
//
|
||||||
// START Common Functions ...
|
// START Common Functions ...
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ input bool xAU5XTSFIAllowShortSignals = true; // Enable Short Signals
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XOBDLH ...
|
// XOBDLH ...
|
||||||
input group "XAU5 XOBDLH Signaller";
|
// input group "XAU5 XOBDLH Signaller";
|
||||||
input bool xAU5XOBDLHEnableSignaller = true; // Enable Signaller
|
// input bool xAU5XOBDLHEnableSignaller = true; // Enable Signaller
|
||||||
input bool xAU5XOBDLHAllowLongSignals = true; // Enable Long Signals
|
// input bool xAU5XOBDLHAllowLongSignals = true; // Enable Long Signals
|
||||||
input bool xAU5XOBDLHAllowShortSignals = true; // Enable Short Signals
|
// input bool xAU5XOBDLHAllowShortSignals = true; // Enable Short Signals
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMACC ...
|
// XCHMACC ...
|
||||||
@@ -72,17 +72,17 @@ input bool xAU5XCHMACCAllowShortSignals = true; // Enable Short Signals
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMX ...
|
// XCHMAMX ...
|
||||||
input group "XAU5 XCHMAMX Signaller";
|
// input group "XAU5 XCHMAMX Signaller";
|
||||||
input bool xAU5XCHMAMXEnableSignaller = true; // Enable Signaller
|
// input bool xAU5XCHMAMXEnableSignaller = true; // Enable Signaller
|
||||||
input bool xAU5XCHMAMXAllowLongSignals = true; // Enable Long Signals
|
// input bool xAU5XCHMAMXAllowLongSignals = true; // Enable Long Signals
|
||||||
input bool xAU5XCHMAMXAllowShortSignals = true; // Enable Short Signals
|
// input bool xAU5XCHMAMXAllowShortSignals = true; // Enable Short Signals
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMN ...
|
// XCHMAMN ...
|
||||||
input group "XAU5 XCHMAMN Signaller";
|
// input group "XAU5 XCHMAMN Signaller";
|
||||||
input bool xAU5XCHMAMNEnableSignaller = true; // Enable Signaller
|
// input bool xAU5XCHMAMNEnableSignaller = true; // Enable Signaller
|
||||||
input bool xAU5XCHMAMNAllowLongSignals = true; // Enable Long Signals
|
// input bool xAU5XCHMAMNAllowLongSignals = true; // Enable Long Signals
|
||||||
input bool xAU5XCHMAMNAllowShortSignals = true; // Enable Short Signals
|
// input bool xAU5XCHMAMNAllowShortSignals = true; // Enable Short Signals
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check in Test Mode or not ...
|
// Check in Test Mode or not ...
|
||||||
@@ -128,9 +128,9 @@ bool xAU5MXTSFIAllowShortSignals = xAU5XTSFIAllowShortSignals;
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XOBDLH ...
|
// XOBDLH ...
|
||||||
bool xAU5MXOBDLHEnableSignaller = xAU5XOBDLHEnableSignaller;
|
bool xAU5MXOBDLHEnableSignaller = false; //xAU5XOBDLHEnableSignaller;
|
||||||
bool xAU5MXOBDLHAllowLongSignals = xAU5XOBDLHAllowLongSignals;
|
bool xAU5MXOBDLHAllowLongSignals = false; //xAU5XOBDLHAllowLongSignals;
|
||||||
bool xAU5MXOBDLHAllowShortSignals = xAU5XOBDLHAllowShortSignals;
|
bool xAU5MXOBDLHAllowShortSignals = false; //xAU5XOBDLHAllowShortSignals;
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMACC ...
|
// XCHMACC ...
|
||||||
@@ -140,18 +140,18 @@ bool xAU5MXCHMACCAllowShortSignals = xAU5XCHMACCAllowShortSignals;
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMX ...
|
// XCHMAMX ...
|
||||||
bool xAU5MXCHMAMXEnableSignaller = xAU5XCHMAMXEnableSignaller;
|
bool xAU5MXCHMAMXEnableSignaller = false; // xAU5XCHMAMXEnableSignaller;
|
||||||
bool xAU5MXCHMAMXAllowLongSignals = xAU5XCHMAMXAllowLongSignals;
|
bool xAU5MXCHMAMXAllowLongSignals = false; // xAU5XCHMAMXAllowLongSignals;
|
||||||
bool xAU5MXCHMAMXAllowShortSignals = xAU5XCHMAMXAllowShortSignals;
|
bool xAU5MXCHMAMXAllowShortSignals = false; // xAU5XCHMAMXAllowShortSignals;
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMN ...
|
// XCHMAMN ...
|
||||||
bool xAU5MXCHMAMNEnableSignaller = xAU5XCHMAMNEnableSignaller;
|
bool xAU5MXCHMAMNEnableSignaller = false; // xAU5XCHMAMNEnableSignaller;
|
||||||
bool xAU5MXCHMAMNAllowLongSignals = xAU5XCHMAMNAllowLongSignals;
|
bool xAU5MXCHMAMNAllowLongSignals = false; // xAU5XCHMAMNAllowLongSignals;
|
||||||
bool xAU5MXCHMAMNAllowShortSignals = xAU5XCHMAMNAllowShortSignals;
|
bool xAU5MXCHMAMNAllowShortSignals = false; // xAU5XCHMAMNAllowShortSignals;
|
||||||
|
|
||||||
//
|
//
|
||||||
XCPriver *xAU5Provider;
|
XCProvider *xAU5Provider;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Validate Indicators Inputs ...
|
// Validate Indicators Inputs ...
|
||||||
@@ -241,8 +241,8 @@ bool XAU5ValidateIndicatorsInputs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make an Instance Of XCPriver Class for Use ...
|
// Make an Instance Of XCProvider Class for Use ...
|
||||||
xAU5Provider = new XCPriver(
|
xAU5Provider = new XCProvider(
|
||||||
//
|
//
|
||||||
// Commons ...
|
// Commons ...
|
||||||
_Symbol,
|
_Symbol,
|
||||||
@@ -436,10 +436,10 @@ bool XAU5InitIndicators()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XOBDLH ...
|
// XOBDLH ...
|
||||||
bool isXOBDLHEnable =
|
bool isXOBDLHEnable = false;
|
||||||
xAU5XOBDLHEnableSignaller &&
|
// xAU5XOBDLHEnableSignaller &&
|
||||||
(xAU5XOBDLHAllowLongSignals ||
|
// (xAU5XOBDLHAllowLongSignals ||
|
||||||
xAU5XOBDLHAllowShortSignals);
|
// xAU5XOBDLHAllowShortSignals);
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMACC ...
|
// XCHMACC ...
|
||||||
@@ -450,17 +450,17 @@ bool XAU5InitIndicators()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMX ...
|
// XCHMAMX ...
|
||||||
bool isXCHMAMXEnable =
|
bool isXCHMAMXEnable = false;
|
||||||
xAU5XCHMAMXEnableSignaller &&
|
// xAU5XCHMAMXEnableSignaller &&
|
||||||
(xAU5XCHMAMXAllowLongSignals ||
|
// (xAU5XCHMAMXAllowLongSignals ||
|
||||||
xAU5XCHMAMXAllowShortSignals);
|
// xAU5XCHMAMXAllowShortSignals);
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMN ...
|
// XCHMAMN ...
|
||||||
bool isXCHMAMNEnable =
|
bool isXCHMAMNEnable = false;
|
||||||
xAU5XCHMAMNEnableSignaller &&
|
// xAU5XCHMAMNEnableSignaller &&
|
||||||
(xAU5XCHMAMNAllowLongSignals ||
|
// (xAU5XCHMAMNAllowLongSignals ||
|
||||||
xAU5XCHMAMNAllowShortSignals);
|
// xAU5XCHMAMNAllowShortSignals);
|
||||||
|
|
||||||
//
|
//
|
||||||
bool hasSignaller =
|
bool hasSignaller =
|
||||||
@@ -1103,12 +1103,12 @@ void XAU5DisableLongSignallers()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XOBDLH ...
|
// XOBDLH ...
|
||||||
if (xAU5MXOBDLHEnableSignaller)
|
// if (xAU5MXOBDLHEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5Provider.DisbaleXOBDLHLongs();
|
// xAU5Provider.DisbaleXOBDLHLongs();
|
||||||
xAU5MXOBDLHAllowLongSignals = false;
|
// xAU5MXOBDLHAllowLongSignals = false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMACC ...
|
// XCHMACC ...
|
||||||
@@ -1121,21 +1121,21 @@ void XAU5DisableLongSignallers()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMX ...
|
// XCHMAMX ...
|
||||||
if (xAU5MXCHMAMXEnableSignaller)
|
// if (xAU5MXCHMAMXEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5Provider.DisbaleXCHMAMXLongs();
|
// xAU5Provider.DisbaleXCHMAMXLongs();
|
||||||
xAU5MXCHMAMXAllowLongSignals = false;
|
// xAU5MXCHMAMXAllowLongSignals = false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMN ...
|
// XCHMAMN ...
|
||||||
if (xAU5MXCHMAMNEnableSignaller)
|
// if (xAU5MXCHMAMNEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5Provider.DisbaleXCHMAMNLongs();
|
// xAU5Provider.DisbaleXCHMAMNLongs();
|
||||||
xAU5MXCHMAMNAllowLongSignals = false;
|
// xAU5MXCHMAMNAllowLongSignals = false;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1213,20 +1213,20 @@ void XAU5EnableLongSignallers()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XOBDLH ...
|
// XOBDLH ...
|
||||||
if (xAU5MXOBDLHEnableSignaller)
|
// if (xAU5MXOBDLHEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5MXOBDLHAllowLongSignals =
|
// xAU5MXOBDLHAllowLongSignals =
|
||||||
xAU5XOBDLHAllowLongSignals
|
// xAU5XOBDLHAllowLongSignals
|
||||||
? true
|
// ? true
|
||||||
: xAU5MXOBDLHAllowLongSignals;
|
// : xAU5MXOBDLHAllowLongSignals;
|
||||||
|
|
||||||
//
|
// //
|
||||||
if (xAU5MXOBDLHAllowLongSignals)
|
// if (xAU5MXOBDLHAllowLongSignals)
|
||||||
{
|
// {
|
||||||
xAU5Provider.EnableXOBDLHLongs();
|
// xAU5Provider.EnableXOBDLHLongs();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMACC ...
|
// XCHMACC ...
|
||||||
@@ -1247,37 +1247,37 @@ void XAU5EnableLongSignallers()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMX ...
|
// XCHMAMX ...
|
||||||
if (xAU5MXCHMAMXEnableSignaller)
|
// if (xAU5MXCHMAMXEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5MXCHMAMXAllowLongSignals =
|
// xAU5MXCHMAMXAllowLongSignals =
|
||||||
xAU5XCHMAMXAllowLongSignals
|
// xAU5XCHMAMXAllowLongSignals
|
||||||
? true
|
// ? true
|
||||||
: xAU5MXCHMAMXAllowLongSignals;
|
// : xAU5MXCHMAMXAllowLongSignals;
|
||||||
|
|
||||||
//
|
// //
|
||||||
if (xAU5MXCHMAMXAllowLongSignals)
|
// if (xAU5MXCHMAMXAllowLongSignals)
|
||||||
{
|
// {
|
||||||
xAU5Provider.EnableXCHMAMXLongs();
|
// xAU5Provider.EnableXCHMAMXLongs();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMN ...
|
// XCHMAMN ...
|
||||||
if (xAU5MXCHMAMNEnableSignaller)
|
// if (xAU5MXCHMAMNEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5MXCHMAMNAllowLongSignals =
|
// xAU5MXCHMAMNAllowLongSignals =
|
||||||
xAU5XCHMAMNAllowLongSignals
|
// xAU5XCHMAMNAllowLongSignals
|
||||||
? true
|
// ? true
|
||||||
: xAU5MXCHMAMNAllowLongSignals;
|
// : xAU5MXCHMAMNAllowLongSignals;
|
||||||
|
|
||||||
//
|
// //
|
||||||
if (xAU5MXCHMAMNAllowLongSignals)
|
// if (xAU5MXCHMAMNAllowLongSignals)
|
||||||
{
|
// {
|
||||||
xAU5Provider.EnableXCHMAMNLongs();
|
// xAU5Provider.EnableXCHMAMNLongs();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1322,12 +1322,12 @@ void XAU5DisableShortSignallers()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XOBDLH ...
|
// XOBDLH ...
|
||||||
if (xAU5MXOBDLHEnableSignaller)
|
// if (xAU5MXOBDLHEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5Provider.DisableXOBDLHShorts();
|
// xAU5Provider.DisableXOBDLHShorts();
|
||||||
xAU5MXOBDLHAllowShortSignals = false;
|
// xAU5MXOBDLHAllowShortSignals = false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMACC ...
|
// XCHMACC ...
|
||||||
@@ -1340,21 +1340,21 @@ void XAU5DisableShortSignallers()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMX ...
|
// XCHMAMX ...
|
||||||
if (xAU5MXCHMAMXEnableSignaller)
|
// if (xAU5MXCHMAMXEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5Provider.DisableXCHMAMXShorts();
|
// xAU5Provider.DisableXCHMAMXShorts();
|
||||||
xAU5MXCHMAMXAllowShortSignals = false;
|
// xAU5MXCHMAMXAllowShortSignals = false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMN ...
|
// XCHMAMN ...
|
||||||
if (xAU5MXCHMAMNEnableSignaller)
|
// if (xAU5MXCHMAMNEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5Provider.DisableXCHMAMNShorts();
|
// xAU5Provider.DisableXCHMAMNShorts();
|
||||||
xAU5MXCHMAMNAllowShortSignals = false;
|
// xAU5MXCHMAMNAllowShortSignals = false;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1432,20 +1432,20 @@ void XAU5EnableShortSignallers()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XOBDLH ...
|
// XOBDLH ...
|
||||||
if (xAU5MXOBDLHEnableSignaller)
|
// if (xAU5MXOBDLHEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5MXOBDLHAllowShortSignals =
|
// xAU5MXOBDLHAllowShortSignals =
|
||||||
xAU5XOBDLHAllowShortSignals
|
// xAU5XOBDLHAllowShortSignals
|
||||||
? true
|
// ? true
|
||||||
: xAU5MXOBDLHAllowShortSignals;
|
// : xAU5MXOBDLHAllowShortSignals;
|
||||||
|
|
||||||
//
|
// //
|
||||||
if (xAU5MXOBDLHAllowShortSignals)
|
// if (xAU5MXOBDLHAllowShortSignals)
|
||||||
{
|
// {
|
||||||
xAU5Provider.EnableXOBDLHShorts();
|
// xAU5Provider.EnableXOBDLHShorts();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMACC ...
|
// XCHMACC ...
|
||||||
@@ -1466,37 +1466,37 @@ void XAU5EnableShortSignallers()
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMX ...
|
// XCHMAMX ...
|
||||||
if (xAU5MXCHMAMXEnableSignaller)
|
// if (xAU5MXCHMAMXEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5MXCHMAMXAllowShortSignals =
|
// xAU5MXCHMAMXAllowShortSignals =
|
||||||
xAU5XCHMAMXAllowShortSignals
|
// xAU5XCHMAMXAllowShortSignals
|
||||||
? true
|
// ? true
|
||||||
: xAU5MXCHMAMXAllowShortSignals;
|
// : xAU5MXCHMAMXAllowShortSignals;
|
||||||
|
|
||||||
//
|
// //
|
||||||
if (xAU5MXCHMAMXAllowShortSignals)
|
// if (xAU5MXCHMAMXAllowShortSignals)
|
||||||
{
|
// {
|
||||||
xAU5Provider.EnableXCHMAMXShorts();
|
// xAU5Provider.EnableXCHMAMXShorts();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
// XCHMAMN ...
|
// XCHMAMN ...
|
||||||
if (xAU5MXCHMAMNEnableSignaller)
|
// if (xAU5MXCHMAMNEnableSignaller)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
xAU5MXCHMAMNAllowShortSignals =
|
// xAU5MXCHMAMNAllowShortSignals =
|
||||||
xAU5XCHMAMNAllowShortSignals
|
// xAU5XCHMAMNAllowShortSignals
|
||||||
? true
|
// ? true
|
||||||
: xAU5MXCHMAMNAllowShortSignals;
|
// : xAU5MXCHMAMNAllowShortSignals;
|
||||||
|
|
||||||
//
|
// //
|
||||||
if (xAU5MXCHMAMNAllowShortSignals)
|
// if (xAU5MXCHMAMNAllowShortSignals)
|
||||||
{
|
// {
|
||||||
xAU5Provider.EnableXCHMAMNShorts();
|
// xAU5Provider.EnableXCHMAMNShorts();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -36,15 +36,15 @@ input bool xAU5EnableProvider = true; // Enable Provider
|
|||||||
input int xAU5NumberOfItemsPerTick = 30; // Number Of items Readed In Each Tick
|
input int xAU5NumberOfItemsPerTick = 30; // Number Of items Readed In Each Tick
|
||||||
//
|
//
|
||||||
// Alerts ...
|
// Alerts ...
|
||||||
input bool xAU5EnableAlerts = true; // Enable Events Alert
|
input bool xAU5EnableAlerts = true; // Enable Events Alert
|
||||||
input bool xAU5EnableHourlyAlerts = false; // Send Alert on each new Hour
|
input bool xAU5EnableHourlyAlerts = false; // Send Alert on each new Hour
|
||||||
input bool xAU5EnableDailyAlerts = true; // Send Alert on each new Day
|
input bool xAU5EnableDailyAlerts = false; // Send Alert on each new Day
|
||||||
input bool xAU5EnableWeeklyAlerts = true; // Send Alert on each new Week
|
input bool xAU5EnableWeeklyAlerts = false; // Send Alert on each new Week
|
||||||
input bool xAU5EnableMonthlyAlerts = true; // Send Alert on each new Month
|
input bool xAU5EnableMonthlyAlerts = false; // Send Alert on each new Month
|
||||||
//
|
//
|
||||||
// Reports ...
|
// Reports ...
|
||||||
input bool xAU5EnableDailyReports = false; // Send Report on each new Day
|
input bool xAU5EnableDailyReports = false; // Send Report on each new Day
|
||||||
input bool xAU5EnableWeeklyReports = false; // Send Report on each new Week
|
input bool xAU5EnableWeeklyReports = false; // Send Report on each new Week
|
||||||
input bool xAU5EnableMonthlyReports = false; // Send Report on each new Month
|
input bool xAU5EnableMonthlyReports = false; // Send Report on each new Month
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -68,11 +68,11 @@ input int xAU5MaxAllowedTrades = 10;
|
|||||||
input ENUM_X_CROSS_SIGNAL_METHOD xAU5CrossSignalsMethod = X_CROSS_SIGNAL_REGULAR; // Handle Cross Signals Method
|
input ENUM_X_CROSS_SIGNAL_METHOD xAU5CrossSignalsMethod = X_CROSS_SIGNAL_REGULAR; // Handle Cross Signals Method
|
||||||
//
|
//
|
||||||
// Max Allowed Trade Age ...
|
// Max Allowed Trade Age ...
|
||||||
input int xAU5MaxAllowedTradeAge = 1800; // Detect Long Time Trades
|
input int xAU5MaxAllowedTradeAge = 1500; // Detect Long Time Trades
|
||||||
input ENUM_X_GUARD_ACTIONS xAU5OldTradesAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_1; // What to do with Old Trades
|
input ENUM_X_GUARD_ACTIONS xAU5OldTradesAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_1; // What to do with Old Trades
|
||||||
//
|
//
|
||||||
// Trade Volume Specific Configurations ...
|
// Trade Volume Specific Configurations ...
|
||||||
input double xAU5StaticVolumeFactor = 0.0002; // Static Volume baesd on Balance
|
input double xAU5StaticVolumeFactor = 0.0001; // Static Volume baesd on Balance
|
||||||
input ENUM_STATIC_VOLUME_METHODS xAU5StaticVolumeMethod = X_STATIC_VOLUME_BASED_ON_BALANCE; // How to Calculate Static Volume
|
input ENUM_STATIC_VOLUME_METHODS xAU5StaticVolumeMethod = X_STATIC_VOLUME_BASED_ON_BALANCE; // How to Calculate Static Volume
|
||||||
input double xAU5VolumeMultiplier = 0; // Volume Increase Multiplier
|
input double xAU5VolumeMultiplier = 0; // Volume Increase Multiplier
|
||||||
input double xAU5ApplyVolumeMultiplierFactor = 0; // Apply Volume Multiplier Rate based on Balance
|
input double xAU5ApplyVolumeMultiplierFactor = 0; // Apply Volume Multiplier Rate based on Balance
|
||||||
@@ -82,14 +82,14 @@ input double xAU5IncreasedMaxSupportedVolumeRate = 0;
|
|||||||
// Trade Profits ...
|
// Trade Profits ...
|
||||||
input double xAU5MinRewardInPips = 60; // Minimum Reward Per Trade in Pips
|
input double xAU5MinRewardInPips = 60; // Minimum Reward Per Trade in Pips
|
||||||
input double xAU5RiskFreeStepInPips = 0; // Make Trades Risk Free Steps in Pips
|
input double xAU5RiskFreeStepInPips = 0; // Make Trades Risk Free Steps in Pips
|
||||||
input double xAU5RiskFreeRate = 0; // Volume Multiplier for Risk Free Trades
|
input double xAU5RiskFreeRate = 0; // Volume Multiplier for Risk Free Trades
|
||||||
//
|
//
|
||||||
// Guard Riskable Money and Profits ...
|
// Guard Riskable Money and Profits ...
|
||||||
input double xAU5CriticalDrawDownFactor = 0.30; // Critical Allowed Drawdown Factor based on Balance
|
input double xAU5CriticalDrawDownFactor = 0.20; // Critical Allowed Drawdown Factor based on Balance
|
||||||
input ENUM_X_GUARD_ACTIONS xAU5CriticalGuardAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_5; // Specify Guard Action on Critical Drawdown
|
input ENUM_X_GUARD_ACTIONS xAU5CriticalGuardAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_1; // Specify Guard Action on Critical Drawdown
|
||||||
input double xAU5MaxAllowedDrawDownFactor = 0.40; // Max Allowed Drawdown Factor based on Balance
|
input double xAU5MaxAllowedDrawDownFactor = 0.25; // Max Allowed Drawdown Factor based on Balance
|
||||||
input ENUM_X_GUARD_ACTIONS xAU5MaxAllowedGuardAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_10; // Specify Guard Action on Max Allowed Drawdown
|
input ENUM_X_GUARD_ACTIONS xAU5MaxAllowedGuardAction = X_GUARD_PARTIAL_CLOSE_MAX_IN_DD_5; // Specify Guard Action on Max Allowed Drawdown
|
||||||
input int xAU5GuardStopoutFiredAfterTouches = 5; // Guard Stopout all Trades if Max Allowed Drawdown touched
|
input int xAU5GuardStopoutFiredAfterTouches = 5; // Guard Stopout all Trades if Max Allowed Drawdown touched
|
||||||
|
|
||||||
//
|
//
|
||||||
// Account Conditions for Trading ...
|
// Account Conditions for Trading ...
|
||||||
|
|||||||
Reference in New Issue
Block a user