Page 1 of 2 12 LastLast
Results 1 to 10 of 15
 8 Attachment(s)    

Thread: Waddah Attar Win Expert

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

    Default Waddah Attar Win Expert

    TP an SL added.

    EU H1.

    SL=312; TP=256; Step=110; FirstLot=0.24; IncLot=0.08; MinProfit=450; Magic=2008.

    Total net profit : 112.17%
    MDD : 28.80%
    Attached Images Attached Images Waddah Attar Win Expert-strategytester-waddah-attar-win-tp-sl-eu-h1-gif 
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Dec 2008
    Posts
    7

    Default

    Hi!

    My backtest:

    Period: 2005.01.01 - 2008 (current days)
    Setup: Step = 120, FirstLot = 1, Inclot = 0, MinProfit = 10, Magic = 2008

    Waddah Attar Win Expert-testergraph-jpg

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

    Default

    Quote Originally Posted by JeRRimix View Post
    Hi!

    My backtest:

    Period: 2005.01.01 - 2008 (current days)
    Setup: Step = 120, FirstLot = 1, Inclot = 0, MinProfit = 10, Magic = 2008

    Waddah Attar Win Expert-testergraph-jpg
    Hi JeRRimix,

    Try to have a better tick data with a 90% modelling quality, tools > history center > currencies > download.

  4. #4
    Junior Member
    Join Date
    Dec 2008
    Posts
    7

    Default

    Quote Originally Posted by funyoo View Post
    Hi JeRRimix,

    Try to have a better tick data with a 90% modelling quality, tools > history center > currencies > download.
    Hi!!!!

    I have 1 minutes history from 2000 year, but I make backtest on M5-M15, modeling quality cannot be more than 60-65% at this timeframe. 90% may be on H1 and higher.

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

    Default

    Quote Originally Posted by JeRRimix View Post
    Hi!!!!

    I have 1 minutes history from 2000 year, but I make backtest on M5-M15, modeling quality cannot be more than 60-65% at this timeframe. 90% may be on H1 and higher.
    Ok, indeed you're right.

  6. #6
    Junior Member
    Join Date
    Dec 2008
    Posts
    7

    Default

    Quote Originally Posted by funyoo View Post
    Ok, indeed you're right.
    I install this EA to forwardtest on demo account. I will show results later.

  7. #7
    Junior Member
    Join Date
    Jan 2009
    Posts
    18

    Default

    Quote Originally Posted by JeRRimix View Post
    I install this EA to forwardtest on demo account. I will show results later.
    when will you post :>

  8. #8
    Junior Member
    Join Date
    Feb 2009
    Posts
    3

    Default

    Bring in a code, please, ТР and SL, it is one more excellent variant of the adviser from stop order. Thanks.

  9. #9
    Junior Member
    Join Date
    Feb 2009
    Posts
    3

    Default

    #property link "waddahattar@hotmail.com"

    extern int Step=120;
    extern double FirstLot=0.1;
    extern double IncLot=0;
    extern double MinProfit=450;
    extern int Magic = 2009;
    extern string comment="Win";

    int order_buy=0;
    int order_sell=0;
    double eLotSell=0;
    double eLotBuy=0;
    double gLotSell=0;
    double gLotBuy=0;
    double LSP,LBP;
    double CurrentProfit;


    int init()
    {
    Comment("Waddah Attar REV 1.2");
    return(0);
    }

    int deinit()
    {
    Comment("");
    return(0);
    }



    int start()
    {
    CurrentProfit=GetOrdersProfit(Magic);

    if (CurrentProfit>=MinProfit)
    {
    DeletePendingOrders(Magic);
    CloseOrders(Magic);
    }

    if (MyOrdersTotal(Magic)==0)
    {
    OrderSend(Symbol(),OP_SELLSTOP,FirstLot,Bid-Step*Point,3,0,0,comment,Magic,0,Red);
    OrderSend(Symbol(),OP_BUYSTOP,FirstLot,Ask+Step*Po int,3,0,0,comment,Magic,0,Blue);
    }

    LSP=GetLastSellPrice(Magic);
    LBP=GetLastBuyPrice(Magic);

    if((Bid-LSP)<=5*Point)
    {
    OrderSend(Symbol(),OP_SELLSTOP,gLotSell+IncLot,LSP-Step*Point,3,0,0,comment,Magic,0,Red);
    }

    if((LBP-Ask)<=5*Point)
    {
    OrderSend(Symbol(),OP_BUYSTOP,gLotBuy+IncLot,LBP+S tep*Point,3,0,0,comment,Magic,0,Blue);
    }


    Comment("Waddah Attar REV 1.2",
    "\n\n\n\n", " CurrentProfit = ", DoubleToStr(CurrentProfit,2),
    "\n\n", " Buy Lots = ", DoubleToStr(eLotBuy,2) + " / " + order_buy,
    "\n\n", " Sell Lots = ", DoubleToStr(eLotSell,2) + " / " + order_sell);

    return(0);
    }






    int DeletePendingOrders(int Magic)
    {
    int total = OrdersTotal();

    for (int cnt = total-1 ; cnt >= 0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && OrderType()!=OP_BUY && OrderType()!=OP_SELL)
    {
    OrderDelete(OrderTicket());
    }
    }
    return(0);
    }


    int CloseOrders(int Magic)
    {
    int total = OrdersTotal();

    for (int cnt = total-1 ; cnt >= 0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol())
    {
    if (OrderType()==OP_BUY)
    {
    OrderClose(OrderTicket(),OrderLots(),Bid,3);
    }

    if (OrderType()==OP_SELL)
    {
    OrderClose(OrderTicket(),OrderLots(),Ask,3);
    }
    }
    }
    return(0);
    }


    int MyOrdersTotal(int Magic)
    {
    int c=0;

    eLotBuy=0; eLotSell=0;
    order_buy=0; order_sell=0;

    int total = OrdersTotal();

    for (int cnt = 0 ; cnt < total ; cnt++)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol())
    {
    if(OrderType()==OP_BUY) { eLotBuy=eLotBuy+OrderLots(); order_buy++; }
    if(OrderType()==OP_SELL) { eLotSell=eLotSell+OrderLots(); order_sell++; }
    c++;
    }
    }
    return(c);
    }


    double GetLastBuyPrice(int Magic)
    {
    int total=OrdersTotal()-1;

    for (int cnt = total ; cnt >=0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_BUYSTOP || OrderType()==OP_BUY))
    {
    gLotBuy=OrderLots();
    return(OrderOpenPrice());
    }
    }
    return(0);
    }


    double GetLastSellPrice(int Magic)
    {
    int total=OrdersTotal()-1;

    for (int cnt = total ; cnt >=0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_SELLSTOP ||OrderType()==OP_SELL))
    {
    gLotSell=OrderLots();
    return(OrderOpenPrice());
    }
    }
    return(100000);
    }


    double GetOrdersProfit(int Magic)
    {
    double gProfit=0;
    int total=OrdersTotal()-1;

    for (int cnt = total ; cnt >=0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_BUY || OrderType()==OP_SELL))
    {
    gProfit=gProfit+OrderProfit();
    }
    }
    return(gProfit);
    }

  10. #10
    Junior Member
    Join Date
    Feb 2009
    Posts
    3

    Default

    #property link "waddahattar@hotmail.com"

    extern int Step=120;
    extern double FirstLot=0.1;
    extern double IncLot=0;
    extern double MinProfit=450;
    extern int Magic = 2009;
    extern string comment="Win";

    int order_buy=0;
    int order_sell=0;
    double eLotSell=0;
    double eLotBuy=0;
    double gLotSell=0;
    double gLotBuy=0;
    double LSP,LBP;
    double CurrentProfit;


    int init()
    {
    Comment("Waddah Attar REV 1.2");
    return(0);
    }

    int deinit()
    {
    Comment("");
    return(0);
    }



    int start()
    {
    CurrentProfit=GetOrdersProfit(Magic);

    if (CurrentProfit>=MinProfit)
    {
    DeletePendingOrders(Magic);
    CloseOrders(Magic);
    }

    if (MyOrdersTotal(Magic)==0)
    {
    OrderSend(Symbol(),OP_SELLSTOP,FirstLot,Bid-Step*Point,3,0,0,comment,Magic,0,Red);
    OrderSend(Symbol(),OP_BUYSTOP,FirstLot,Ask+Step*Po int,3,0,0,comment,Magic,0,Blue);
    }

    LSP=GetLastSellPrice(Magic);
    LBP=GetLastBuyPrice(Magic);

    if((Bid-LSP)<=5*Point)
    {
    OrderSend(Symbol(),OP_SELLSTOP,gLotSell+IncLot,LSP-Step*Point,3,0,0,comment,Magic,0,Red);
    }

    if((LBP-Ask)<=5*Point)
    {
    OrderSend(Symbol(),OP_BUYSTOP,gLotBuy+IncLot,LBP+S tep*Point,3,0,0,comment,Magic,0,Blue);
    }


    Comment("Waddah Attar REV 1.2",
    "\n\n\n\n", " CurrentProfit = ", DoubleToStr(CurrentProfit,2),
    "\n\n", " Buy Lots = ", DoubleToStr(eLotBuy,2) + " / " + order_buy,
    "\n\n", " Sell Lots = ", DoubleToStr(eLotSell,2) + " / " + order_sell);

    return(0);
    }






    int DeletePendingOrders(int Magic)
    {
    int total = OrdersTotal();

    for (int cnt = total-1 ; cnt >= 0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && OrderType()!=OP_BUY && OrderType()!=OP_SELL)
    {
    OrderDelete(OrderTicket());
    }
    }
    return(0);
    }


    int CloseOrders(int Magic)
    {
    int total = OrdersTotal();

    for (int cnt = total-1 ; cnt >= 0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol())
    {
    if (OrderType()==OP_BUY)
    {
    OrderClose(OrderTicket(),OrderLots(),Bid,3);
    }

    if (OrderType()==OP_SELL)
    {
    OrderClose(OrderTicket(),OrderLots(),Ask,3);
    }
    }
    }
    return(0);
    }


    int MyOrdersTotal(int Magic)
    {
    int c=0;

    eLotBuy=0; eLotSell=0;
    order_buy=0; order_sell=0;

    int total = OrdersTotal();

    for (int cnt = 0 ; cnt < total ; cnt++)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol())
    {
    if(OrderType()==OP_BUY) { eLotBuy=eLotBuy+OrderLots(); order_buy++; }
    if(OrderType()==OP_SELL) { eLotSell=eLotSell+OrderLots(); order_sell++; }
    c++;
    }
    }
    return(c);
    }


    double GetLastBuyPrice(int Magic)
    {
    int total=OrdersTotal()-1;

    for (int cnt = total ; cnt >=0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_BUYSTOP || OrderType()==OP_BUY))
    {
    gLotBuy=OrderLots();
    return(OrderOpenPrice());
    }
    }
    return(0);
    }


    double GetLastSellPrice(int Magic)
    {
    int total=OrdersTotal()-1;

    for (int cnt = total ; cnt >=0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_SELLSTOP ||OrderType()==OP_SELL))
    {
    gLotSell=OrderLots();
    return(OrderOpenPrice());
    }
    }
    return(100000);
    }


    double GetOrdersProfit(int Magic)
    {
    double gProfit=0;
    int total=OrdersTotal()-1;

    for (int cnt = total ; cnt >=0 ; cnt--)
    {
    OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
    if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_BUY || OrderType()==OP_SELL))
    {
    gProfit=gProfit+OrderProfit();
    }
    }
    return(gProfit);
    }

Similar Threads

  1. Waddah Attar Win
    By funyoo in forum Expert advisors live statements
    Replies: 6
    Last Post: 03-08-2010, 19:32
  2. Waddah Attar Scalping EA
    By claypot in forum Ideas for expert advisors
    Replies: 1
    Last Post: 12-03-2009, 17:57
  3. Waddah Attar Def RSI EA
    By funyoo in forum Expert advisors backtesting
    Replies: 1
    Last Post: 07-11-2009, 23:37
  4. Waddah Attar Trend EA
    By funyoo in forum Expert advisors live statements
    Replies: 0
    Last Post: 11-13-2008, 09:57

Tags for this Thread

100, adviser, backtest, demo, expert, magic, mq4, profit, sells, stop, trailing

Posting Permissions

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