myPickyBreakout

Discussion in 'MetaTrader Expert Advisors' started by Enivid, Jul 6, 2009.

  1. Enivid

    Enivid Administrator Staff Member

    11,017
    404
    114
    Discuss myPickyBreakout expert advisor here. myPickyBreakout is a simple breakout strategy for a daily EUR/USD chart that trades only on specific weekdays. You can ask any questions about this expert advisor here.
     
    Last edited: Sep 5, 2017
  2. idgwil

    idgwil Active Trader

    5
    0
    37
    regarding my picky

    could this EA be altered to have the option to trade eveyday
    without to much hassel ?. I like this EA it can be used in a lot of different
    ways...would appreciate it heaps....thanks
     
  3. Enivid

    Enivid Administrator Staff Member

    11,017
    404
    114
    Re-download the latest version of myPickyBreakout. You can now control the days on which to trade using the input parameters. By default, it's the same Tuesday, Wednesday and Thursday, but you can switch all days on.
     
  4. pusztafie

    pusztafie Trader

    1
    0
    12
    my Picky breakout EA

    Often, the EA is a close loss-making position, and open a new one in the same direction. This is not right. Can I change this?: Mad:
     
  5. Enivid

    Enivid Administrator Staff Member

    11,017
    404
    114
    Try setting MaxDuration to something really big (like 10000).
     
  6. ElectricSavant

    ElectricSavant Active Trader

    41
    0
    27
    This is kind of a nice EA for those of you that like longer lasting trades. This is on the daily chart and I have been testing it for a couple of weeks so far and it has been in one trade for half of the time. It has a picky criteria for entering the trade and it stays in it for some time. I am riding a short down nicely currently.

    I Like it!

    Thanks for this EA.

    ES
     
    Last edited: Jul 13, 2012
  7. Enivid

    Enivid Administrator Staff Member

    11,017
    404
    114
    Good for you! Please keep us updated if it works well for you.
     
  8. ElectricSavant

    ElectricSavant Active Trader

    41
    0
    27
    0,Red and 0,Blue does not work when I add them here to get the arrows. Can someone help? I also need those triangles and lines showing the close. Also, where in the code does it specify to close in 5 bars?
    ES


    Code (MQL4):
    void fBuy()
    {
        RefreshRates();
        int result = OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"myPickyBreakout",Magic,0);
        if (result == -1)
        {
            int e = GetLastError();
            Print(e);
        }
        Duration = 0;
    }

    //+------------------------------------------------------------------+
    //| Sell                                                             |
    //+------------------------------------------------------------------+
    void fSell()
    {
        RefreshRates();
        int result = OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"myPickyBreakout",Magic,0);
        if (result == -1)
        {
            int e = GetLastError();
            Print(e);
        }
        Duration = 0;
    }
     
    Last edited by a moderator: Sep 28, 2015
  9. Enivid

    Enivid Administrator Staff Member

    11,017
    404
    114
    Please do not forget to use code highlighting when inserting MQL code.

    Code (MQL4):
        int result = OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"myPickyBreakout",Magic,0);
    should become:

    Code (MQL4):
        int result = OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"myPickyBreakout",Magic,0, Blue);
    Code (MQL4):
        int result = OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"myPickyBreakout",Magic,0);
    should become:

    Code (MQL4):
        int result = OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"myPickyBreakout",Magic,0, Red);
    Don't forget to "Compile".

    Duration is the counter of bars since the position is open. MaxDuration is an input parameter, which equals 5 by default:

    Code (MQL4):
       if (Duration == MaxDuration)
       {
          CloseOrder(OT);
          count = 0;
       }
     
    Last edited: Sep 28, 2015

Share This Page