update tasks and add multi asset ...
This commit is contained in:
@@ -8018,3 +8018,125 @@ void HandleStrategiesOnTick()
|
||||
// sl = pvConditions.fib4s[cIndex];
|
||||
// }
|
||||
// }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
XSymbolParser symbolParser;
|
||||
|
||||
//
|
||||
bool useEURUSD = false;
|
||||
bool useUSDCHF = false;
|
||||
bool useUSDJPY = false;
|
||||
bool useGBPUSD = false;
|
||||
bool useXAUUSD = false;
|
||||
|
||||
//
|
||||
bool useXTest = false;
|
||||
bool useXDTD = false;
|
||||
bool useXCHKM = false;
|
||||
|
||||
//
|
||||
// EURUSD ...
|
||||
string eurusdSymbol = "EURUSDb"; // symbolParser.GetEURUSDSymbol();
|
||||
if (useEURUSD && IsValid(eurusdSymbol))
|
||||
{
|
||||
//
|
||||
// MAGIC NUMBER ...
|
||||
long magicNumber = eaMagicNumber + 1;
|
||||
|
||||
//
|
||||
// XDTD ...
|
||||
if (useXDTD)
|
||||
{
|
||||
//
|
||||
XSCXDTDStrategy *eurusdXTDTStrategy;
|
||||
eurusdXTDTStrategy = new XSCXDTDStrategy(
|
||||
eurusdSymbol,
|
||||
PERIOD_M15,
|
||||
eaVolume,
|
||||
eaR2R, // R2R ...
|
||||
eaSlippage,
|
||||
magicNumber,
|
||||
true, // Ignore Signal Execution
|
||||
true, // Use TP SL Point
|
||||
false, // Use Max
|
||||
eaTPPoint, // TP
|
||||
eaSLPoint, // SL
|
||||
eaIgnoreTP,
|
||||
false, // eaIgnoreSL,
|
||||
eaAllowLong,
|
||||
eaAllowShort,
|
||||
eaMaxAllowedLongs, // Max Longs
|
||||
eaMaxAllowedShorts // Max Shorts
|
||||
);
|
||||
eurusdXTDTStrategy.SetAlertLogAlerts(true);
|
||||
eurusdXTDTStrategy.SetAlertEnableAlerts(true);
|
||||
eurusdXTDTStrategy.AddSignalEventHandler(OnSignalRecieved);
|
||||
RegisterStrategy(eurusdXTDTStrategy);
|
||||
}
|
||||
|
||||
//
|
||||
// XTest ...
|
||||
if (useXTest)
|
||||
{
|
||||
//
|
||||
XSCXTestStrategy *eurusdTestStrategy;
|
||||
eurusdTestStrategy = new XSCXTestStrategy(
|
||||
eurusdSymbol,
|
||||
PERIOD_M15,
|
||||
eaVolume,
|
||||
eaR2R, // R2R ...
|
||||
eaSlippage,
|
||||
magicNumber,
|
||||
true, // Ignore Signal Execution
|
||||
true, // Use TP SL Point
|
||||
false, // Use Max
|
||||
eaTPPoint, // TP
|
||||
eaSLPoint, // SL
|
||||
eaIgnoreTP,
|
||||
eaIgnoreSL,
|
||||
eaAllowLong,
|
||||
eaAllowShort,
|
||||
eaMaxAllowedLongs, // Max Longs
|
||||
eaMaxAllowedShorts // Max Shorts
|
||||
);
|
||||
eurusdTestStrategy.SetAlertLogAlerts(true);
|
||||
eurusdTestStrategy.SetAlertEnableAlerts(true);
|
||||
eurusdTestStrategy.AddSignalEventHandler(OnSignalRecieved);
|
||||
RegisterStrategy(eurusdTestStrategy);
|
||||
}
|
||||
|
||||
//
|
||||
// XCHKM ...
|
||||
if (useXCHKM)
|
||||
{
|
||||
//
|
||||
XSCXCHKMStrategy *eurusdXCHKMStrategy;
|
||||
eurusdXCHKMStrategy = new XSCXCHKMStrategy(
|
||||
eurusdSymbol,
|
||||
PERIOD_M5,
|
||||
PERIOD_H1, // Analyzing Period
|
||||
eaVolume,
|
||||
eaR2R, // R2R ...
|
||||
eaSlippage,
|
||||
magicNumber,
|
||||
true, // Ignore Signal Execution
|
||||
false, // Use TP SL Point
|
||||
false, // Use Max
|
||||
eaTPPoint, // TP
|
||||
eaSLPoint, // SL
|
||||
eaIgnoreTP,
|
||||
false, // eaIgnoreSL,
|
||||
eaAllowLong,
|
||||
eaAllowShort,
|
||||
eaMaxAllowedLongs, // Max Longs
|
||||
eaMaxAllowedShorts // Max Shorts
|
||||
);
|
||||
eurusdXCHKMStrategy.SetAlertLogAlerts(true);
|
||||
eurusdXCHKMStrategy.SetAlertEnableAlerts(true);
|
||||
eurusdXCHKMStrategy.AddSignalEventHandler(OnSignalRecieved);
|
||||
RegisterStrategy(eurusdXCHKMStrategy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user