ok, here's the source code, it is a freaking old EA .. feel free to modify it, it is open source.

Inserted Code

extern int sl = 300; extern int target = 1000; extern int maxspread=26; extern double lotss=0.01; extern double maxlots=5; extern bool buy=true; extern bool first=true; int B1,S1,firsb,firss; int start() { double lots = ((AccountEquity()/sl)-0.01); double s = (Ask-Bid); double bl1 = 0; double sl1 = 0; B1=0; S1=0; firsb=0; firss=0; for(int o=0;o<OrdersTotal(); o++ ) { if(OrderSelect(o, SELECT_BY_POS)==true) { if (OrderSymbol()==Symbol() && OrderType()==OP_BUY) { B1++; bl1 += OrderLots(); } if (OrderSymbol()==Symbol() && OrderType()==OP_SELL) { S1++; sl1 += OrderLots(); } if (OrderSymbol()==Symbol() && OrderType()==OP_BUY && OrderMagicNumber()==1) { firsb++; } if (OrderSymbol()==Symbol() && OrderType()==OP_SELL && OrderMagicNumber()==1) { firss++; } if (s<maxspread*Point) { if(OrderSymbol()==Symbol() && OrderType()==OP_BUY && OrderMagicNumber()==1 && AccountEquity()>target) { OrderClose(OrderTicket(),OrderLots(),Bid,20,0); } if(OrderSymbol()==Symbol() && OrderType()==OP_SELL && OrderMagicNumber()==1 && AccountEquity()>target) { OrderClose(OrderTicket(),OrderLots(),Ask,20,0); } if(OrderSymbol()==Symbol() && OrderType()==OP_BUY && OrderMagicNumber()==2 && firsb==0) { OrderClose(OrderTicket(),OrderLots(),Bid,20,0); } if(OrderSymbol()==Symbol() && OrderType()==OP_SELL && OrderMagicNumber()==2 && firss==0) { OrderClose(OrderTicket(),OrderLots(),Ask,20,0); } } } } if (s<maxspread*Point && lots<maxlots) { if (first==true && buy==true && B1+S1==0) { OrderSend(Symbol(),OP_BUY,lots,Ask,20,0,0,0,1); } if (first==true && buy==false && B1+S1==0) { OrderSend(Symbol(),OP_SELL,lots,Bid,20,0,0,0,1); } if (firsb>0 && bl1<lots) { OrderSend(Symbol(),OP_BUY,lotss,Ask,20,0,0,0,2); } if (firss>0 && sl1<lots) { OrderSend(Symbol(),OP_SELL,lotss,Bid,20,0,0,0,2); } } return(0); }