add support for Notify Raw Signals and add support for Balance Log on Testing Mode ...
This commit is contained in:
@@ -801,6 +801,11 @@ void OnSignalRecieved(
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Notify When a Raw (Unfiltered) Signal Recieved ...
|
||||
string msg = "Raw " + (IsLong(signal.type) ? "Long" : "Short") + " Signal Recieved: (" + signal.provider + "," + signal.symbol + "," + ToString(signal.period) + ") ...";
|
||||
eaAlert.Alert(msg);
|
||||
|
||||
//
|
||||
// Prepare Signal Dynamic Volume
|
||||
// if Provided ...
|
||||
@@ -870,6 +875,9 @@ void OnStopLossTriggered(const XDeal &deal)
|
||||
//
|
||||
// Finish ...
|
||||
eaTradeHandler.Finish(deal);
|
||||
|
||||
//
|
||||
ReportBalance();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -878,6 +886,9 @@ void OnTakeProfitTriggered(const XDeal &deal)
|
||||
//
|
||||
// Finish ...
|
||||
eaTradeHandler.Finish(deal);
|
||||
|
||||
//
|
||||
ReportBalance();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -894,6 +905,23 @@ void OnPositionForceClosed(
|
||||
position,
|
||||
comment //
|
||||
);
|
||||
|
||||
//
|
||||
ReportBalance();
|
||||
}
|
||||
|
||||
//
|
||||
void ReportBalance()
|
||||
{
|
||||
//
|
||||
if (!IsRunningOnTestMode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
string msg = "Balance: " + ToString(eaTrader.mAccount.GetBalance());
|
||||
eaAlert.Log(msg);
|
||||
}
|
||||
|
||||
//
|
||||
Reference in New Issue
Block a user