fix eaSession attaching in Expert class and also fix All Closed at Specific Time ...
This commit is contained in:
@@ -306,6 +306,10 @@ class XCXCATBEAExpert : public XCBase
|
||||
eaTradeManager.SaveTrades(eaSaveTrades);
|
||||
eaTradeManager.SaveSignals(eaSaveSignals);
|
||||
|
||||
//
|
||||
// Enable Force Close At ...
|
||||
eaTradeManager.SetForceCloseTradesAt(eaCloseAllOpenTradesAt);
|
||||
|
||||
//
|
||||
// Setting Trade Reports ...
|
||||
eaTradeManager
|
||||
|
||||
@@ -294,16 +294,6 @@ class XCXCATBEASignaller : XCBase
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Here we Check Active Session ...
|
||||
// and Prevent Moving forward if there is not
|
||||
// Session actives ...
|
||||
// for improvement Calculation Speeds ...
|
||||
if (!isActiveSession)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Initialize Bar ...
|
||||
bar.Init(
|
||||
@@ -331,18 +321,26 @@ class XCXCATBEASignaller : XCBase
|
||||
}
|
||||
|
||||
//
|
||||
// Check Signal Setups ...
|
||||
has = DetectSignalSetup(barIndex);
|
||||
if (has)
|
||||
// Here we Check Active Session ...
|
||||
// and Prevent Moving forward if there is not
|
||||
// Session actives ...
|
||||
// for improvement Calculation Speeds ...
|
||||
if (isActiveSession)
|
||||
{
|
||||
//
|
||||
barTraker.Waits();
|
||||
// Check Signal Setups ...
|
||||
has = DetectSignalSetup(barIndex);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
barTraker.Waits();
|
||||
|
||||
//
|
||||
AddConditionsIfNotExists();
|
||||
//
|
||||
AddConditionsIfNotExists();
|
||||
|
||||
//
|
||||
mConditions.Clean();
|
||||
//
|
||||
mConditions.Clean();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -2536,6 +2536,30 @@ class XCXCATBEATradeManager : public XCBaseAlert
|
||||
symbols[index].managedSLs += item.managedSLs;
|
||||
symbols[index].managedTPs += item.managedTPs;
|
||||
symbols[index].managedTrades += item.managedTrades;
|
||||
|
||||
//
|
||||
// Handle Remove on Managed SL based On Managed TP ...
|
||||
if (item.managedTPs > 0)
|
||||
{
|
||||
//
|
||||
symbols[index].managedSLs -= item.managedTPs;
|
||||
if (symbols[index].managedSLs < 0)
|
||||
{
|
||||
symbols[index].managedSLs = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Handle Remove on Managed TP based On Managed SL ...
|
||||
if (item.managedSLs > 0)
|
||||
{
|
||||
//
|
||||
symbols[index].managedTPs -= item.managedSLs;
|
||||
if (symbols[index].managedTPs < 0)
|
||||
{
|
||||
symbols[index].managedTPs = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user