Results 1 to 7 of 7
 1 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 one:

    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!

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by szmvscla View Post
    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 one:

    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!
    Hi szmvscla,

    This line stops the loop if the symbol of the order is not the symbol of the chart where is attached the EA, the same for the magic number. Yes it is required.

    We usually use this instead :

    Code:
    if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic){
    ...
    }

  3. #3

    Arrow

    Quote Originally Posted by funyoo View Post
    Hi szmvscla,

    This line stops the loop if the symbol of the order is not the symbol of the chart where is attached the EA, the same for the magic number. Yes it is required.

    We usually use this instead :

    Code:
    if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic){
    ...
    }

    Thanks for the information! I would like to know if you have a better mq4 code for a grid system without any entry condition, I would like to add some conditions and try it, I am asking you it because sometimes the Ilan doesn't open the new position even if the price is high than the pip step, thanks a lot in advace!

  4. #4
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by szmvscla View Post
    Thanks for the information! I would like to know if you have a better mq4 code for a grid system without any entry condition, I would like to add some conditions and try it, I am asking you it because sometimes the Ilan doesn't open the new position even if the price is high than the pip step, thanks a lot in advace!
    Hi szmvscla,

    There is Level scalper v4 and CCY EURUSD EA.

  5. #5

    Exclamation

    Quote Originally Posted by funyoo View Post
    Hi szmvscla,

    There is Level scalper v4 and CCY EURUSD EA.
    Thank you!

  6. #6
    Junior Member
    Join Date
    Apr 2009
    Posts
    23

    Default Ilan Scalper

    Hi Funyoo.

    I have also used the Ilan 1.6 RSI version, and I notice that sometimes it does not trade, then I have to manually close the trade when it travels too far in the wrong direction. I did not have that problem with 1.5, but it traded too much some times.

    I have now downloaded a scalper version (attached) and it seems to not trade (at all) unless I open and close MetaTrader, then it does only 1 trade. Can you check the code to see why I am having a problem getting it to trade? I don't think it is my platform, because the other Ilans trade OK on it (most of the time).
    Attached Files Attached Files

  7. #7
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by Sneed View Post
    Hi Funyoo.

    I have also used the Ilan 1.6 RSI version, and I notice that sometimes it does not trade, then I have to manually close the trade when it travels too far in the wrong direction. I did not have that problem with 1.5, but it traded too much some times.

    I have now downloaded a scalper version (attached) and it seems to not trade (at all) unless I open and close MetaTrader, then it does only 1 trade. Can you check the code to see why I am having a problem getting it to trade? I don't think it is my platform, because the other Ilans trade OK on it (most of the time).
    Hi Sneed,

    It works fine in backtesting. In forward test, it can only come from the slippage (spread too high) or the busy trade context. Try with slippage=0.

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, 19:38
  2. Ilan 43
    By ekodeck in forum Ideas for expert advisors
    Replies: 1
    Last Post: 01-25-2010, 18:18
  3. Trying to understand better the Ilan code
    By szmvscla in forum MQL programming
    Replies: 1
    Last Post: 10-27-2009, 07:37

Tags for this Thread

backtesting, demo, eurusd, expert, grid, high, ilan, magic, magic number, metatrader, mq4, rsi, scalper, slippage, spread, system, systems, 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
  •