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;
|
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
|
// Prepare Signal Dynamic Volume
|
||||||
// if Provided ...
|
// if Provided ...
|
||||||
@@ -870,6 +875,9 @@ void OnStopLossTriggered(const XDeal &deal)
|
|||||||
//
|
//
|
||||||
// Finish ...
|
// Finish ...
|
||||||
eaTradeHandler.Finish(deal);
|
eaTradeHandler.Finish(deal);
|
||||||
|
|
||||||
|
//
|
||||||
|
ReportBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -878,6 +886,9 @@ void OnTakeProfitTriggered(const XDeal &deal)
|
|||||||
//
|
//
|
||||||
// Finish ...
|
// Finish ...
|
||||||
eaTradeHandler.Finish(deal);
|
eaTradeHandler.Finish(deal);
|
||||||
|
|
||||||
|
//
|
||||||
|
ReportBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -894,6 +905,23 @@ void OnPositionForceClosed(
|
|||||||
position,
|
position,
|
||||||
comment //
|
comment //
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
ReportBalance();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void ReportBalance()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
if (!IsRunningOnTestMode())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
string msg = "Balance: " + ToString(eaTrader.mAccount.GetBalance());
|
||||||
|
eaAlert.Log(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
Reference in New Issue
Block a user