myPickyBreakout

idgwil

Active Trader
Oct 18, 2011
5
0
37
london
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
 

Enivid

Administrator
Staff member
Nov 30, 2008
17,005
1,020
144
Odessa
www.earnforex.com
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.
 

pusztafie

Active Trader
Feb 22, 2012
1
0
32
my Picky breakout EA

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.

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:
 

ElectricSavant

Active Trader
Dec 8, 2010
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:

ElectricSavant

Active Trader
Dec 8, 2010
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


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:

Enivid

Administrator
Staff member
Nov 30, 2008
17,005
1,020
144
Odessa
www.earnforex.com
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


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;
}

Please do not forget to use code highlighting when inserting MQL code.

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

should become:

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

MQL4:
	int result = OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"myPickyBreakout",Magic,0);

should become:

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:

MQL4:
   if (Duration == MaxDuration)
   {
      CloseOrder(OT);
      count = 0;
   }
 
Last edited: