[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 618

 
Techno:
Oh, how beautiful ))))
OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),10);

I don't know what the point is here... How to close an order at the closing price if it is not yet closed, but only selected... ???
Or is it the closing price of a previously closed order?
In a nutshell... :)
Thanks Nikolay, thanks Viktor. I'm sure - I'll do it all...

 
kwadrad:

Maybe there's a kind soul who can answer a silly question?

I have created an Expert Advisor, in the tester it gives me a satisfying result.

On a real account it silently slumbers in the upper right corner for some reason, despite the prescribed signals.

What should I do with it? Maybe, I should skip the account? ;-)

Some advice, plz.

is it checked in the settings that the EA is allowed to trade? Does it log any errors?
 
artmedia70:

I don't know what the point is here... How to close an order at the closing price if it is not yet closed, but only selected... ???
Or is it the closing price of a previously closed order?
In a nutshell... :)
Thanks Nikolay, thanks Viktor. I'm sure I will do everything.



function will return 0, but this is allowed for closure, just not correct)
 

The logbook says // Loaded successfully. The checkbox is ticked accordingly. That's the question why it ignores the signals.

 
Techno:
function will return 0, but this is allowed for closure, just not correct)


It is not 0 that is returned, it is the right price.

2010.06.15 19:45:02 testCloseAll EURUSD,M1: OrderClosePrice()=1.2289

int start() {
   for (int i=OrdersTotal()-1;i>=0;i--){
      if (!OrderSelect(i,SELECT_BY_POS))continue;
      if (OrderType()<=OP_SELL) {
         Print("OrderClosePrice()=",NormalizeDouble(OrderClosePrice(), Digits));
         OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),10);
      }
      else
         OrderDelete(OrderTicket());
   }
}
 

2010.06.15 17:30:00 eAll v1.3 +CCI EURUSD,M5: Error opening BUY order: 129

What is error 129?

 
kwadrad:

2010.06.15 17:30:00 eAll v1.3 +CCI EURUSD,M5: Error opening BUY order : 129

What is error 129?


ERR_INVALID_PRICE 129 Incorrect price
 

What can be done about it?

 
Vinin:


The price returned is not 0, but exactly the price I need.

2010.06.15 19:45:02 testCloseAll EURUSD,M1: OrderClosePrice()=1.2289

Ah, the time returns zero, but it's wrong to write it that way)))
 
Techno:
ah, the time returns zero, but that's not the right way to write)))

I wrote right away that this closure is not recommended. An undocumented feature is used. But for any open position the closing time is zero and the closing price will be equal to the current closing price.
Reason: