How to use OrderOpenPrice in EA

Hello everyone. I need some help

if (OrderSelect(1,SELECT_BY_POS,MODE_TRADES)== true) 
  OrderModify(OrderTicket(), OrderOpenPrice, Bid,0,0,0);


I don’t know why I get this error, which is:

‘OrderOpenPrice’ - Undeclared Identifier.


its a function so add ()

Hello, you can cancel ==true only if(…) Because if itself is a boolean expression true or false

Ah my bad. Apparently i need a good sleep. :slight_smile: Thanks you

Hello :slight_smile: I just wanted to make sure that I have at least one open position so it wont crash or something ( I am new learner so I don’t know is it really necessary though.) thank you.

Oh I understand know. Yes it is unnecessary thanks again.