prepare XUSPY5 temp and workspace ...

This commit is contained in:
2024-02-10 14:01:35 +03:30
parent 7a0cdc2231
commit 469414c66b
70 changed files with 89362 additions and 8 deletions
@@ -85,10 +85,21 @@ input bool xUSPY5XCHMAMNAllowLongSignals = true; // Enable Long Signals
input bool xUSPY5XCHMAMNAllowShortSignals = true; // Enable Short Signals
//
bool xUSPY5IsTestMode = true;
// Check in Test Mode or not ...
bool xUSPY5IsTestMode = false;
//
// Detect max Input Length of Indicators ...
int xUSPY5MaxLengthOfInputs = 0;
//
// Detect Calculated Bars ...
int xUSPY5CalculatedBars = 0;
//
// Check prevent Double Signalling on Same Candle ...
bool xUSPY5WaitUntilNextCandle = false;
//
// Signaller Variables ...
//
@@ -297,7 +308,7 @@ bool XUSPY5InitIndicators()
//
// Make it Enable when we need to Log Market Conditions ...
// xUSPY5IsTestMode = false; // IsRunningOnTestMode();
xUSPY5IsTestMode = IsRunningOnTestMode();
//
// Check and Calculate Max Length in Inputs ...
@@ -865,7 +876,7 @@ bool XUSPY5HasLongSignal(
{
//
// Only Log Signals Time Market Conditions if is in Testing Mode ...
if (xUSPY5IsTestMode)
if (xUSPY5IsTestMode || xUSPY5EnableSignalAlerts)
{
//
XMarketConditions mConditions = xUSPY5Provider.GetLastMarketCondition();
@@ -1021,7 +1032,7 @@ bool XUSPY5HasShortSignal(
{
//
// Only Log Signals Time Market Conditions if is in Testing Mode ...
if (xUSPY5IsTestMode)
if (xUSPY5IsTestMode || xUSPY5EnableSignalAlerts)
{
//
XMarketConditions mConditions = xUSPY5Provider.GetLastMarketCondition();
@@ -63,8 +63,6 @@ input bool xUSPY5AllowShortTrades = true; // Allow Short Trades
// Risk Management Configurations ...
input group "XUSPY5 Risk Management";
//
input bool xUSPY5UseVirtualTPSl = false; // Use Virtual TP SL
//
// Trade Count ...
input int xUSPY5MaxAllowedTrades = 10; // Max Allowed Trades at Same Time
input ENUM_X_CROSS_SIGNAL_METHOD xUSPY5CrossSignalsMethod = X_CROSS_SIGNAL_REGULAR; // Handle Cross Signals Method
@@ -98,6 +96,11 @@ input int xUSPY5GuardStopoutFiredAfterTouches = 5;
input double xUSPY5BalanceFactorForOpenTrades = 0.5; // Minimum Balance for Open Trades
input double xUSPY5FreeMarginFactorForOpenTrades = 0.8; // Minimum Free Margin for Open Trades
//
// May be Used Later as Input Params ...
bool xUSPY5UseVirtualTPSl = false; // Use Virtual TP SL
bool xUSPY5EnableSignalAlerts = false; // Send Signal Alert
//
// Validate Inputs before Initialization ...
bool XUSPY5ValidateInputs()
@@ -513,6 +513,9 @@ void XUSPY5HandleOpenTrades()
// Update Reports ...
XUSPY5UpdateReports();
//
xUSPY5WaitUntilNextCandle = true;
//
// Open Long Trades ...
if (