last ...
This commit is contained in:
@@ -47,15 +47,15 @@ int eaMaxAllowedLongs = 1; // Max Allowed Long Positions
|
||||
int eaMaxAllowedShorts = 1; // Max Allowed Short Positions
|
||||
|
||||
//
|
||||
input double eaTPPoint = 100; // Static TP Point
|
||||
input double eaSLPoint = 100; // Static SL Point
|
||||
double eaTPPoint = 100; // Static TP Point
|
||||
double eaSLPoint = 100; // Static SL Point
|
||||
|
||||
//
|
||||
bool eaIgnoreTP = false; // Ignore TP
|
||||
bool eaIgnoreSL = false; // Ignore SL
|
||||
|
||||
//
|
||||
int eaMaxAllowedSLsInDay = 2;
|
||||
// int eaMaxAllowedSLsInDay = 0;
|
||||
|
||||
//
|
||||
double eaR2R = 1.5; // Risk to Reward Ratio
|
||||
@@ -64,7 +64,7 @@ double eaR2R = 1.5; // Risk to Reward Ratio
|
||||
// Variables ...
|
||||
|
||||
//
|
||||
int mNumberOfSLs = 0;
|
||||
// int mNumberOfSLs = 0;
|
||||
|
||||
//
|
||||
// Bar Style nad Time Instances ...
|
||||
@@ -80,7 +80,7 @@ XSCBaseStrategy *strategies[];
|
||||
XSCTrade *eaTrader;
|
||||
|
||||
//
|
||||
XTimeTracker eaTimeTracker;
|
||||
// XTimeTracker eaTimeTracker;
|
||||
|
||||
//
|
||||
// Alert Class ...
|
||||
@@ -179,11 +179,11 @@ void OnTimer()
|
||||
//
|
||||
HandleTradeState();
|
||||
|
||||
//
|
||||
if (eaTimeTracker.IsNewDay())
|
||||
{
|
||||
mNumberOfSLs = 0;
|
||||
}
|
||||
// //
|
||||
// if (eaTimeTracker.IsNewDay())
|
||||
// {
|
||||
// mNumberOfSLs = 0;
|
||||
// }
|
||||
}
|
||||
|
||||
//
|
||||
@@ -521,12 +521,12 @@ void OnSignalRecieved(XSignal &signal)
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
if (eaMaxAllowedSLsInDay > 0 &&
|
||||
mNumberOfSLs >= eaMaxAllowedSLsInDay)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// //
|
||||
// if (eaMaxAllowedSLsInDay > 0 &&
|
||||
// mNumberOfSLs >= eaMaxAllowedSLsInDay)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
//
|
||||
ENUM_X_SIGNAL_EXECUTION_RESULT state;
|
||||
@@ -593,11 +593,11 @@ void OnStopLossTriggered(const XDeal &deal)
|
||||
// Finish ...
|
||||
eaTradeHandler.Finish(deal);
|
||||
|
||||
//
|
||||
if (deal.profit < 0)
|
||||
{
|
||||
mNumberOfSLs++;
|
||||
}
|
||||
// //
|
||||
// if (deal.profit < 0)
|
||||
// {
|
||||
// mNumberOfSLs++;
|
||||
// }
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user