+ Reply to Thread
Page 6 of 18 FirstFirst ... 4 5 6 7 8 16 ... LastLast
Results 51 to 60 of 171
  49 49 Attachment(s)    

Thread: Belkhayate Expert Advisor

  1. #51
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    6,828

    Default

    Quote Originally Posted by way2Freedom View Post
    a stragne situation happens when there is a big moves (like more than 50 pip in a single min). I get like 10 enteries on the some TFs when there is an entry following the EA. Let me explain, on the 1H TF, on the same minute the EA open and closes 13 positions. The EA works fine as it opens only after closing the previous position but as there is huge pip moves in a single minute than I end up with 10 position on the same minute.

    How can I make signals following the EA get executed only at close of the TF, for instance if on the 1H TF, i will enter only at the end of the hour, only when the hour bar has accomplished and not in between? the same goes on all the different TFs, only enter at the close of the bar.
    Ok, here is another version. The EA will only enter one trade per bar.
    Attached Files

  2. #52
    Junior Member
    Join Date
    Dec 2008
    Posts
    28

    Default grab data for validation

    Quote Originally Posted by funyoo View Post
    Ok, here is another version. The EA will only enter one trade per bar.
    Dear Funyoo,

    The last version of your EA is working fine thanks to you.

    I am trying to check the impact of a "timing indicator" that seems usefull in filtering many bad trades. I found this timing indicator that you find attached in a forum dicussing the Belkhayate system.

    The timing indicator states sell and buy areas where the trades can only be taken, basicaly only if the bar is red in the sell area a short trading signal using your EA should be taken and vice versa.

    I have used an indicator "1_out_hist" to grabe the historical data of this timing indicator and do my analysis in excel to check out its impact on your EA. the "1_out_hist" grabs data very well on the normal MT4 indicator but when I apply it to any cutom indicator all I get is the last value of the indicator throughout all history.

    I attached for you the following files:

    1. 1_out_hist.mq4: the indicator I used to grab data from the timing indicator
    2. Mahmoud Amer -Timing H.ex4: the timing indicator, I have only the compiled version but I managed to get this part of the code that states the extern variables and the buffer necessary to know for the "1_out_hist.mq4" :

    #property copyright "Mahmoud Amer, Copyright 2009"
    #property link "pisces7644@hotmail.com"

    #property indicator_separate_window
    #property indicator_minimum 0.0
    #property indicator_maximum 40.0
    #property indicator_buffers 8
    #property indicator_color1 Black
    #property indicator_color2 Black
    #property indicator_color3 Black
    #property indicator_color4 Black
    #property indicator_color5 Black
    #property indicator_color6 Black
    #property indicator_color7 Black
    #property indicator_color8 Black

    #import "user32.dll"
    int GetDC(int a0);
    int ReleaseDC(int a0, int a1);
    #import "gdi32.dll"
    int GetPixel(int a0, int a1, int a2);
    #import

    extern color Bars_Up = Blue;
    extern color Bars_Down = Red;
    extern color Levels_Color = LightSteelBlue;
    extern color Text_Color1 = Red;
    extern color Text_Color2 = Blue;
    int gi_96 = Snow;
    int gi_100 = DarkGray;
    int gi_104 = 240;
    int gi_108 = 4;
    int gi_112 = 0;
    double gd_116 = 1.0;
    int gi_124 = 500;
    double gda_128[];
    double gda_132[];
    double gda_136[];
    double gda_140[];
    double gda_144[];
    double gda_148[];
    double gda_152[];
    double gda_156[];
    extern int fr = 40;
    int gi_164 = 15;
    int gi_168 = 30;
    int gi_172 = 0;
    string gs_176;
    int gi_184;
    int gi_188 = 100;

    int init() {
    int li_0 = WindowHandle(Symbol(), Period());
    int li_4 = GetDC(li_0);
    gi_184 = GetPixel(li_4, 1, 2);
    ReleaseDC(li_0, li_4);
    gi_96 = gi_184;
    gi_100 = gi_184;
    SetIndexBuffer(0, gda_128);
    SetIndexBuffer(1, gda_132);
    SetIndexBuffer(2, gda_136);
    SetIndexBuffer(3, gda_152);
    SetIndexBuffer(4, gda_140);
    SetIndexBuffer(5, gda_144);
    SetIndexBuffer(6, gda_148);
    SetIndexBuffer(7, gda_156);
    SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 14, Bars_Up);
    SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 14, Bars_Down);
    SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 14, gi_100);
    SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID, 14, gi_96);
    SetIndexStyle(4, DRAW_HISTOGRAM, STYLE_SOLID, 0, Bars_Up);
    SetIndexStyle(5, DRAW_HISTOGRAM, STYLE_SOLID, 0, Bars_Down);
    SetIndexStyle(6, DRAW_HISTOGRAM, STYLE_SOLID, 14, gi_100);
    SetIndexStyle(7, DRAW_HISTOGRAM, STYLE_SOLID, 10, gi_96);
    Comment(" Mahmoud Amer "
    + "\n"
    + "pisces7644@hotmail.com");
    gs_176 = "Mahmoud Amer _ Timing";
    IndicatorShortName(gs_176);
    if (StringFind(Symbol(), "JPY") >= 0) gi_188 = 100;
    else gi_188 = 10000;
    ObjectDelete("A");
    ObjectDelete("B");
    ObjectDelete("Buy");
    ObjectDelete("Sell");
    return (0);
    }

    3. excel file of the data grabed usin the "1_out_hist.mq4", forget the first line in the sheet as i didnt chage it in the code "open, high, low..."

    For the timing indicator to work, you need to all DLL import and you may need to restart MT4.

    Can you please have a look, what I need is to grab the historical values of the timing indicator to use them in excel.


    a million thanks to you funyou.

    Way2Freedom
    Attached Files

  3. #53
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    6,828

    Default

    Hi way2Freedom,

    Thanks for the explanation. Unfortunately, I have not enough knowledge to know what to do. You can still see in the strategy tester with the LFH trading simulator how it is. It seems that this timing indicator is repainting a lot.

  4. #54
    Junior Member
    Join Date
    Dec 2008
    Posts
    28

    Default

    Quote Originally Posted by funyoo View Post
    Hi way2Freedom,

    Thanks for the explanation. Unfortunately, I have not enough knowledge to know what to do. You can still see in the strategy tester with the LFH trading simulator how it is. It seems that this timing indicator is repainting a lot.
    Thanks funyou for quick reply.

    All this system is repainting and that's why strategy tester is not usefull.

    Do you know a way to grab custom indicator data to excel?

    Way2freedom

  5. #55
    Junior Member
    Join Date
    Dec 2008
    Posts
    28

    Default

    Quote Originally Posted by funyoo View Post
    Hi way2Freedom,

    Thanks for the explanation. Unfortunately, I have not enough knowledge to know what to do. You can still see in the strategy tester with the LFH trading simulator how it is. It seems that this timing indicator is repainting a lot.
    Otherwise funyou, would it be possible to have a new version of you EA that includes the timing indicator. And I will forward test and compare both versions (with and without timing indicator), I am asking this as the timing indicator seems to confirm well the profitable trades and avoid the loosing ones.

    The logic of the timing indicator is simple:

    >enter Long if first your EA generates a long signal and the timing incicator is in the Buy zone (that you can see at the bottom of the indicator window) and color of indicator is Blue

    > enter short: your EA gives short signal + timing indicator in the sell zone + color of the timing indicator is red

    I think it worths the effort of adding this timing indicators as it filters many bad signals.


    Let me know what you think,

    way2Freedom

  6. #56
    Junior Member
    Join Date
    Dec 2008
    Posts
    12

    Exclamation

    This is the first participation of me at the Forum
    I thank the subject

    I have the expert in backtest(Belkhayate Expert Advisor v1 (cobra)), but the only sell ?
    What is the solution to this problem? How to make him the bay and sell

  7. #57
    Junior Member
    Join Date
    Dec 2008
    Posts
    28

    Default

    Quote Originally Posted by Mr.DO$LLAR View Post
    This is the first participation of me at the Forum
    I thank the subject

    I have the expert in backtest(Belkhayate Expert Advisor v1 (cobra)), but the only sell ?
    What is the solution to this problem? How to make him the bay and sell
    Hi,

    I don't recommend to back test as the indicators repaints, unfortunatilly, you need to do it the hard way, demo it and forward test.

    way2Freedom

  8. #58
    Junior Member
    Join Date
    Dec 2008
    Posts
    12

    Default

    Quote Originally Posted by way2Freedom View Post
    Hi,

    I don't recommend to back test as the indicators repaints, unfortunatilly, you need to do it the hard way, demo it and forward test.

    way2Freedom
    mean, I tested a dynamic test of the price by Visual Mode Is this enough to show his work

  9. #59
    Junior Member
    Join Date
    Dec 2008
    Posts
    28

    Default

    Quote Originally Posted by Mr.DO$LLAR View Post
    mean, I tested a dynamic test of the price by Visual Mode Is this enough to show his work
    Try the last version then in this forum, v1.2

    way2Freedom

  10. #60
    Junior Member
    Join Date
    Dec 2008
    Posts
    12

    Default

    Look at all the sell of operations
    What are the settings used by the?
    Attached Files

+ Reply to Thread
Page 6 of 18 FirstFirst ... 4 5 6 7 8 16 ... LastLast

Similar Threads

  1. i-CAi Expert Advisor
    By funyoo in forum Expert advisors backtesting
    Replies: 49
    Last Post: 06-29-2012, 16:23
  2. i-CAi Expert Advisor
    By funyoo in forum Expert advisors live statements
    Replies: 1
    Last Post: 12-02-2008, 09:58
  3. Ah Expert Advisor
    By funyoo in forum Expert advisors backtesting
    Replies: 26
    Last Post: 11-04-2008, 00:55

Posting Permissions

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