"Not referenced" means "not called"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Function "CloseLoosingTrades" is not referenced and will be removed from exp-file
This is the referenced code.
void CloseLoosingTrades() {
for (int i=0; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if ( (OrderSymbol()==Symbol()) && (OrderMagicNumber()==MagicfromSymbol()) && (OrderComment()==GetCommentForOrder()) ) {
if (OrderType()==OP_BUY)
if ( iFXAnalyser(240,MODE_DIV,0)<-DVLimit*Point )
OrderClose(OrderTicket(),OrderLots(),Bid,GetSlippage(),clCloseBuy);
if (OrderType()==OP_SELL)
if ( iFXAnalyser(240,MODE_DIV,0)>DVLimit*Point )
OrderClose(OrderTicket(),OrderLots(),Ask,GetSlippage(),clCloseSell);
}
}
}
}
Could someone advise how to modify code to correct the warning.
Thanks,
Wackena