Am looking of a simple EA for MT4 with the code open.
Inputs as per below:
input string Buy_line = "";
input string Sell_line = "";
input double Buy_SL_Points = 250;
input double Buy_TP_Points = 250;
input double Sell_SL_Points = 250;
input double Sell_TP_Points = 250;
enum Type1 { Yes=1, No=2 };
input Type1 Trailing_stoploss = Yes;
input double Move_stoploss = 1;
input double Trail = 250;
EA should open a trade with a buy or sell based on price reaching a drawn object and applying a breaking rule or strong break. Allow for trailing stoploss based on 2 inputs. and should not open a trade if one exists.
breaking rule.
For a sell trade there has to be a bar (bar A) which closes buffer pips below the line and another bar not necessary directly after which has a close buffer bibs from bar A's low. Buffer pips are determined. by ADR and timeframe. if ADR < 100 the Buffer pips are 50. if ADR between 100 and 200 the Buffer pips are 100 if ADR above 200 buffer pips are 150. this is all for 1H . they are multiplied by 2 for 4H and multiplied by 4 for 1D.