Name of old EA on this site....???

 

HI

There is an EA here that uses no indicators and started with a long and short, then on on next bar if it was 10pips way it closed the loser and open another in direction of the winner.

Anyone remember it?


cheers

R

 

Something similar to what you are asking

https://www.mql5.com/en/code/9817

 
Ickyrus:

Something similar to what you are asking

https://www.mql5.com/en/code/9817


Hi,

No, it was totally pips and candle based, but about as simple..

thx

 

This may be closer then

https://www.mql5.com/en/code/9861m/6945

The code posted has some 'style' issues that could do with correction

extern double lot = 0.1;
extern double marketclosehour = 23; // on friday
extern double bval = 15;
extern double sval = 15;

int start()
{
  double h1 = iHigh(NULL,0,0);
  double l1 = iLow(NULL,0,0); 
  double o1 = iOpen(NULL,0,0);
  {
    if ((Bid>o1 && (o1-l1)>bval*Point) && OrdersTotal()<1 && Hour()<22)
    OrderSend(Symbol(),OP_BUY,lot,Ask,0,0,0,"Easiest ever",0,0);
       
    if ((Ask<o1 && (h1-o1)>sval*Point) && OrdersTotal()<1 && Hour()<16)
    OrderSend(Symbol(),OP_SELL,lot,Bid,0,0,0,"Easiest ever",0,0);
    {
      for (int i=0; i<OrdersTotal(); i++)
        { 
          if (OrderSelect(i,SELECT_BY_POS,MODE_TIME)==true)
          if (OrderType()==OP_BUY && Hour()>marketclosehour-1)
          OrderClose(OrderTicket(),OrderLots(),Bid,0,CLR_NONE);
           
          if (OrderType()==OP_SELL && Hour()>marketclosehour-1)
          OrderClose(OrderTicket(),OrderLots(),Ask,0,CLR_NONE);
        } 
     }
  } 
return(0);
}
//+------------------------------------------------------------------+
There are few 'Easiest ever' EA's in the code base
Reason: