add supports for Report Balance on Partial Close ...
This commit is contained in:
@@ -490,7 +490,7 @@ void OnTakeProfitTriggered(const XDeal &deal)
|
||||
*
|
||||
* @param ticket: ULONG ...
|
||||
* @param position: XPosition instance ...
|
||||
* @param comment: String ...
|
||||
* @param comment: string ...
|
||||
*/
|
||||
void OnPositionForceClosed(
|
||||
const ulong ticket,
|
||||
@@ -501,6 +501,26 @@ void OnPositionForceClosed(
|
||||
eaTradeManager.HandleForceClose(position);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Position Partially Closed Event ...
|
||||
*
|
||||
* @param ticket: ULONG ...
|
||||
* @param profit: double ...
|
||||
* @param comment: string ...
|
||||
*/
|
||||
void OnPositionPartiallyClosed(
|
||||
const ulong ticket,
|
||||
const double profit,
|
||||
const string comment //
|
||||
)
|
||||
{
|
||||
eaTradeManager.HandlePartiallyClosed(
|
||||
ticket,
|
||||
profit,
|
||||
comment //
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Deals Changes ...
|
||||
*
|
||||
@@ -674,6 +694,7 @@ void InitRequirements()
|
||||
eaTrade.AddOnStopLossEventHandler(OnStopLossTriggered);
|
||||
eaTrade.AddOnTakeProfitEventHandler(OnTakeProfitTriggered);
|
||||
eaTrade.AddOnForceClosePositionEventHandler(OnPositionForceClosed);
|
||||
eaTrade.AddOnPartialClosePositionEventHandler(OnPositionPartiallyClosed);
|
||||
|
||||
//
|
||||
// EA Trae Manager ...
|
||||
|
||||
Reference in New Issue
Block a user