maxxmax:
OrderClosePrice() is the price at which an Order that is closed was closed at. When applied to an open Order it is the price that the Order would need to be closed at if it were closed at that moment, so for a Buy it is Bid, for a Sell it is Ask. Using OrderClosePrice() means that the same line of code can be used for Buy and Sell Orders without needed to determine the type.
Hello, I have found an expert where the parameter OrderClosePrice() is included into an OrderModify and an OrderClose logic.
The codelines are the following:
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderClosePrice()-TakeProfit*Point -TrailingStop*Point,0,Purple);OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Blue);
I suppouse that this use of parameter OrderClosePrice() is not correct , but I am not sure. In you opinion it is a coding error or it make any sense?
Wonderful !!! Good to learn this.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, I have found an expert where the parameter OrderClosePrice() is included into an OrderModify and an OrderClose logic.
The codelines are the following:
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderClosePrice()-TakeProfit*Point -TrailingStop*Point,0,Purple);OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Blue);
I suppouse that this use of parameter OrderClosePrice() is not correct , but I am not sure. In you opinion it is a coding error or it make any sense?
the ea source code is here :
https://www.mql5.com/en/forum/129566
Thank you.