last ...
This commit is contained in:
@@ -53,13 +53,16 @@ input double eaConstantBalance = 0.0; // Constant Ba
|
||||
//
|
||||
// Management ...
|
||||
input group "Management";
|
||||
input bool eaAllowTrade = true; // Allow Trade on Signals
|
||||
input bool eaAllowLongs = true; // Allow Long Trades
|
||||
input bool eaAllowShorts = true; // Allow Short Trades
|
||||
input int eaMaxAllowedTradesPerDay = 3; // Max Allowed Trades per Day
|
||||
input int eaMaxAllowedSLsPerDay = 2; // Max Allowed SL(s) per Day
|
||||
input string eaSessionStartTime = ""; // Trade Start Time
|
||||
input string eaSessionEndTime = ""; // Trade End Time
|
||||
input bool eaAllowTrade = true; // Allow Trade on Signals
|
||||
input bool eaAllowLongs = true; // Allow Long Trades
|
||||
input bool eaAllowShorts = true; // Allow Short Trades
|
||||
input int eaMaxAllowedTradesPerDay = 3; // Max Allowed Trades per Day
|
||||
input int eaMaxAllowedSLsPerDay = 2; // Max Allowed SL(s) per Day
|
||||
input string eaSessionStartTime = ""; // Trade Start Time
|
||||
input string eaSessionEndTime = ""; // Trade End Time
|
||||
input int eaMaxAllowedPositions = 5; // Max Allowed Same Time Trades
|
||||
input double eaMaxAllowedSpread = 25; // Max Allowed Spread For Trade
|
||||
input double eaMaxAllowedDrawdownFactor = 0.3; // Max Allowed DrawDown for Trade
|
||||
|
||||
//
|
||||
// Alert ...
|
||||
@@ -95,11 +98,6 @@ XCXCAEASignaller *eaSignaller;
|
||||
XCXCAEATradeManager *eaTradeManager;
|
||||
XCAEAStrategyConditions eaConditions;
|
||||
|
||||
//
|
||||
int eaMaxAllowedPositions = 5;
|
||||
double eaMaxAllowedSpread = 25;
|
||||
double eaMaxAllowedDrawdownFactor = 0.3;
|
||||
|
||||
//
|
||||
string eaTag = "";
|
||||
|
||||
@@ -184,6 +182,15 @@ void OnTick()
|
||||
int count = 0;
|
||||
bool has = false;
|
||||
|
||||
//
|
||||
if (eaTimeTracker.IsNewDay())
|
||||
{
|
||||
eaTradeManager.HandleNewDay();
|
||||
}
|
||||
|
||||
//
|
||||
HandleTimeReport();
|
||||
|
||||
//
|
||||
// Handle Position Management / Protections ...
|
||||
eaTradeManager.Manage();
|
||||
@@ -383,12 +390,6 @@ void OnTick()
|
||||
eaSignal,
|
||||
eaConditions //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Do What we Want on Successfully Execution Signal ...
|
||||
Print("Signal Executed ...");
|
||||
}
|
||||
|
||||
//
|
||||
eaSignal.Clean();
|
||||
|
||||
Reference in New Issue
Block a user