attach alert to class and implement hedging in trade handler ...
This commit is contained in:
@@ -71,6 +71,10 @@ XSCBaseStrategy *strategies[];
|
||||
// Trader Instance Class ...
|
||||
XSCTrade *eaTrader;
|
||||
|
||||
//
|
||||
// Alert Class ...
|
||||
XSCAlert *eaAlert;
|
||||
|
||||
//
|
||||
// Trade Handler Instance Class ...
|
||||
XSCXTradeHandler *eaTradeHandler;
|
||||
@@ -128,6 +132,7 @@ void OnDeinit(const int reason)
|
||||
delete mCCHelper;
|
||||
|
||||
//
|
||||
delete eaAlert;
|
||||
delete eaTrader;
|
||||
delete eaTradeHandler;
|
||||
|
||||
@@ -213,6 +218,11 @@ bool InitialEA()
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Create Instance of Alert Class ...
|
||||
eaAlert = new XSCAlert();
|
||||
eaAlert.SetPrefix(ShortName);
|
||||
|
||||
//
|
||||
// Create Trader Instance ...
|
||||
eaTrader = new XSCTrade(
|
||||
@@ -411,7 +421,7 @@ void OnSignalRecieved(XSignal &signal)
|
||||
" on: " + signal.symbol +
|
||||
" in: " + ToString(signal.period) +
|
||||
" Executed Successfully ...";
|
||||
Print(msg);
|
||||
eaAlert.Alert(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user