We know OrderOpenPrice() and OrderClosePrice() (which is Bid in case of Buy trade and Ask in case of Sell trade), but I can't find an option to know the last price when a trade was modified - let's call it OrderModifyPrice().
Well, MQL4 is pretty old now and it's possible that I'm missing something. I searched about this topic and I didn't found anything.
static double OrderModifyBid; if( OrderModify(...) ) OrderModifyBid = Bid; else Alert(...);
Right after the modification set the price value to a variable.
The OP asked about the market price when the order was last modified. Not when the order opened. Not the last modified open price.
You may well be correct in your assumption and the OP may actually want something other than what he/she asked for.
This raptor. Okay let say a trade opened a while ago then you want to modify maybe its stop loss. I believe you cant modify order open price of a market order everyone would be a billionare. So lets look at a sample code.
double LastModifyPrice; int start() { if(Something happens){ OrderModify(....newsl...); // Modify open trade LastModifyPrice=Bid; // Price when the last modification was made } }
This raptor. Okay let say a trade opened a while ago then you want to modify maybe its stop loss. I believe you cant modify order open price of a market order everyone would be a billionare. So lets look at a sample code.
Thats another interpretation of what the OP wanted . . . we really need to hear from JDeel to find out what was actually wanted. I suspect it was the previous OrderOpenPrice(), the one before the OrderModify() . . . but that's just a guess.
We know OrderOpenPrice() and OrderClosePrice() (which is Bid in case of Buy trade and Ask in case of Sell trade), but I can't find an option to know the last price when a trade was modified - let's call it OrderModifyPrice().
Well, MQL4 is pretty old now and it's possible that I'm missing something. I searched about this topic and I didn't found anything.
Chicken skin. But even if it were that way, he could still use the same method i posted to save it.
Chicken skin. But even if it were that way, he could still use the same method i posted to save it.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
We know OrderOpenPrice() and OrderClosePrice() (which is Bid in case of Buy trade and Ask in case of Sell trade), but I can't find an option to know the last price when a trade was modified - let's call it OrderModifyPrice().
Well, MQL4 is pretty old now and it's possible that I'm missing something. I searched about this topic and I didn't found anything.