please How to open order buy 10 pips or 10 ticks above the current open order - page 2

 
goverkms:
i cant get it why you show me wrong code? i'll try to help, just show code which need to correct

OK goverkms I have corrected it, for the case OP_SELL ignore it is not neccesary to my ea system for now that is why I always remove 1 case all I want is for the buy order to close all buy positions on reaching 40pips.thanks for willing to helping
 
you are welcome buddy
 
goverkms:
you are welcome buddy


Am waiting goverkms
 
goverkms:
if( ma1 > Ask + (10*Point)&& CurrentTime != Time[1])
  {
      Opn_B=true;
     }



goverkms i have tried it but did not work.

 
futureseer:



goverkms i have tried it but did not work.

if( ma1 > Ask + (10*Point)&& CurrentTime != Time[0])
  {
      Opn_B=true;
     }
 
goverkms:
if( ma1 > Ask + (10*Point)&& CurrentTime != Time[0])
  {
      Opn_B=true;
     }


goverkms: the code didnt work at all i have done all that yet its not gaping 10pips before another order,you can backtest it to check

 
where is a code
 

and also the code i ask for modification, i have not receive any answer at all




  if ( profit * Lot + MarketInfo( Symb, MODE_TICKVALUE ) >=2)
   {
    for(Ticket= OrdersTotal()-1; Ticket>=0; Ticket--)
       {       
       if(OrderSelect(Ticket,SELECT_BY_POS, MODE_TRADES)==true)
       if(OrderSymbol()!=Symbol())    // if symbol of order didn't match 
       
       continue;                        // or the magic numb of order    
     int type   = OrderType();
               
    Bool   result = false;
              
       switch(type)
          { 
          //Close opened long positions
          case OP_BUY  : result = OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),Slippage,Pink);
                         break;
          
 
          //Close pending orders
            case OP_BUYLIMIT  :
            case OP_BUYSTOP   :
            case OP_SELLLIMIT :
            case OP_SELLSTOP  : result = OrderDelete( OrderTicket() );                
          }
          
       if(result == false)
          {
            Sleep(3000);
          }  
       }
   Return(0);
   }     
 
i need to test this code?
 
goverkms:
i need to test this code?
when market opens right