add XCHICHWAP to X121 Strategy ...
This commit is contained in:
@@ -36,6 +36,10 @@
|
||||
#include "../Parsers/x-saherelm.xch.che.parser.mq5"
|
||||
#include "../Strategies/x-saherelm.xch.che.strategy.mq5"
|
||||
|
||||
//
|
||||
#include "../Parsers/x-saherelm.xch.ichwap.parser.mq5"
|
||||
#include "../Strategies/x-saherelm.xch.ichwap.strategy.mq5"
|
||||
|
||||
//
|
||||
#include "../Classes/XCObjects/x-saherelm.x-panel.class.mq5"
|
||||
|
||||
@@ -486,6 +490,10 @@ bool InitEA()
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Parsers ...
|
||||
XSymbolParser _symbolParser;
|
||||
|
||||
//
|
||||
// Bar Timer ...
|
||||
XCTInputs ctInputs;
|
||||
@@ -709,6 +717,59 @@ bool InitEA()
|
||||
//
|
||||
// Register Strategy ...
|
||||
RegisterStrategy(xchcheStrategy);
|
||||
|
||||
//
|
||||
// Register XICHWAP Strategy ...
|
||||
|
||||
//
|
||||
bool isEURUSD = _symbolParser.IsEURUSD(_Symbol);
|
||||
bool isGBPUSD = _symbolParser.IsGBPUSD(_Symbol);
|
||||
bool canRegisterICHWAP = isEURUSD ||
|
||||
isGBPUSD;
|
||||
if (canRegisterICHWAP)
|
||||
{
|
||||
//
|
||||
// Create Class Instance ...
|
||||
XSCXCHICHWAPStrategy *xchichwapStrategy;
|
||||
xchichwapStrategy = new XSCXCHICHWAPStrategy(
|
||||
_Symbol,
|
||||
_Period,
|
||||
PERIOD_H1, // Analyzing Period
|
||||
eaVolume,
|
||||
eaR2R, // R2R ...
|
||||
eaSlippage,
|
||||
eaMagicNumber,
|
||||
true, // Ignore Signal Execution
|
||||
eaUseFixedTPSLPoints, // Use TP SL Point
|
||||
false, // Use Max
|
||||
eaTPPoint, // TP
|
||||
eaSLPoint, // SL
|
||||
eaIgnoreTP,
|
||||
eaIgnoreSL,
|
||||
eaAllowLong,
|
||||
eaAllowShort,
|
||||
eaMaxAllowedLongs, // Max Longs
|
||||
eaMaxAllowedShorts // Max Shorts
|
||||
);
|
||||
|
||||
//
|
||||
// Configuere Strategy ...
|
||||
xchichwapStrategy.DrawImportantAreas(false);
|
||||
xchichwapStrategy.AddXCHSignalEventHandler(OnSignalRecieved);
|
||||
|
||||
//
|
||||
// Configure Alerts ...
|
||||
xchichwapStrategy.SetAlertPrefix(mTag);
|
||||
xchichwapStrategy.SetAlertEnableAlerts(eAEnableAlerts);
|
||||
xchichwapStrategy.SetAlertLogAlerts(eALogAlerts);
|
||||
xchichwapStrategy.SetAlertMailAlerts(eAMailAlerts);
|
||||
xchichwapStrategy.SetAlertPushAlerts(eAPushAlerts);
|
||||
xchichwapStrategy.SetAlertTerminalAlerts(eATerminalAlerts);
|
||||
|
||||
//
|
||||
// Register Strategy ...
|
||||
RegisterStrategy(xchichwapStrategy);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Multi Symbol ...
|
||||
@@ -827,6 +888,59 @@ bool InitEA()
|
||||
//
|
||||
// Register Strategy ...
|
||||
RegisterStrategy(iXCHCHEStrategy);
|
||||
|
||||
//
|
||||
// Register XICHWAP Strategy ...
|
||||
|
||||
//
|
||||
bool isEURUSD = _symbolParser.IsEURUSD(iSymbol);
|
||||
bool isGBPUSD = _symbolParser.IsGBPUSD(iSymbol);
|
||||
bool canRegisterICHWAP = isEURUSD ||
|
||||
isGBPUSD;
|
||||
if (canRegisterICHWAP)
|
||||
{
|
||||
//
|
||||
// Create Class Instance ...
|
||||
XSCXCHICHWAPStrategy *iXCHICHWAPStrategy;
|
||||
iXCHICHWAPStrategy = new XSCXCHICHWAPStrategy(
|
||||
iSymbol,
|
||||
_Period,
|
||||
PERIOD_H1, // Analyzing Period
|
||||
eaVolume,
|
||||
eaR2R, // R2R ...
|
||||
eaSlippage,
|
||||
eaMagicNumber,
|
||||
true, // Ignore Signal Execution
|
||||
eaUseFixedTPSLPoints, // Use TP SL Point
|
||||
false, // Use Max
|
||||
eaTPPoint, // TP
|
||||
eaSLPoint, // SL
|
||||
eaIgnoreTP,
|
||||
eaIgnoreSL,
|
||||
eaAllowLong,
|
||||
eaAllowShort,
|
||||
eaMaxAllowedLongs, // Max Longs
|
||||
eaMaxAllowedShorts // Max Shorts
|
||||
);
|
||||
|
||||
//
|
||||
// Configuere Strategy ...
|
||||
iXCHICHWAPStrategy.DrawImportantAreas(false);
|
||||
iXCHICHWAPStrategy.AddXCHSignalEventHandler(OnSignalRecieved);
|
||||
|
||||
//
|
||||
// Configure Alerts ...
|
||||
iXCHICHWAPStrategy.SetAlertPrefix(mTag);
|
||||
iXCHICHWAPStrategy.SetAlertEnableAlerts(eAEnableAlerts);
|
||||
iXCHICHWAPStrategy.SetAlertLogAlerts(eALogAlerts);
|
||||
iXCHICHWAPStrategy.SetAlertMailAlerts(eAMailAlerts);
|
||||
iXCHICHWAPStrategy.SetAlertPushAlerts(eAPushAlerts);
|
||||
iXCHICHWAPStrategy.SetAlertTerminalAlerts(eATerminalAlerts);
|
||||
|
||||
//
|
||||
// Register Strategy ...
|
||||
RegisterStrategy(iXCHICHWAPStrategy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user