last ...
This commit is contained in:
@@ -195,6 +195,18 @@ int OnInit()
|
||||
eaExpert.eaSaveLosts = eaSaveLosts;
|
||||
eaExpert.eaSaveRestrictions = eaSaveRestrictions;
|
||||
|
||||
//
|
||||
// Attach Event Handlers ...
|
||||
eaExpert.AddOnDealsChangedEventHandler(OnDealsChanged);
|
||||
eaExpert.AddOnStopLossEventHandler(OnStopLossTriggered);
|
||||
eaExpert.AddOnOrdersChangedEventHandler(OnOrdersChanged);
|
||||
eaExpert.AddOnTakeProfitEventHandler(OnTakeProfitTriggered);
|
||||
eaExpert.AddOnModifyPositionEventHandler(OnPositionModified);
|
||||
eaExpert.AddOnPositionsChangedEventHandler(OnPositionsChanged);
|
||||
eaExpert.AddOnTradeStateChangedEventHandler(OnTradeStateChanged);
|
||||
eaExpert.AddOnForceClosePositionEventHandler(OnPositionForceClosed);
|
||||
eaExpert.AddOnPartialClosePositionEventHandler(OnPositionPartialClosed);
|
||||
|
||||
//
|
||||
// Try to Initialize eaExpert ...
|
||||
bool isInited = eaExpert.HandleOnInit();
|
||||
@@ -278,7 +290,7 @@ void OnChartEvent(
|
||||
*/
|
||||
void OnStopLossTriggered(const XDeal &deal)
|
||||
{
|
||||
// eaExpert.HandleOnStopLossTriggered(deal);
|
||||
eaExpert.HandleOnStopLossTriggered(deal);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -288,7 +300,7 @@ void OnStopLossTriggered(const XDeal &deal)
|
||||
*/
|
||||
void OnTakeProfitTriggered(const XDeal &deal)
|
||||
{
|
||||
// eaExpert.HandleOnTakeProfitTriggered(deal);
|
||||
eaExpert.HandleOnTakeProfitTriggered(deal);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,11 +317,11 @@ void OnPositionForceClosed(
|
||||
)
|
||||
{
|
||||
//
|
||||
// eaExpert.HandleOnPositionForceClosed(
|
||||
// ticket,
|
||||
// position,
|
||||
// comment //
|
||||
// );
|
||||
eaExpert.HandleOnPositionForceClosed(
|
||||
ticket,
|
||||
position,
|
||||
comment //
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -319,7 +331,7 @@ void OnPositionForceClosed(
|
||||
*/
|
||||
void OnDealsChanged(int count)
|
||||
{
|
||||
// eaExpert.HandleOnDealsChanged(count);
|
||||
eaExpert.HandleOnDealsChanged(count);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -329,7 +341,7 @@ void OnDealsChanged(int count)
|
||||
*/
|
||||
void OnOrdersChanged(int count)
|
||||
{
|
||||
// eaExpert.HandleOnOrdersChanged(count);
|
||||
eaExpert.HandleOnOrdersChanged(count);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -339,7 +351,7 @@ void OnOrdersChanged(int count)
|
||||
*/
|
||||
void OnPositionsChanged(int count)
|
||||
{
|
||||
// eaExpert.HandleOnPositionsChanged(count);
|
||||
eaExpert.HandleOnPositionsChanged(count);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -356,11 +368,11 @@ void OnPositionModified(
|
||||
)
|
||||
{
|
||||
//
|
||||
// eaExpert.HandleOnPositionModified(
|
||||
// ticket,
|
||||
// profit,
|
||||
// comment //
|
||||
// );
|
||||
eaExpert.HandleOnPositionModified(
|
||||
ticket,
|
||||
profit,
|
||||
comment //
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -377,11 +389,11 @@ void OnPositionPartialClosed(
|
||||
)
|
||||
{
|
||||
//
|
||||
// eaExpert.HandleOnPositionPartialClosed(
|
||||
// ticket,
|
||||
// profit,
|
||||
// comment //
|
||||
// );
|
||||
eaExpert.HandleOnPositionPartialClosed(
|
||||
ticket,
|
||||
profit,
|
||||
comment //
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -391,7 +403,7 @@ void OnPositionPartialClosed(
|
||||
*/
|
||||
void OnTradeStateChanged(const XOnTradeHandlerState &state)
|
||||
{
|
||||
// eaExpert.HandleOnTradeStateChanged(state);
|
||||
eaExpert.HandleOnTradeStateChanged(state);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user