hahaha.... I'm coming back again

 

since i burnt several time again on real trading last few months ago, 

by myself. 

i think i should just  learn on mql4. 

 

the bcktest result of the last ea i did.

 


 

 

it's so wonderful. 

 

I can do that too . . .

or

or

 
RaptorUK:

I can do that too . . .

or

or



you are the perfect guy, but not me.
 
albert_lim83:

you are the perfect guy, but not me.
Do you want the EA I used ?  you are very welcome . . . it's less than 50 lines of code . . . 
 
i prefer if i can learning from u ... how to did it.
 
albert_lim83:
i prefer if i can learning from u ... how to did it.

It's a simple modification of the Coin Toss/Random EA that  ubzen did :  https://www.mql5.com/en/forum/141443 

It places a buy trade,  when that hits TP or SL it places a Sell,  when that hits TP or SL it places a Buy, etc, etc  so it alternates Buy, Sell, Buy, Sell . . .   it will never make any money.  

All the balance curves above are with  Spread of 0.0  ;-)

extern double TP_Size = 20;
extern double SL_Size = 20;

bool Long = true;

color   Color;
double  Sl; 
double  Tp;
double  Pips;
double  Price;

void start()
   {
   static int Dir;
    
   if(OrdersTotal()==0)
      {
      if(Long) Dir = OP_BUY; else Dir = OP_SELL;  
      Pips=Point; if(Digits==3){Pips=0.01;}if(Digits==5){Pips=0.0001;}
      if(Dir==0){Price=Ask; Sl=Ask-SL_Size*Pips; Tp=Ask+TP_Size*Pips; Color=Blue;}
      if(Dir==1){Price=Bid; Sl=Bid+SL_Size*Pips; Tp=Bid-TP_Size*Pips; Color=Red;}
        
      int Ticket=OrderSend(Symbol(), Dir, 0.1, Price, 999, 0, 0, "", 0, 0, Color);
        
      if(Ticket>-1)
         {
         if(OrderSelect(Ticket, SELECT_BY_TICKET))
            {
            OrderModify(Ticket,OrderOpenPrice(),Sl,Tp,0,Color);
            Long = !Long;   //  change from Long to Short or Short to Long for next trade
            }
         }   
      }   
   }
 
RaptorUK:

It's a simple modification of the Coin Toss/Random EA that  ubzen did :  https://www.mql5.com/en/forum/141443 

It places a buy trade,  when that hits TP or SL it places a Sell,  when that hits TP or SL it places a Buy, etc, etc  so it alternates Buy, Sell, Buy, Sell . . .   it will never make any money.  

All the balance curves above are with  Spread of 0.0  ;-)


im abit blur...
Reason: