Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 776

 
CJIeCaPb:
Hi all! How do I select an order without going through the order (can I use the magic number?)?

Can.

if(OrderSelect(маг_число, SELECT_BY_TICKET))
 
AlexeyVik:

You can.

if(OrderSelect(маг_число, SELECT_BY_TICKET))

No way ))))

and it works?

 
evillive:

no way ))))

and does it work?

And what are the doubts?


I take it all back. I was thinking about one thing and answering about another. I should have mixed up the ticket and the magician...

 

Hi everyone, can you advise me to remove TakeProfit in an EA by putting 0 after that it does not work!!! What can I do?

 
 
   
   
   datetime expiration = TimeCurrent()+3600*Expiration;  
   double BuyPrice=Ask+Delta*Point; 
   double SellPrice=Bid-Delta*Point;
   
 

        
//----
    if (last_bar == Bars) return(0);
   last_bar = Bars;
   if (OrdersTotal() == 0)
     {
      
      int ticket=OrderSend(Symbol(),OP_BUYLIMIT,Lot,BuyPrice,0,BuyPrice-StopLoss*Point,0,"",MAGIC,expiration,Blue);
             
//----  
  
     
      ticket=OrderSend(Symbol(),OP_SELLLIMIT,Lot,SellPrice,0,SellPrice+StopLoss*Point,0,"",MAGIC,expiration, Red);
     }   
//----
   return(0);
  }
//--------------------------------------------------------------------
 
logut:

Hi everyone, can you advise me to remove TakeProfit in an EA by putting 0 after that it does not work!!! What do I do?

what does the log say?

Also, buy-limit is below price and sell-limit should be above price, in the code above it's the opposite.

well and thirdly, i wanted to remove the TP and the SL is removed...

 
evillive:

what does the log say?

Also, bylimit is below the price and selimit should be above the price, in the code above it is the opposite.

And thirdly, I wanted to remove the TP, but the SL is removed...


the log did not show an error
 
logut:
the log didn't show an error
I don't believe it, there are no errors with this code unless you run it )))
 
evillive:
I don't believe it, with this code there are no errors only if you don't run it ))))
And nothing is normalised!
Reason: