| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Warnings
It means that the compiler notices that pieces of code are not being used.
The warnings you see are just optimisation messages; the compiler will not include these functions in the created executable. The original programmer may have had several reasons for writing these (now non-used) functions in the first place, but technically speaking, your expert will work without them.
__________________
Better being out, wishing to be in than being in and wishing to be out..... |
|
||||
|
Quote:
This is more of the code that references void CloseLoosingTrades() { // included by Renato 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,GetSlippa ge(),clCloseSell); double GetSlippage() { return((Ask-Bid)/Point); } |
|
||||
|
No, void here means that the function is not supposed to return anything to it's caller.
Don't worry, the function "CloseLoosingTrades" is just never being used anywhere in the main code, that's all.
__________________
Better being out, wishing to be in than being in and wishing to be out..... |
|
||||
|
Quote:
![]() |
|
||||
|
Comment unwanted code
Quote:
Just surround the code by multi-line comment /* ... */ like the example below. Code:
/*
void CloseLoosingTrades() { // included by Renato
{ ...
...
}
*/
__________________
Better being out, wishing to be in than being in and wishing to be out..... |
|
|||
|
Quote:
You can! If your aim is to blow up the account ![]()
__________________
MQL4 programming is easy ^^ |
|
||||
|
Quote:
There might be dozens of unused functions which have nothing to with the code this expert is using. It could even contain much worse code that we are unaware of. You and I do not know the functionality of this expert, so we cannot tell if this function is realy needed. If you do not agree, would you be so kind to tell him where to put the call to this routine, without having seen any of this experts code....? ![]() Cheers
__________________
Better being out, wishing to be in than being in and wishing to be out..... |
|
|||
|
That piece of code is not used for some reason. If it is not used, it can be:
removed commented out In either case things won't change. But I'm saying that if there is some function that is not used, take a look at the logic of the EA. Maybe its actually a bug?
__________________
MQL4 programming is easy ^^ |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Warning about Interbankfx | efextrader | General Discussion | 67 | 10-05-2007 03:33 PM |
| WARNING: note about saving files in MetaEditor | phazei | Metatrader 4 | 7 | 08-12-2006 09:31 AM |
| Warning : Do not update to 187 | ahwai | General Discussion | 27 | 03-19-2006 04:04 PM |