Results 1 to 2 of 2
 0 Attachment(s)    

Thread: Trying to understand better the Ilan code

  1. #1

    Question Trying to understand better the Ilan code

    Hi! I was looking at the Ilan Code and I have a doubt about the CONTINUE***

    Every time in the code when there is an order to be selected, it has a line like the following:

    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue; ***

    Is it really necessary? If yes, please could you tell me the reason? Thanks in advance for any help!
    Last edited by szmvscla; 10-16-2009 at 17:52.

  2. #2



    I haven't really looked at that EA's code, but the snippet you posted is saying, in effect, "if this order is from some other currency chart, or was placed by some other EA on this chart, skip it", assuming it comes inside a loop.

    Unless you want the EA to muck with orders it did not place, this code would be very necessary!

    Of course, there are other ways to code it. For example, the code you wanted to skip could be inside an if() whose conditions were the logical opposite of the expression you gave. That is a different style, perhaps also more lines of code. The "continue" just passes control to the loop top again, (in for loops) revving the counter, and reevaluating the condition.

    Last edited by MusicMan; 10-27-2009 at 07:44.

Similar Threads

  1. I need help i don't understand English very well... I have 2 interesting TS
    By FrancescoItalia in forum Expert advisors backtesting
    Replies: 0
    Last Post: 04-02-2011, 18:38
  2. Ilan 43
    By ekodeck in forum Ideas for expert advisors
    Replies: 1
    Last Post: 01-25-2010, 17:18
  3. Trying to understand better the Ilan code
    By szmvscla in forum MQL programming
    Replies: 6
    Last Post: 10-26-2009, 12:36

Tags for this Thread

ilan, time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts